Last active
January 18, 2017 14:22
-
-
Save chrishwiggins/ccd26e1c07ccb20644c808c7e1aed376 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TTD: bdraft different from draft | |
# TTD: open should kill preview | |
# high level | |
# | |
# CONFIG/ | |
project = writeup | |
# /CONFIG | |
# DERIVED PARAMETERS/ | |
ifile = ${project}-raw.md | |
pdf = ${project}.pdf | |
all: | |
make ${project}.pdf | |
${ifile}: | |
make edit | |
${project}.pdf: ${project}-out.md makefile | |
# time pandoc --slide-level 2 -i -t beamer ${ifile} -o ${project}.pdf | |
# time pandoc --slide-level 2 -i -t beamer ${project}-out.md -o ${project}.pdf | |
# time pandoc --number-sections ${project}-out.md -o ${project}.pdf | |
# time pandoc --number-sections ${project}-out.md -o ${project}.pdf | |
time pandoc --table-of-contents --number-sections ${project}-out.md -o ${project}.pdf | |
draft: ${project}-out.md | |
time pandoc ${project}-out.md -o ${project}.pdf | |
${project}-out.md: ${ifile} ${project}.sed | |
rm -f ${project}-out.md | |
touch ${project}-out.md | |
chmod 777 ${project}-out.md | |
grep -v '%%%' ${ifile} | sed -f ${project}.sed > ${project}-out.md | |
# prevent editing | |
chmod a-w ${project}-out.md | |
edit: | |
vi ${ifile} | |
cp ${ifile} backups/${project}-new-`date +%Y-%m-%dT%H:%M:%S`.md | |
open: ${project}.pdf | |
# killall Preview | |
open ${project}.pdf | |
spell: | |
aspell -c ${ifile} | |
${project}.sed: | |
touch ${project}.sed | |
sed: | |
vi ${project}.sed | |
# /DERIVED PARAMETERS | |
clean: | |
rm *.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment