made section templates more flexible
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
TOPDIR :::= $(PWD)
|
||||
TOPDIR ::= $(shell pwd)
|
||||
build_dir ::= $(TOPDIR)/build
|
||||
config_dir ::= $(TOPDIR)/config
|
||||
docker ::= podman
|
||||
@@ -31,8 +31,6 @@ build_docker_image:
|
||||
$(docker) build -t songsheet_generator .
|
||||
pull_docker:
|
||||
$(docker) pull gitea.leopold.fajtak.at/leopold/songsheet_generator:latest
|
||||
build_in_docker:
|
||||
$(docker) run -v `pwd`:/data songsheet_generator make -j all
|
||||
tex_deps ::= $(template_dir)/variables.tt $(config_dir)/qr_codes.csv $(config_dir)/variables.tt $(dynamic_deps)
|
||||
songsheet.tex: $(template_dir)/songsheet.tt $(tex_deps) $(template_dir)/header.tt $(template_dir)/head.tt $(template_dir)/footer.tt
|
||||
%.tex: build $(tex_deps)
|
||||
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
podman run -v `pwd`:/data songsheet_generator make "$@"
|
||||
@@ -1,12 +1,12 @@
|
||||
purpose | content | template | variables
|
||||
| | | freie_lieder/adeste_fideles
|
||||
purpose | template | assignments_directory | overrides
|
||||
| | freie_lieder/adeste_fideles |
|
||||
introitus | | |
|
||||
#confiteor | \input{library/gebete/confiteor/confiteor_de.tex} | |
|
||||
#confiteor | | | lyrics = "\\input{${library_dir}/gebete/confiteor/confiteor_de.tex}"
|
||||
kyrie | | |
|
||||
gloria | | |
|
||||
graduale | | |
|
||||
tractus | | |
|
||||
#credo | \input{library/gebete/credo/apostolisch_de.tex} | |
|
||||
#credo | | | lyrics = "\\input{${library_dir}/gebete/credo/apostolisch_de.tex}"
|
||||
offertorium | | |
|
||||
sanctus | | |
|
||||
agnus | | |
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 27.
|
+10
-4
@@ -3,11 +3,17 @@ tpage = tpage $(tpage_defs)
|
||||
tex_deps = *.tt $(config_dir)/variables.tt $(dynamic_deps)
|
||||
songsheet.tex: songsheet.tt $(tex_deps) header.tt head.tt footer.tt
|
||||
$(tpage) $< > $(build_dir)/$@
|
||||
musician_scores.tex: musician_scores.tt $(tex_deps)
|
||||
$(tpage) $< > $(build_dir)/$@
|
||||
leadsheet_collection.tex: musician_scores.tt $(tex_deps)
|
||||
$(tpage) --define parts=band $< > $(build_dir)/$@
|
||||
full_scores.tex: musician_scores.tt $(tex_deps)
|
||||
$(tpage) --define parts=full $< > $(build_dir)/$@
|
||||
choir_scores.tex: musician_scores.tt $(tex_deps)
|
||||
$(tpage) --define parts=SATB $< > $(build_dir)/$@
|
||||
leadsheets.tex: musician_scores.tt $(tex_deps)
|
||||
$(tpage) --define parts=band $< > $(build_dir)/$@
|
||||
$(build_dir)/dynamic_deps.mk: dynamic_deps.mk.tt $(song_choices) $(user_variables)
|
||||
$(tpage) $< > $@
|
||||
violin_parts.tex: musician_scores.tt $(tex_deps)
|
||||
$(tpage) --define parts=violin $< > $(build_dir)/$@
|
||||
viola_parts.tex: musician_scores.tt $(tex_deps)
|
||||
$(tpage) --define parts=viola $< > $(build_dir)/$@
|
||||
cello_parts.tex: musician_scores.tt $(tex_deps)
|
||||
$(tpage) --define parts=cello $< > $(build_dir)/$@
|
||||
|
||||
+1
-2
@@ -79,8 +79,7 @@ BoldFont = *-Bold
|
||||
\footnotesize Originaltitel: #1}}
|
||||
\newcommand{\TM}[1]{{
|
||||
\footnotesize T \& M: #1}}
|
||||
\newcommand{\arrangement}[1]{{
|
||||
\footnotesize S: #1}}
|
||||
\newcommand{\arrangement}[1]{}
|
||||
\newcommand{\lyrics}[1]{{
|
||||
\footnotesize T: #1}}
|
||||
\newcommand{\melody}[1]{{
|
||||
|
||||
@@ -71,9 +71,9 @@ RawFeature = {+ss06}
|
||||
|
||||
\begin{document}
|
||||
\section*{[% title %]}
|
||||
\begin{centering}
|
||||
[% subtitle %]
|
||||
\end{centering}
|
||||
\vfill
|
||||
[% parts %]
|
||||
|
||||
[% USE song_choices = datafile("${config_dir}/song_choices.csv", delim= '|') %]
|
||||
[% IF parts == 0 -%]
|
||||
@@ -81,14 +81,13 @@ parts = ensemble
|
||||
[% END -%]
|
||||
[% FOREACH song = song_choices %]
|
||||
\newpage
|
||||
[% template = song.template == '' ? "song_template.tt" : song.template -%]
|
||||
[% INCLUDE "$template"
|
||||
[% template = song.template == '' ? "song_template.tt" : song.template;
|
||||
INCLUDE "$template"
|
||||
purpose = song.purpose
|
||||
title = song.title
|
||||
content = song.content
|
||||
variables = song.variables ? "${library_dir}/${song.variables}/assignments.tt" : ''
|
||||
directory = song.variables ? "${library_dir}/${song.variables}" : ''
|
||||
%]
|
||||
[% END %]
|
||||
assignments = song.assignments_directory ? "${library_dir}/${song.assignments_directory}/assignments.tt" : ''
|
||||
directory = song.assignments_directory ? "${library_dir}/${song.assignments_directory}" : ''
|
||||
overrides = song.overrides;
|
||||
-%]
|
||||
[% END; -%]
|
||||
|
||||
\end{document}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
[% PROCESS purpose_processing.tt;
|
||||
IF variables;
|
||||
PROCESS "$variables";
|
||||
IF assignments;
|
||||
PROCESS "$assignments";
|
||||
END;
|
||||
IF overrides != '';
|
||||
"\[% $overrides %\]" | evaltt;
|
||||
END;
|
||||
-%]
|
||||
\song{[% purpose_print ? purpose_print : purpose %]}{[% song_title -%]}{
|
||||
@@ -14,10 +17,12 @@
|
||||
GET "\\gregorioscore{${directory}/${scores.gregorian}}\n";
|
||||
END;
|
||||
ELSE;
|
||||
GET '\lilypondfile{';
|
||||
IF parts;
|
||||
IF parts == 'band';
|
||||
IF scores.leadsheet;
|
||||
GET '\lilypondfile{';
|
||||
IF parts == 'band' || parts == 'full';
|
||||
IF scores.full;
|
||||
GET "${directory}/${scores.full}";
|
||||
ELSIF scores.leadsheet;
|
||||
GET "${directory}/${scores.leadsheet}";
|
||||
ELSE;
|
||||
GET "${directory}/${scores.SATB}";
|
||||
@@ -28,11 +33,25 @@
|
||||
ELSE;
|
||||
GET "${directory}/${scores.leadsheet}";
|
||||
END;
|
||||
ELSE;
|
||||
IF scores.${parts};
|
||||
GET "${directory}/${scores.$parts}";
|
||||
ELSE;
|
||||
IF scores.full;
|
||||
GET "${directory}/${scores.full}";
|
||||
ELSIF scores.leadsheet;
|
||||
GET "${directory}/${scores.leadsheet}";
|
||||
ELSE;
|
||||
GET "${directory}/${scores.SATB}";
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
GET "}\n";
|
||||
ELSE;
|
||||
GET "${directory}/${scores.congregation}";
|
||||
IF scores.congregation;
|
||||
GET "\\lilypondfile{${directory}/${scores.congregation}}\n";
|
||||
END;
|
||||
END;
|
||||
GET "}\n";
|
||||
END;
|
||||
ELSIF lyrics;
|
||||
GET lyrics;
|
||||
|
||||
+10
-9
@@ -10,15 +10,16 @@
|
||||
|
||||
[% USE song_choices = datafile("${config_dir}/song_choices.csv", delim= '|') %]
|
||||
|
||||
[% FOREACH song = song_choices %]
|
||||
[% template = song.template == '' ? "song_template.tt" : song.template -%]
|
||||
[% INCLUDE "$template"
|
||||
purpose = song.purpose
|
||||
content = song.content
|
||||
variables = song.variables ? "${library_dir}/${song.variables}/assignments.tt" : ''
|
||||
directory = song.variables ? "${library_dir}/${song.variables}" : ''
|
||||
%]
|
||||
[% END %]
|
||||
[%
|
||||
FOREACH song = song_choices;
|
||||
template = song.template == '' ? "song_template.tt" : song.template;
|
||||
INCLUDE "$template"
|
||||
purpose = song.purpose
|
||||
assignments = song.assignments_directory ? "${library_dir}/${song.assignments_directory}/assignments.tt" : ''
|
||||
directory = song.assignments_directory ? "${library_dir}/${song.assignments_directory}" : ''
|
||||
overrides = song.overrides;
|
||||
END;
|
||||
-%]
|
||||
|
||||
[% INCLUDE footer.tt %]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user