add method to open a terminal in the current course
This commit is contained in:
parent
6e9f6c0c06
commit
ced953bb82
2 changed files with 7 additions and 1 deletions
|
@ -103,6 +103,11 @@ class Notes:
|
||||||
)
|
)
|
||||||
return result.returncode
|
return result.returncode
|
||||||
|
|
||||||
|
def open_terminal(self):
|
||||||
|
result = subprocess.Popen(
|
||||||
|
['termite'], env=self.environment(), cwd=self.root
|
||||||
|
)
|
||||||
|
|
||||||
def compile_master(self):
|
def compile_master(self):
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
['latexmk', '-f', '-interaction=nonstopmode', '-dvi-', '-pdf', str(self.master_file)],
|
['latexmk', '-f', '-interaction=nonstopmode', '-dvi-', '-pdf', str(self.master_file)],
|
||||||
|
|
|
@ -8,7 +8,8 @@ def open_spec(specification: str):
|
||||||
|
|
||||||
switcher = {
|
switcher = {
|
||||||
'full': current.notes.open_full,
|
'full': current.notes.open_full,
|
||||||
'master': current.notes.open_master
|
'master': current.notes.open_master,
|
||||||
|
'terminal': current.notes.open_terminal
|
||||||
}
|
}
|
||||||
|
|
||||||
if specification in switcher.keys():
|
if specification in switcher.keys():
|
||||||
|
|
Loading…
Reference in a new issue