97 lines
2.8 KiB
Markdown
97 lines
2.8 KiB
Markdown
# README
|
|
|
|
All names are temporary and happy about suggestions of improvement.
|
|
Dependencies:
|
|
- bash
|
|
- python3
|
|
- pypdf (e.g. `python3 -m venv .venv && . .venv/bin/activate && pip install pypdf`)
|
|
- xelatex (e.g. `apt install texlive-xetex`)
|
|
|
|
---
|
|
|
|
## md2verse.sh
|
|
create `.tex` from markdown files in verse format
|
|
This bash-script converts an easy markdown file in aqoaba dialect to LaTeX code.
|
|
This LaTeX code needs a wrapper LaTeX script with
|
|
```
|
|
\usepackage{verse, gmverse}
|
|
```
|
|
in the preamble and some other features.
|
|
The path to markdown files, chapter names and other options can be configured in the `verse.conf` file.
|
|
The `verse.conf file is read by `mkverse.sh`.
|
|
|
|
---
|
|
|
|
## mkverse.sh
|
|
The `mkverse.sh` script creates a PDF file out of several easy markdown files.
|
|
Some options need to be set in `vers.conf` file.
|
|
A single configuration file can be given to `mkverse.sh` to use instead of `verse.conf`.
|
|
```
|
|
cp verse.conf quaderno.conf
|
|
./mkverse.sh quaderno.conf
|
|
```
|
|
|
|
---
|
|
|
|
## md2parallel.sh
|
|
|
|
---
|
|
|
|
## pdf2book.py
|
|
This script takes a pdf and reorders pages for printing signatures.
|
|
The number of pages per signature can be varied
|
|
Dependency: `pypdf`
|
|
```
|
|
s=1: 1,2,3,4 -> 04,01.02,03 i=0
|
|
08,05.06,07 i=1
|
|
12,09.10,11 i=2
|
|
16,13.14,15 i=3
|
|
20,17.18,19 i=4
|
|
down=(i+1)*4*s
|
|
up= (i)*4*s+1
|
|
#pages_mod=$(python -c " (int(pages/s)+1)*(pages%s) " )
|
|
for i in $(pages%s)
|
|
print (down--,up++,up++,down--)
|
|
|
|
s=2: 1,2,3,4,5,6,7,8 -> 08,01.02,07 06,03.04,05 i=0
|
|
16,09.10,15 14,11.12,13 i=1
|
|
24,17.18,23 22,19.20.21 i=2
|
|
down=(i+1)*4*s
|
|
up= (i)*4*s+1
|
|
for i in range(pages%s):
|
|
for count in range(2):
|
|
print (down--,up++,up++,down--)
|
|
|
|
s=3: 1,2,3,4,5,6,7,8,9,10,11,12 -> 12,01.02,11 10,03.04,09 08,05.06,07
|
|
24,13.14,23 22,15.16,21 20,17.18,19
|
|
s=4: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 -> 16,01.02,15 14,03.04,13 12,05.06,11 10,07.08,09
|
|
32,17,18,31 30,19.20.29 28,21.22.27 26,23.24,25
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
### TODO
|
|
- [x] create md2verse.sh
|
|
- [ ] improve mkverse.sh
|
|
- [ ] write into folder instead of giving back only pdf
|
|
- [ ] insert cleaning step (html to md)
|
|
- [ ] md2html -> sed pertubation -> html2md
|
|
- [ ]
|
|
- [X] create mkparallel.sh
|
|
- [X] fix geometry bug
|
|
- [X] fix multi-word string chapter bug
|
|
- [ ] improve mkparallel.sh
|
|
- [ ] insert cleaning step (html to md)
|
|
- [ ] md2html -> sed pertubation -> html2md
|
|
- [/] colophon
|
|
- [ ] dictionary
|
|
- [ ] include pics into title and colophon
|
|
- [X] create pdf2sig.sh /pdf2book.py -s/--sigsize [0,3,4,5]
|
|
- [ ] move conf files to templates
|
|
- [ ] make config a needed argument
|
|
- [ ] think of better names for scripts
|
|
- [ ] unify scripts
|
|
- [ ] convert to python scripts?
|