Parses training plan in text format (like in sample) and outputs html page.
-
Pass path/to/plan.txt as command line argument; path/to/plan.html is created.
./run path/to/plan.txt
-
Pass plan as stdin.
cat path/to/plan.txt | ./run - > path/to/plan.html
or
./run - < path/to/plan.txt > path/to/plan.html
-
Pass path/to/plan.txt.
from trpp import process_file process_file('path/to/plan.txt')
-
Manage streams manually.
from trpp import process with open('path/to/plan.txt', mode='r') as in_stream, open('path/to/plan.html', mode='w') as out_stream: process(in_stream, out_stream)
See sample.