aboutsummaryrefslogtreecommitdiffstats
path: root/ninja
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2019-01-19 21:37:12 +0100
committerNao Pross <naopross@thearcway.org>2019-01-19 21:37:12 +0100
commit636ac918c245cc16cd69d5ded6dd5a7d4ec68633 (patch)
tree7bdeccef9a28e3567dd4a5d2b434446e8bc66485 /ninja
parentUpdate README.md (diff)
downloadcookbook-636ac918c245cc16cd69d5ded6dd5a7d4ec68633.tar.gz
cookbook-636ac918c245cc16cd69d5ded6dd5a7d4ec68633.zip
Add ninja files to build pdf and html with pandocwriting
Diffstat (limited to 'ninja')
-rw-r--r--ninja/html.ninja7
-rw-r--r--ninja/pdf.ninja7
-rw-r--r--ninja/rules.ninja11
3 files changed, 25 insertions, 0 deletions
diff --git a/ninja/html.ninja b/ninja/html.ninja
new file mode 100644
index 0000000..b059a9b
--- /dev/null
+++ b/ninja/html.ninja
@@ -0,0 +1,7 @@
+include ninja/rules.ninja
+
+build html: mkdir
+build html/hamburger.html: html hamburger.md
+build html/insalata.html: html insalata.md
+build html/miso.html: html miso.md
+build html/tonkatsu.html: html tonkatsu.md
diff --git a/ninja/pdf.ninja b/ninja/pdf.ninja
new file mode 100644
index 0000000..8b0e4c2
--- /dev/null
+++ b/ninja/pdf.ninja
@@ -0,0 +1,7 @@
+include ninja/rules.ninja
+
+build pdf: mkdir
+build pdf/hamburger.pdf: pdf hamburger.md
+build pdf/insalata.pdf: pdf insalata.md
+build pdf/miso.pdf: pdf miso.md
+build pdf/tonkatsu.pdf: pdf tonkatsu.md
diff --git a/ninja/rules.ninja b/ninja/rules.ninja
new file mode 100644
index 0000000..3e67144
--- /dev/null
+++ b/ninja/rules.ninja
@@ -0,0 +1,11 @@
+rule mkdir
+ command = mkdir -p $out
+ description = Creating directory $out
+
+rule pdf
+ command = pandoc -f markdown $in -t latex --latex-engine=xelatex -o $out
+ description = Building pdf $out
+
+rule html
+ command = pandoc -f markdown $in -t html --ascii -o $out
+ description = Building html $out