diff --git a/Makefile b/Makefile index 111efb3..320fef5 100644 --- a/Makefile +++ b/Makefile @@ -53,6 +53,7 @@ ${BUILD_OPUS_DIR}: ${TMP_SONG_DIR}/%.pdf: ${SONG_DIR}/%.ly ${SONG_DIR}/%.tex cd ${SRC_DIR} && lualatex --jobname='$(notdir $(basename $@))' --output-directory=${WORKING_DIR}/${TMP_SONG_DIR} --shell-escape ${WORKING_DIR}/${SRC_DIR}/song.tex ${WORKING_DIR}/${SONG_DIR}/$(notdir $(basename $@)).ly ${WORKING_DIR}/${SONG_DIR}/$(notdir $(basename $@)).tex + rm -r ${SRC_DIR}/tmp_ly ${BUILD_MIDI_DIR}/%.midi: ${TMP_MIDI_DIR}/%-1.midi cp $< $@ @@ -65,6 +66,7 @@ ${BUILD_OPUS_DIR}/%.opus: ${BUILD_MIDI_DIR}/%.midi ${TMP_BOOK_DIR}/%.pdf: ${SRC_DIR}/%.tex ${SRC_DIR}/images/title.png latexmk -cd -lualatex -e '$$lualatex=q/lualatex %O -shell-escape %S/' -output-directory=${WORKING_DIR}/${TMP_BOOK_DIR} $< + rm -r ${SRC_DIR}/tmp_ly #short edge binding ${TMP_BOOK_DIR}/%-octavo.pdf: ${TMP_BOOK_DIR}/%.pdf diff --git a/src/tools/templater.py b/src/tools/templater.py deleted file mode 100755 index ff0b1cf..0000000 --- a/src/tools/templater.py +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env python -# encoding: utf-8 - -import ast -import os -import sys -from jinja2 import Environment, FileSystemLoader, Template - -template_dir = os.path.abspath(os.path.dirname(sys.argv[1])) -template_name = os.path.basename(sys.argv[1]) - -env = Environment(loader=FileSystemLoader(template_dir)) -env.block_start_string = '((*' -env.block_end_string = '*))' -env.variable_start_string = '(((' -env.variable_end_string = ')))' -env.comment_start_string = '((=' -env.comment_end_string = '=))' - -template = env.get_template(template_name) -rendered = template.render(ast.literal_eval(sys.argv[2])) - -print(rendered)