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