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'], 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( config['_compiled_authwords'] = authors.compile_authwords(
copy.deepcopy(config['authors']) copy.deepcopy(config['authors'])

6
patacrep/data/templates/default.tex

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

Loading…
Cancel
Save