Browse Source

Use template variables

pull/184/head
Oliverpool 9 years ago
parent
commit
0730695da2
  1. 2
      patacrep/build.py
  2. 6
      patacrep/data/templates/default.tex

2
patacrep/build.py

@ -82,7 +82,7 @@ class Songbook(object):
config['book']['encoding'],
)
self.config['template'] = renderer.get_all_variables(self.config.get('template', {}))
config['_template'] = renderer.get_all_variables(self.config.get('template', {}))
config['_compiled_authwords'] = authors.compile_authwords(
copy.deepcopy(config['authors'])

6
patacrep/data/templates/default.tex

@ -34,7 +34,7 @@ schema:
type: //arr
contents: //str
default:
title: "Guitar songook"
title: "Guitar songbook"
author: "The Patacrep Team"
(* endvariables -*)
@ -55,8 +55,8 @@ default:
\usepackage{chords}
\title{((title))}
\author{((author))}
\title{(( _template["default.tex"].title ))}
\author{(( _template["default.tex"].author ))}
\newindex{titleidx}{((filename))_title}
\newauthorindex{authidx}{((filename))_auth}

Loading…
Cancel
Save