From 636ac918c245cc16cd69d5ded6dd5a7d4ec68633 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sat, 19 Jan 2019 21:37:12 +0100 Subject: Add ninja files to build pdf and html with pandoc --- .gitignore | 3 +++ hamburger.md | 5 +++++ insalata.md | 11 +++++++++++ ninja/html.ninja | 7 +++++++ ninja/pdf.ninja | 7 +++++++ ninja/rules.ninja | 11 +++++++++++ 6 files changed, 44 insertions(+) create mode 100644 .gitignore create mode 100644 ninja/html.ninja create mode 100644 ninja/pdf.ninja create mode 100644 ninja/rules.ninja diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..194f2c1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.ninja* +pdf +html diff --git a/hamburger.md b/hamburger.md index 3e9e6b2..5dd7902 100644 --- a/hamburger.md +++ b/hamburger.md @@ -1,3 +1,8 @@ +--- +CJKmainfont: Noto Sans CJK SC Regular +CJKoptions: AutoFakeBold +--- + # Hamburgers giapponesi Per fare 4 - 6 hamburgers. diff --git a/insalata.md b/insalata.md index 1bdda6f..c3c6b7f 100644 --- a/insalata.md +++ b/insalata.md @@ -1,3 +1,8 @@ +--- +CJKmainfont: Noto Sans CJK SC Regular +CJKoptions: AutoFakeBold +--- + # Salsa italiana (di Grazia) La salsa KISS (Keep It Stupid Simple) @@ -17,3 +22,9 @@ La salsa KISS (Keep It Stupid Simple) # Salsa francese (di Hilda) ## Ingredienti + +# Caesar salad +Un'insalata come pasto + +## Ingredienti +- Insalata 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 -- cgit v1.2.1