From 9697da146a51a067351e614ee33b4b47be7f6780 Mon Sep 17 00:00:00 2001 From: Arnaud Legrand Date: Tue, 19 Feb 2019 17:23:03 +0100 Subject: [PATCH] Export org metadata to markdown --- Makefile.ressources | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile.ressources b/Makefile.ressources index 7d349bf..daf6722 100644 --- a/Makefile.ressources +++ b/Makefile.ressources @@ -1,7 +1,14 @@ %.md: %.org chmod a+w $@ - pandoc -f org -t markdown_github -o $@ $^ + LANG=C ; pandoc -s -f org -t markdown_github -o $@ $^ + mv $@ $@.bak + echo '---' > $@ + grep -i -e "#+TITLE:" -e "#+AUTHOR:" $^ | sed 's/#+//' >> $@ # -e "#+DATE:" ## echo "DATE: `date '+%B %e, %Y'`" >> $@ + git log $^ | grep Date | head -n 1 | sed 's/+.*//' >> $@ + echo "---\\n" >> $@ + cat $@.bak >> $@ + rm $@.bak chmod a-wx $@ # %.html: %.org -- 2.18.1