From 94573db73d512603f0dc93ed2b1aa7e9c490e9bb Mon Sep 17 00:00:00 2001 From: gutmet Date: Sat, 8 Dec 2018 17:35:50 +0100 Subject: [PATCH] scripts for Markdown -> pandoc -> latex -> pdf presentations --- presbuild | 11 +++++++++++ presinit | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 presbuild create mode 100755 presinit diff --git a/presbuild b/presbuild new file mode 100755 index 0000000..6f71cc4 --- /dev/null +++ b/presbuild @@ -0,0 +1,11 @@ +# build a presentation from a markdown file via pandoc and latex beamer + +if [ -z $1 ]; then + echo "needs name" + exit 1 +fi + +outfile="${1%.md}.pdf" + +pandoc "$1" -t beamer -o "$outfile" +xdg-open "$outfile" diff --git a/presinit b/presinit new file mode 100755 index 0000000..1325a35 --- /dev/null +++ b/presinit @@ -0,0 +1,23 @@ +# init a presentation .md + +if [ -z $1 ]; then + echo "needs name" + exit 1 +fi + +read -p "Title? " title +read -p "Author? " author + +echo "\ +--- +title: $title +author: $author +colortheme: magpie +--- + +# First slide + +Foobar +" > "$1" + +$EDITOR "$1" \ No newline at end of file