cook2tex/README.md

32 lines
969 B
Markdown
Raw Permalink Normal View History

2022-05-16 00:01:54 +02:00
# Cook2tex
Two small python scripts that turn [cooklang](https://cooklang.org/) recipes into LaTeX source files.
The LaTeX files use the [cuisine](https://ctan.org/pkg/cuisine) package.
## cook2tex.py
Takes a recipe path as an argument and returns the cuisine recipe block on stdout.
Optionally, if provided with the argument "--", reads the recipes source from stdin.
2022-05-16 00:01:54 +02:00
### Example
`python3 cook2tex.py /path/to/recipe`
## cooklangbook.py
Takes multiple recipe paths as arguments and returns a complete latex document on stdout.
Optionally takes the '-r' flag and two directory paths,
the first one being the source and the second one the destination directory.
It then generates multiple .tex files,
one per recipe and one called `recipe-book.tex` including all recipies.
2022-05-16 00:01:54 +02:00
### Examples
Basic operation:
2022-05-16 00:01:54 +02:00
`python3 cooklangbook.py /path/to/recipes/{rec1,rec2,rec3}`
Recursive book generation:
2022-05-18 10:57:54 +02:00
`python3 cooklangbook.py -r /path/to/source/dir /path/to/dest/dir`