add python file for new writeup.
This commit is contained in:
parent
6305fced47
commit
a4f973da22
3 changed files with 9 additions and 3 deletions
|
@ -98,4 +98,4 @@ class Exercises(list):
|
|||
course=self.course.info['title'],
|
||||
number=new_num
|
||||
))
|
||||
ExerciseWriteUp(new_dir, self.course).open()
|
||||
return ExerciseWriteUp(new_dir, self.course)
|
||||
|
|
6
scripts/new-writeup.py
Normal file
6
scripts/new-writeup.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
#! /usr/bin/python3
|
||||
from courses import Courses
|
||||
|
||||
course = Courses().current
|
||||
writeup = course.exercises.new_writeup()
|
||||
writeup.edit()
|
|
@ -42,8 +42,8 @@ def rofi_pick_exercise(spec: str = 'writeup'):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if not len(sys.argv) == 1:
|
||||
if not len(sys.argv) == 2:
|
||||
print('Please specify exactly one of "writeup", "solution" and "sheet"')
|
||||
exit(1)
|
||||
rofi_pick_exercise('writeup')
|
||||
rofi_pick_exercise(sys.argv[1])
|
||||
exit(0)
|
||||
|
|
Loading…
Reference in a new issue