summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Eek <gustav.eek@fripost.org>2019-09-02 16:57:39 +0200
committerGustav Eek <gustav.eek@fripost.org>2019-09-02 16:57:39 +0200
commitcf147fe4819c449800a0824ab02d5455bd314b5e (patch)
tree9594eb6fdb8dc94015b4e7841a66ab5021fa0360
parent6749d3fb6c99bcae6e55b6b8fb01a5f571a6d6d7 (diff)
ODT compilation added
Makefile completed with creation of ODT. Also .gitignore updated.
-rw-r--r--.gitignore2
-rw-r--r--Makefile29
2 files changed, 27 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index a436d86..546e48f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,5 @@
*~
/_build/
/dist/
+/pdf/
+/odt/ \ No newline at end of file
diff --git a/Makefile b/Makefile
index 794a87c..282f4b7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,16 @@
+
+MDWN = \
+ inquiries/2019-03-28-flfd.mdwn \
+ inquiries/cost-operation.mdwn \
+
+TMP = tmp
+
ALL = \
-pdf/2019-03-28-flfd.pdf
+ pdf/2019-03-28-flfd.pdf \
+ odt/cost-operation.odt \
+ odt/cost-operation.pdf \
-all: pdf $(ALL)
+all: pdf odt $(ALL)
OPT_PANDOC = \
-f markdown \
@@ -12,8 +21,20 @@ OPT_PANDOC = \
pdf/2019-03-28-flfd.pdf: inquiries/2019-03-28-flfd.mdwn
cat $< | sed -f sed/latex.sed | pandoc $(OPT_PANDOC) -o $@
-pdf:
+odt/cost-operation.odt: inquiries/cost-operation.mdwn
+ cat $< | pandoc -s -f markdown -t odt -o $@
+
+PAR_CONV = \
+ --headless "-env:UserInstallation=file:///tmp/lo-$$$$" \
+ --convert-to pdf \
+ --outdir "$(abspath $(dir $@))" \
+
+%.pdf: %.odt
+ libreoffice $(PAR_CONV) "$<"
+
+
+pdf odt:
mkdir -p $@
clean:
- rm -fr pdf
+ rm -fr pdf odt