forked from tfragner/pandoc-scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompile-pdf.sh
executable file
·42 lines (27 loc) · 1.63 KB
/
compile-pdf.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
pwd
# Einrichten einer Python Umgebung innerhalb des containers
python3 -m venv venv
# Aktivieren der Python Umgebung
source venv/bin/activate
# Installation der Requirements
# Hier können Python Pakete eingetragen werden die für Pandoc Filter benötigt werden
pip install -r .pandoc/requirements.txt --no-binary :all:
source bin/base.env
if [[ -e "settings.env" ]] ; then
source settings.env
fi
# Erstellen von Büchern (siehe README.md)
if [[ ${CREATE_AUTOMATIC_BOOKS} = true ]] ; then
find . -maxdepth ${SEARCH_DEPTH} -name 'book*.sh' -print0 | xargs -0 -I{} -n1 -P${THREADS} /bin/bash -c './bin/make-files.sh --pdf --source "{}" '
find . -maxdepth ${SEARCH_DEPTH} -name 'book*.sh' -print0 | xargs -0 -I{} -n1 -P${THREADS} echo'./bin/make-files.sh --pdf --source "{}" '
fi
if [[ ${CREATE_MANUAL_BOOKS} = true ]] ; then
find . -maxdepth ${SEARCH_DEPTH} -name 'book*.txt' -print0 | xargs -0 -I{} -n1 -P${THREADS} /bin/bash -c './bin/make-files.sh --pdf --source "{}" '
find . -maxdepth ${SEARCH_DEPTH} -name 'book*.txt' -print0 | xargs -0 -I{} -n1 -P${THREADS} echo './bin/make-files.sh --pdf --source "{}" '
fi
# Erstellen von PDFs pro Ordner
if [[ ${CREATE_SINGLE_PAGES} = true ]] ; then
find . -maxdepth ${SEARCH_DEPTH} -type f -name "*${MARKDOWN_EXTENSION}" -not -name "_index${MARKDOWN_EXTENSION}" -print0 | xargs -0 -I{} -n1 -P${THREADS} /bin/bash -c './bin/make-files.sh --pdf --source "{}" '
find . -maxdepth ${SEARCH_DEPTH} -type f -name "*${MARKDOWN_EXTENSION}" -not -name "_index${MARKDOWN_EXTENSION}" -print0 | xargs -0 -I{} -n1 -P${THREADS} echo './bin/make-files.sh --pdf --source "{}" '
fi