add markdown-convert.sh and edit makefile
authorGreg Farough <gregf@gnu.org>
Wed, 18 Mar 2020 17:08:45 +0000 (13:08 -0400)
committerGreg Farough <gregf@gnu.org>
Wed, 18 Mar 2020 17:08:45 +0000 (13:08 -0400)
2020/Makefile
markdown-convert.sh [new file with mode: 0755]

index 3ac561d53ef6980258448110625f7ef2164d4fd2..a3a9426bce37ab102d73286856e29b05399e364a 100644 (file)
 
 all:
        @echo "Give me something to make."
-# for f in $(find -name '*.mdwn' -type f); do python -m markdown $f > ${f%mdwn}html; done
-# todo: edit below command so it translates ALL markdown files. use above command instead until then.
+
 wikipages:
-       for dir in fun getting-around raffle safe-space-policy speaker-release sponsors volunteer;      do \
-               if [ -f $$dir/index.mdwn ] ; then \
-                        python -m markdown $$dir/index.mdwn > $$dir/index.html ; \
-               fi \
-       done
+       $(shell ../markdown-convert.sh $<)
 
 speakers: 
        curl -s https://my.fsf.org/lp-talk/30| sed -n 's=/lp-talk/30=/2020/speakers/=g; s=/lp-schedule-2020=/2020/program/=g; s/fa fa-/glyphicon glyphicon-/g; /pagestart/s/<\/div>//; /pagestart/,/pageend/p; ' > includes/generated-bios.html
diff --git a/markdown-convert.sh b/markdown-convert.sh
new file mode 100755 (executable)
index 0000000..f4c5993
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+for f in $(find -name '*.mdwn' -type f); do python -m markdown $f > ${f%mdwn}html; done