diff --git a/chapters.py b/chapters.py new file mode 100644 index 0000000..e4bd540 --- /dev/null +++ b/chapters.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python +from __future__ import print_function, unicode_literals +import sys + +task_templates = [ + "read {}", + "make chapter summary for {}", + "make flashcards for {}", +] + +for line in sys.stdin.readlines(): + for template in task_templates: + print(template.format(line.strip())) diff --git a/chapters.sh b/chapters.sh new file mode 100755 index 0000000..4f9cf17 --- /dev/null +++ b/chapters.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +seq 1 ${1} | tr ' ' '\n' | sed -E 's/^/chapter /g' | python chapters.py