initial commit
This commit is contained in:
commit
f408b8004a
12
.editorconfig
Normal file
12
.editorconfig
Normal file
@ -0,0 +1,12 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
10
.gitignore
vendored
Executable file
10
.gitignore
vendored
Executable file
@ -0,0 +1,10 @@
|
||||
*~
|
||||
.DS_Store
|
||||
*.swp
|
||||
*.lock*
|
||||
*.waf*
|
||||
out
|
||||
pdf
|
||||
midi
|
||||
music
|
||||
build
|
184
lib/lyluatex.lua
Normal file
184
lib/lyluatex.lua
Normal file
@ -0,0 +1,184 @@
|
||||
local err, warn, info, log = luatexbase.provides_module({
|
||||
name = "lyluatex",
|
||||
version = '0',
|
||||
greinternalversion = internalversion,
|
||||
date = "2016/09/08",
|
||||
description = "Module lyluatex.",
|
||||
author = "The Gregorio Project (see CONTRIBUTORS.md)",
|
||||
copyright = "2008-2016 - The Gregorio Project",
|
||||
license = "MIT",
|
||||
})
|
||||
|
||||
local md5 = require 'md5'
|
||||
|
||||
LILYPOND = 'lilypond'
|
||||
TMP = (os.getenv('TMP_LY') and os.getenv('TMP_LY') or 'tmp_ly')
|
||||
N = 0
|
||||
|
||||
|
||||
function ly_definir_programme(lilypond)
|
||||
if lilypond then LILYPOND = lilypond end
|
||||
end
|
||||
|
||||
|
||||
function contenuIntegral(contenu)
|
||||
local content =""
|
||||
for i, Line in ipairs(contenu:explode('\n')) do
|
||||
if Line:find("^%s*[^%%]*\\include") then
|
||||
local i = io.open(Line:gsub('%s*\\include%s*"(.*)"%s*$', "%1"), 'r')
|
||||
if i then
|
||||
content = content .. contenuIntegral(i:read('*a'))
|
||||
else
|
||||
content = content .. Line .. "\n"
|
||||
end
|
||||
else
|
||||
content = content .. Line .. "\n"
|
||||
end
|
||||
end
|
||||
return content
|
||||
end
|
||||
|
||||
|
||||
function direct_ly(ly, largeur, facteur)
|
||||
N = N + 1
|
||||
facteur = calcul_facteur(facteur)
|
||||
ly = ly:gsub('\\par ', '\n')
|
||||
local sortie = TMP..'/'..string.gsub(md5.sumhexa(contenuIntegral(ly))..'-'..facteur..'-'..largeur, '%.', '-')
|
||||
if not lfs.isfile(sortie..'-systems.tex') then
|
||||
compiler_ly(entete_lilypond(facteur, largeur - 10)..'\n'..ly, sortie)
|
||||
end
|
||||
retour_tex(sortie)
|
||||
end
|
||||
|
||||
|
||||
function inclure_ly(entree, currfiledir, largeur, facteur)
|
||||
facteur = calcul_facteur(facteur)
|
||||
nom = splitext(entree, 'ly')
|
||||
entree = currfiledir..nom..'.ly'
|
||||
if not lfs.isfile(entree) then entree = kpse.find_file(nom..'.ly') end
|
||||
if not lfs.isfile(entree) then err("Le fichier %s.ly n'existe pas.", nom) end
|
||||
local i = io.open(entree, 'r')
|
||||
ly = i:read('*a')
|
||||
i:close()
|
||||
local sortie = TMP..'/' ..string.gsub(md5.sumhexa(contenuIntegral(ly))..'-'..facteur..'-'..largeur, '%.', '-')
|
||||
if not lfs.isfile(sortie..'-systems.tex') then
|
||||
compiler_ly(entete_lilypond(facteur, largeur - 10)..'\n'..ly, sortie, dirname(entree))
|
||||
end
|
||||
retour_tex(sortie)
|
||||
end
|
||||
|
||||
|
||||
function compiler_ly(ly, sortie, include)
|
||||
mkdirs(dirname(sortie))
|
||||
local commande = LILYPOND.." "..
|
||||
"-dno-point-and-click "..
|
||||
"-dbackend=eps "..
|
||||
"-djob-count=2 "..
|
||||
"-ddelete-intermediate-files "
|
||||
if include then commande = commande.."-I "..lfs.currentdir()..'/'..include.." " end
|
||||
commande = commande.."-o "..sortie.." -"
|
||||
local p = io.popen(commande, 'w')
|
||||
p:write(ly)
|
||||
p:close()
|
||||
end
|
||||
|
||||
|
||||
function entete_lilypond(facteur, largeur)
|
||||
return string.format(
|
||||
[[%%En-tête
|
||||
\version "2.18.2"
|
||||
#(define default-toplevel-book-handler
|
||||
print-book-with-defaults-as-systems )
|
||||
|
||||
#(define toplevel-book-handler
|
||||
(lambda ( . rest)
|
||||
(set! output-empty-score-list #f)
|
||||
(apply print-book-with-defaults rest)))
|
||||
|
||||
#(define toplevel-music-handler
|
||||
(lambda ( . rest)
|
||||
(apply collect-music-for-book rest)))
|
||||
|
||||
#(define toplevel-score-handler
|
||||
(lambda ( . rest)
|
||||
(apply collect-scores-for-book rest)))
|
||||
|
||||
#(define toplevel-text-handler
|
||||
(lambda ( . rest)
|
||||
(apply collect-scores-for-book rest)))
|
||||
|
||||
|
||||
#(set-global-staff-size %s)
|
||||
|
||||
|
||||
%%Paramètres de la partition
|
||||
\paper{
|
||||
indent = 0\mm
|
||||
line-width = %s\pt
|
||||
}
|
||||
|
||||
%%Partition originale
|
||||
]],
|
||||
facteur,
|
||||
largeur
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
function calcul_facteur(facteur)
|
||||
if facteur == 0 then facteur = fontinfo(font.current()).size/39321.6 end
|
||||
return facteur
|
||||
end
|
||||
|
||||
|
||||
function retour_tex(sortie)
|
||||
local i = io.open(sortie..'-systems.tex', 'r')
|
||||
contenu = i:read("*all")
|
||||
i:close()
|
||||
texoutput, _ = string.gsub(
|
||||
contenu,
|
||||
[[includegraphics{]], [[includegraphics{]]..dirname(sortie)
|
||||
)
|
||||
tex.print(([[\noindent]]..texoutput):explode('\n'))
|
||||
end
|
||||
|
||||
|
||||
function dirname(str)
|
||||
if str:match(".-/.-") then
|
||||
local name = string.gsub(str, "(.*/)(.*)", "%1")
|
||||
return name
|
||||
else
|
||||
return ''
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function splitext(str, ext)
|
||||
if str:match(".-%..-") then
|
||||
local name = string.gsub(str, "(.*)(%." .. ext .. ")", "%1")
|
||||
return name
|
||||
else
|
||||
return str
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function mkdirs(str)
|
||||
path = '.'
|
||||
for dir in string.gmatch(str, '([^%/]+)') do
|
||||
path = path .. '/' .. dir
|
||||
lfs.mkdir(path)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local fontdata = fonts.hashes.identifiers
|
||||
function fontinfo(id)
|
||||
local f = fontdata[id]
|
||||
if f then
|
||||
return f
|
||||
end
|
||||
return font.fonts[id]
|
||||
end
|
||||
|
||||
mkdirs(TMP)
|
71
lib/lyluatex.sty
Normal file
71
lib/lyluatex.sty
Normal file
@ -0,0 +1,71 @@
|
||||
\ProvidesPackage{lyluatex}
|
||||
|
||||
% Dépendances
|
||||
\RequirePackage{luatexbase}
|
||||
\RequirePackage{luaotfload}
|
||||
\RequirePackage{kvoptions}
|
||||
\RequirePackage{graphicx}
|
||||
\RequirePackage{keycommand}
|
||||
\RequirePackage{environ}
|
||||
\RequirePackage{currfile}
|
||||
% Options
|
||||
\DeclareStringOption[lilypond]{program}[lilypond]
|
||||
\ProcessKeyvalOptions*
|
||||
% Script lua
|
||||
\directlua{dofile(kpse.find_file("lyluatex.lua"))}
|
||||
\directlua{LILYPOND = '\lyluatex@program'}
|
||||
|
||||
% Une tricherie un peu sale pour récupérer la largeur de ligne
|
||||
\let\bs\textbackslash
|
||||
{\catcode`p=12 \catcode`t=12 \gdef\un#1pt{#1}}
|
||||
\newcommand*{\largeur}{\expandafter\un\the\linewidth}
|
||||
% Taille des partitions
|
||||
% Si la valeur est 0, elle sera automatiquement calculée
|
||||
% à partir de la taille de police.
|
||||
\def\staffsize{0}
|
||||
\let\localstaffsize\staffsize
|
||||
|
||||
|
||||
% Commandes principales
|
||||
% Inclusion d'un fichier ly
|
||||
\newkeycommand*\includely[staffsize=\staffsize][autres][1]{%
|
||||
\directlua{%
|
||||
inclure_ly(
|
||||
"\luatexluaescapestring{#1}",
|
||||
"\luatexluaescapestring{\currfiledir}",
|
||||
\luatexluaescapestring{\largeur},
|
||||
\luatexluaescapestring{\commandkey{staffsize}}
|
||||
)%
|
||||
}%
|
||||
}
|
||||
|
||||
% Inclusion d'un fragment intégré au document (environnement de base)
|
||||
\NewEnviron{compilerly}{%
|
||||
\directlua{%
|
||||
direct_ly(
|
||||
"\luatexluaescapestring{\unexpanded\expandafter{\BODY}}",
|
||||
\luatexluaescapestring{\largeur},
|
||||
\luatexluaescapestring{\localstaffsize}
|
||||
)%
|
||||
}%
|
||||
}
|
||||
|
||||
% Commande et environnement avec paramètres
|
||||
\newkeycommand{\lily}[staffsize=\staffsize][autres][1]{%
|
||||
\def\localstaffsize{\commandkey{staffsize}}%
|
||||
\begin{compilerly}%
|
||||
#1
|
||||
\end{compilerly}%
|
||||
}
|
||||
|
||||
\newkeyenvironment{ly}[staffsize=\staffsize][autres]{%
|
||||
\def\localstaffsize{\commandkey{staffsize}}%
|
||||
\compilerly%
|
||||
}{
|
||||
\endcompilerly%
|
||||
}
|
||||
|
||||
% Commandes pour la compatibilité avec lilypond-book
|
||||
\let\lilypondfile\includely
|
||||
\let\lilypond\ly
|
||||
\let\endlilypond\endly
|
29
src/lyrics/bierlein_rinn.tex
Normal file
29
src/lyrics/bierlein_rinn.tex
Normal file
@ -0,0 +1,29 @@
|
||||
\par
|
||||
2. Beim Rosenwirt im Stübel drin, da sitzt ein junges Blut,
|
||||
die schmucke, schlanke Kellnerin war ihm noch gestern gut.
|
||||
Doch heute ist sie durchgebrannt fahr wohl du falsche Hex!
|
||||
Der Bursch kehrt sein Gesicht zur Wand und summt um halber sechs:
|
||||
|: "Bierlein rinn! Bierlein rinn! Bierlein rinn! Bierlein rinn! Was nutzen mir die Kreuzerlein, wenn ich gestorben bin!" :|
|
||||
\par
|
||||
3. Beim Rosenwirt am Eichentisch, da thront ein braver Greis,
|
||||
die Wangen rot, die Augen frisch, die Haare silberweiss!
|
||||
Schlug ihm gleich manchen grossen Plan das Schicksal schnöd entzwei ---
|
||||
um halber sechs schlächt auch wer an, der alte brummt dabei:
|
||||
"Bierlein rinn! ..."
|
||||
\par
|
||||
4.
|
||||
Beim Rosenwirt am Grabentor, da blüht ein fein Gewächs,
|
||||
das heben wir im Glas empor schon abends um halb sechs.
|
||||
Wir heben es gar emsig hoch, wir leeren's auf den Grund ---
|
||||
um Mitternacht da klingt es noch, schallt's noch von Mund zu Mund:
|
||||
"Bierlein rinn! ..."
|
||||
\par
|
||||
5. Und schlägt mir einst der Sensenmann den Nagel auf die Truh,
|
||||
rast ich von harter Lebensbahn in kühler Grabesruh,
|
||||
dann schwingt bekränzt den Becher mir, dem müden Wandersmann,
|
||||
der euch gelehrt den Spruch zum Bier, und hebet also an:
|
||||
"Bierlein rinn! ..."
|
||||
\\~
|
||||
\begin{flushright}
|
||||
Julius Rudolf Gspandl
|
||||
\end{flushright}
|
22
src/lyrics/ergo_bibamus.tex
Normal file
22
src/lyrics/ergo_bibamus.tex
Normal file
@ -0,0 +1,22 @@
|
||||
\par
|
||||
2. Mich ruft mein Geschick von den Freunden hinweg:
|
||||
ihr Redlichen ergo bibamus!
|
||||
Ich scheide von hinnen mit leichtem Gepäck,
|
||||
drum doppeltes: ergo bibamus!
|
||||
Und was auch der Filz von dem Leibe sich schmort,
|
||||
so bleibt für den Heitern doch immer gesorgt,
|
||||
weil immer dem Frohen der Fröhliche sorgt;
|
||||
|: drum, Brüderchen: ergo bibamus! :|
|
||||
\par
|
||||
3. Was sollen wir sagen zum heutigen Tag?
|
||||
Ich dächte nur: ergo bibamus!
|
||||
Er ist nun einmal von besonderem Schlag,
|
||||
drum immer aufs neue: bibamus!
|
||||
Er führet die Freude durchs offene Tor,
|
||||
es glänzen die Wolken, es teilt sich der Flor,
|
||||
da scheint uns ein Bildchen, ein göttliches, vor,
|
||||
|: wir klingen und singen: bibamus! :|
|
||||
\\~
|
||||
\begin{flushright}
|
||||
Goethe, 1810
|
||||
\end{flushright}
|
38
src/lyrics/gaudeamus_igitur.tex
Normal file
38
src/lyrics/gaudeamus_igitur.tex
Normal file
@ -0,0 +1,38 @@
|
||||
\par
|
||||
2. Ubi sunt, qui ante nod in munod luere?
|
||||
Vadite ad superos, transite ad inferos,
|
||||
|: ubi iam luere. :|
|
||||
\par
|
||||
3. Vita nostra brevis est,
|
||||
brevi finietur,
|
||||
venit mors velociter,
|
||||
rapit nos atrociter,
|
||||
nemini parcetur.
|
||||
\par
|
||||
4. Vivat academia,
|
||||
vivant professores,
|
||||
vivat membrum quodlibet,
|
||||
vivant membra quaelibet,
|
||||
semper sint in flore!
|
||||
\par
|
||||
5. Vivat omnes virgines
|
||||
faciles, formosae,
|
||||
vivant et mulieres,
|
||||
tenerae, amabiles,
|
||||
bonae, laboriosae!
|
||||
\par
|
||||
6. Vivat et res publica
|
||||
et qui illam regit,
|
||||
vivat nostra civitas,
|
||||
maecenatum caritas,
|
||||
quae nos hic protegit!
|
||||
\par
|
||||
7. Pereat tristitia,
|
||||
pereant osores,
|
||||
pereat diabolus,
|
||||
quivis antiburschius,
|
||||
atque irrisores!
|
||||
\\~
|
||||
\begin{flushright}
|
||||
Neuere Fassung von Kindleben, 1781
|
||||
\end{flushright}
|
10
src/lyrics/in_jedem_vollen_glase_wein.tex
Normal file
10
src/lyrics/in_jedem_vollen_glase_wein.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\par
|
||||
2. Da trink ich schnell und warte nicht und küsse dich im Wein,
|
||||
|: aufs neu zu schaun dein Angesicht, :|: schenk schnell ich wieder ein! :|
|
||||
\par
|
||||
3. So füll und leer mein Gläschen ich und trinke immerzu.
|
||||
|: Nennt man mich nächstens liederlich, :|: die Schuld mein Schatz hast du! :|
|
||||
\\~
|
||||
\begin{flushright}
|
||||
Rudolf Hermanns
|
||||
\end{flushright}
|
25
src/lyrics/lindenwirtin.tex
Normal file
25
src/lyrics/lindenwirtin.tex
Normal file
@ -0,0 +1,25 @@
|
||||
\par
|
||||
2. "Angekreidet wird hier nicht, weils an Kreide uns gebricht,"
|
||||
lacht die Wirtin heiter.
|
||||
"Hast du keinen Heller mehr, gib zum Pfand dein Ränzel her, |: aber trinke weiter! :|"
|
||||
\par
|
||||
3. Tauscht der Bursch sein Ränzel ein,
|
||||
gegen einen Krug voll Wein,
|
||||
tät zum Gehn sich wenden.
|
||||
Spricht die Wirtin: "Junges Blut, hast ja Mantel, Stab und Hut: |: trink und lass dich pfänden! :|"
|
||||
\par
|
||||
4. Da vertrank der Wanderknab Mantel, Hut und Wanderstab, sprach betrübt:
|
||||
"Ich scheide. Fahre wohl du kühler Trank, Lindenwirtin jung und schlank, |: liebliche Augenweide! :|"
|
||||
\par
|
||||
5. Spricht zu ihm das schöne Weib: "Hast ja noch ein Herz im Leib, lass mir's trauter Wandrer!"
|
||||
Was geschah ich tu's euch kund: auf der Wirtin rotem Mund |: brannte heiss ein andrer. :|
|
||||
\par
|
||||
6. Der dies neue Lied erdacht,
|
||||
sang's in einer Sommernacht lustig in die Winde,
|
||||
vor ihm stund ein volles Glas,
|
||||
neben ihm Frau Wirtin sass
|
||||
|: unter der blühenden Linde :|
|
||||
\\~
|
||||
\begin{flushright}
|
||||
Rudolf Baumbach, 1876
|
||||
\end{flushright}
|
16
src/lyrics/viel_volle_becher.tex
Normal file
16
src/lyrics/viel_volle_becher.tex
Normal file
@ -0,0 +1,16 @@
|
||||
\par
|
||||
2. Noch klingen Lied und Becher,
|
||||
doch sitzen andre Zecher,
|
||||
|: wir selbst in diesem Raum, :|
|
||||
und lassen's uns behagen nach gut und bösen Tagen,
|
||||
|: doch alles ist ein Traum. :|
|
||||
\par
|
||||
3. Nicht lang, so füllen wieder bei Becherklang und Lieder,
|
||||
ganz andre diesen Raum,
|
||||
und treiben was wir trieben,
|
||||
und singen, trinken, lieben,
|
||||
bis alles wird ein Traum.
|
||||
\\~
|
||||
\begin{flushright}
|
||||
Johann Nepomuk Vogl, vor 1852
|
||||
\end{flushright}
|
92
src/scores/bierlein_rinn.ly
Normal file
92
src/scores/bierlein_rinn.ly
Normal file
@ -0,0 +1,92 @@
|
||||
\version "2.18.2"
|
||||
\include "articulate.ly"
|
||||
|
||||
\header {
|
||||
title = "Bierlein, rinn!"
|
||||
composer = "Otto Lob, 1896"
|
||||
poet = "Gemütlich"
|
||||
tagline = ""
|
||||
}
|
||||
|
||||
musicOne = \relative d' {
|
||||
\time 4/4
|
||||
\key g \major
|
||||
|
||||
\partial 8 d8 |
|
||||
g8. fis16 g8 d fis fis fis b, |
|
||||
e8. dis16 e8 c d4 r8 d |
|
||||
d c' c d, d b' b g |
|
||||
fis a g e d4 r8 d\p |
|
||||
d8. e16 fis8 g a gis a fis |
|
||||
fis8.^"zögernd" g16 a8\< b\! c4\fermata r8 d,^"im Zeitmass" |
|
||||
b'8. ais16 b8 d a gis a c |
|
||||
b g a fis g4 d'8.\fermata c16 |
|
||||
\repeat volta 2
|
||||
{
|
||||
b4 d,8. d16 d4 c'8.-> b16 |
|
||||
a4 d,8. d16 d4 r8 d\p |
|
||||
g8. a16 b8 c d8. e16 d8 c |
|
||||
b^"zögernd" g a fis g4 r8 s |
|
||||
}
|
||||
\alternative
|
||||
{
|
||||
{ d'8.\fermata c16 | }
|
||||
{ r2 r4 | }
|
||||
}
|
||||
}
|
||||
|
||||
verseOne = \lyricmode {
|
||||
Beim Ro -- sen -- wirt am Gra -- ben -- tor des |
|
||||
Ab -- ends um halb sechs den |
|
||||
Ham -- mer schwingt der Wirt em -- por und |
|
||||
schlägt den Zap -- fen ex! Das |
|
||||
schlurrt und glurrt aus feuch -- ter Nacht vom |
|
||||
Spund -- loch in die Kann'; ei |
|
||||
seht, wie's Ant -- litz je -- dem lacht, jed -- |
|
||||
we -- dem Ze -- chers -- mann: Bier -- lein, |
|
||||
rinn! Bier -- lein rinn! Bier -- lein |
|
||||
rinn! Bier -- lein rinn! Was |
|
||||
nut -- zen mir die Keu -- zer -- lein, wenn |
|
||||
ich ge -- stor -- ben bin! |
|
||||
Bier -- lein |
|
||||
}
|
||||
|
||||
\book {
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
\new Lyrics \lyricsto "one" {
|
||||
\verseOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\book {
|
||||
\bookOutputName "bierlein_rinn_score"
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
|
||||
\score {
|
||||
\unfoldRepeats \articulate
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\midi {
|
||||
\tempo 4 = 110
|
||||
}
|
||||
}
|
||||
}
|
100
src/scores/ergo_bibamus.ly
Normal file
100
src/scores/ergo_bibamus.ly
Normal file
@ -0,0 +1,100 @@
|
||||
\version "2.18.2"
|
||||
\include "articulate.ly"
|
||||
|
||||
\header {
|
||||
title = "Ergo Bibamus!"
|
||||
composer = "Max Eberwein, 1813"
|
||||
tagline = ""
|
||||
}
|
||||
|
||||
musicOne = \relative f' {
|
||||
\time 4/4
|
||||
\key g \minor
|
||||
\partial 8 f8\f
|
||||
\repeat volta 2 {
|
||||
f4 d8 es f4 g8 a |
|
||||
bes4 a8 g f4 r8 f |
|
||||
a4 g8 a bes4 a8 g |
|
||||
f4 (e) f r8 f |
|
||||
}
|
||||
|
||||
c'4 c8 bes a4 (a8) g |
|
||||
f4 f8 es d4 r8 f |
|
||||
c'4 c8 bes a4 a8 g |
|
||||
f4 f8 es d4 r8 f |
|
||||
f4 g8 a bes4 a8 bes |
|
||||
c4 bes8 c d4 r8 d |
|
||||
d4 c8 d es4 d8 c |
|
||||
bes4 (c) d r8 d \ff |
|
||||
d4 c8 d f (es) d c |
|
||||
bes2 (a) |
|
||||
bes\fermata r4 r8 \bar "|."
|
||||
}
|
||||
|
||||
verseOne = \lyricmode {
|
||||
Hier sind wir ver -- sam -- melt zu |
|
||||
löb -- li -- chem Run, drum, |
|
||||
Brü -- der -- chen, er -- go bi -- |
|
||||
ba -- mus! (Das) |
|
||||
heisst noch ein altes, ein |
|
||||
tüch -- ti -- ges Wort, es |
|
||||
pas -- set zum er -- sten und |
|
||||
pas -- set so -- fort und |
|
||||
schal -- let, ein E -- cho, vom |
|
||||
fest -- li -- chen Ort, ein |
|
||||
herr -- li -- ches: er -- go bi -- |
|
||||
ba -- mus! ein |
|
||||
herr -- li -- ches: er -- go bi -- |
|
||||
ba -- |
|
||||
mus! |
|
||||
}
|
||||
|
||||
verseOneRepeat = \lyricmode {
|
||||
Die Glä -- ser sie klin -- gen, Ge -- |
|
||||
sprä -- che sie ruhn; be -- |
|
||||
her -- zi -- get: er -- go bi -- |
|
||||
ba -- mus! _ |
|
||||
}
|
||||
|
||||
\book {
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
\new Lyrics \lyricsto "one" {
|
||||
\verseOne
|
||||
}
|
||||
\new Lyrics \lyricsto "one" {
|
||||
\verseOneRepeat
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\book {
|
||||
\bookOutputName "ergo_bibamus_score"
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
|
||||
\score {
|
||||
\unfoldRepeats \articulate
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\midi {
|
||||
\tempo 4 = 120
|
||||
}
|
||||
}
|
||||
}
|
82
src/scores/gaudeamus_igitur.ly
Normal file
82
src/scores/gaudeamus_igitur.ly
Normal file
@ -0,0 +1,82 @@
|
||||
\version "2.18.2"
|
||||
\include "articulate.ly"
|
||||
|
||||
\header {
|
||||
title = "Gaudeamus Igitur"
|
||||
poet = "Frisch"
|
||||
tagline = ""
|
||||
}
|
||||
|
||||
musicOne = \relative b' {
|
||||
\time 3/4
|
||||
\key g \minor
|
||||
\repeat volta 2 {
|
||||
bes8. \f f16 f4 bes |
|
||||
g8. g16 g2 |
|
||||
a8. bes16 c4 a |
|
||||
bes8 (d) bes4 r |
|
||||
a8. bes16 c4 c |
|
||||
d8 bes c4 c |
|
||||
a8. bes16 c4 c |
|
||||
d8 bes c4 c |
|
||||
bes8. a16 g8 (es') d (c) |
|
||||
d4 (c) bes\fermata |
|
||||
bes8. a16 g8 (es') d (c) |
|
||||
f4 (a,) bes\fermata |
|
||||
}
|
||||
}
|
||||
|
||||
verseOne = \lyricmode {
|
||||
Gau -- de -- a -- mus |
|
||||
i -- gi -- tur, |
|
||||
iu -- ve -- nes dum |
|
||||
su -- mus; |
|
||||
post iu -- cum -- dam |
|
||||
iu -- ven -- tu -- tem, |
|
||||
post mo -- le -- stam |
|
||||
se -- nec -- tu -- tem |
|
||||
nos ha -- be -- bit |
|
||||
hu -- mus, |
|
||||
nos ha -- be -- bit |
|
||||
hu -- mus! |
|
||||
}
|
||||
|
||||
\book {
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
\new Lyrics \lyricsto "one" {
|
||||
\verseOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\book {
|
||||
\bookOutputName "gaudeamus_igitur_score"
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
|
||||
\score {
|
||||
\unfoldRepeats \articulate
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\midi {
|
||||
\tempo 4 = 100
|
||||
}
|
||||
}
|
||||
}
|
82
src/scores/in_jedem_vollen_glase_wein.ly
Normal file
82
src/scores/in_jedem_vollen_glase_wein.ly
Normal file
@ -0,0 +1,82 @@
|
||||
\version "2.18.2"
|
||||
\include "articulate.ly"
|
||||
|
||||
\header {
|
||||
title = "In jedem vollen Glase Wein"
|
||||
composer = "Otto Lob, 1896"
|
||||
poet = "Mit Ausdruck"
|
||||
tagline = ""
|
||||
}
|
||||
|
||||
musicOne = \relative d' {
|
||||
\time 6/8
|
||||
\key g \major
|
||||
\partial 8 d8 |
|
||||
b (d) g b4-^ a8 |
|
||||
g4 e8 d4 d8^"zart" |
|
||||
a'4 gis8 a4 c,8 |
|
||||
e4. (d8) r d |
|
||||
g4 g8 g (fis) e8 |
|
||||
fis4 b,8 b4 b8 |
|
||||
b'4 b8 b (a) g |
|
||||
a4 d,8 d4 d8 |
|
||||
b8 (d) g b-^ (c-^) d-^ |
|
||||
d4.\> (e,8\fermata\!) r c'^"langsamer" |
|
||||
b8 (d,) b' a\< (d\fermata) fis,\!\> |
|
||||
g4. (g8\!) r \bar "|."
|
||||
}
|
||||
|
||||
verseOne = \lyricmode {
|
||||
In je -- dem vol -- len |
|
||||
Gla -- se Wein seh |
|
||||
un -- ten auf dem |
|
||||
Grund ich |
|
||||
dei -- ne hel -- len |
|
||||
Äu -- ge -- lein, ich |
|
||||
dei -- ne hel -- len |
|
||||
Äu -- ge -- lein und |
|
||||
dei -- nen sü -- ssen |
|
||||
Mund, und |
|
||||
dei -- nen sü -- ssen |
|
||||
Mund. |
|
||||
}
|
||||
|
||||
\book {
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
\new Lyrics \lyricsto "one" {
|
||||
\verseOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\book {
|
||||
\bookOutputName "in_jedem_vollen_glase_wein_score"
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
|
||||
\score {
|
||||
\unfoldRepeats \articulate
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\midi {
|
||||
\tempo 4 = 100
|
||||
}
|
||||
}
|
||||
}
|
88
src/scores/lindenwirtin.ly
Normal file
88
src/scores/lindenwirtin.ly
Normal file
@ -0,0 +1,88 @@
|
||||
\version "2.18.2"
|
||||
\include "articulate.ly"
|
||||
|
||||
\header {
|
||||
title = "Die Lindenwirtin"
|
||||
composer = "Franz Abt, 1878"
|
||||
poet = "In gemütlicher Bewegung"
|
||||
tagline = ""
|
||||
}
|
||||
|
||||
musicOne = \relative a' {
|
||||
\time 6/8
|
||||
\key d \major
|
||||
|
||||
a4\mf a8 a8. (g16) fis8 |
|
||||
b4 b8 b4. |
|
||||
b4 b8 d8. (g,16) b8 |
|
||||
b4 a8 a4. |
|
||||
a4\< e8 e (a) cis\! |
|
||||
b4.\> a4\! r8 |
|
||||
g4\p g8 g8. (fis16) e8 |
|
||||
fis4\< a8 d4.\! |
|
||||
g,4\p\< g8 g8. (fis16) e8\! |
|
||||
fis4 a8 d4. |
|
||||
d4\f cis8 e8. (d16) b 8 |
|
||||
b4. a4 r8 |
|
||||
a4\p a8 b8. (a16) fis8 |
|
||||
a4. (cis) |
|
||||
d4 r8 r4 r8 \bar "|."
|
||||
}
|
||||
|
||||
verseOne = \lyricmode {
|
||||
Kei -- nen Tropfen im |
|
||||
Be -- cher mehr |
|
||||
und der Beu -- tel |
|
||||
schlaff und leer, |
|
||||
lech -- zend Herz und |
|
||||
Zun -- ge. |
|
||||
An -- ge -- tan hat |
|
||||
mir's dein Wein, |
|
||||
dei -- ner Äug -- lein |
|
||||
hel -- ler Schein, |
|
||||
Lin -- den -- wirtin, du |
|
||||
jun -- ge |
|
||||
Lin -- den -- wirtin, du |
|
||||
jun -- |
|
||||
ge! |
|
||||
}
|
||||
|
||||
\book {
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
\new Lyrics \lyricsto "one" {
|
||||
\verseOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\book {
|
||||
\bookOutputName "lindenwirtin_score"
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
|
||||
\score {
|
||||
\unfoldRepeats \articulate
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\midi {
|
||||
\tempo 4 = 100
|
||||
}
|
||||
}
|
||||
}
|
91
src/scores/viel_volle_becher.ly
Normal file
91
src/scores/viel_volle_becher.ly
Normal file
@ -0,0 +1,91 @@
|
||||
\version "2.18.2"
|
||||
\include "articulate.ly"
|
||||
|
||||
\header {
|
||||
title = "Viel volle Becher"
|
||||
composer = "Otto Lob, 1896"
|
||||
poet = "Langsam"
|
||||
tagline = ""
|
||||
}
|
||||
|
||||
musicOne = \relative es' {
|
||||
\time 6/8
|
||||
\key f \minor
|
||||
|
||||
\partial 8 es8 \mf |
|
||||
aes4 aes8 c (bes) aes |
|
||||
g4. f4 f8 |
|
||||
bes4 bes8 des (c) bes |
|
||||
aes4. g4 bes8 |
|
||||
bes4 bes8 bes c d |
|
||||
es4. (g,4) g8 |
|
||||
f4^"zögernd" f8 aes4 g8 |
|
||||
es4. (es8) r es^"im Zeitmass" |
|
||||
bes'4 bes8 des (c) bes |
|
||||
aes4. es4 es8 |
|
||||
c'4 c8 es (des) c |
|
||||
c4. bes4 bes8 |
|
||||
bes4 des8 c4 bes8^"zögernd" |
|
||||
es4. (es,4\fermata) es8\p^"verhallend" |
|
||||
f4 g8 c4 bes8 |
|
||||
aes4. (aes8) r4 \bar "|."
|
||||
}
|
||||
|
||||
verseOne = \lyricmode {
|
||||
Viel vol -- le Be -- cher |
|
||||
klan -- gen, viel |
|
||||
hel -- le Stim -- men |
|
||||
san -- gen vor |
|
||||
uns in die -- _ sem |
|
||||
Raum, vor |
|
||||
uns in die -- sem |
|
||||
Raum. Doch |
|
||||
Klang und Sang ver -- |
|
||||
hall -- ten, ver -- |
|
||||
weht sind die Ge -- |
|
||||
stal -- ten, und |
|
||||
al -- les war ein |
|
||||
Traum! Und |
|
||||
al -- les war ein |
|
||||
Traum! |
|
||||
}
|
||||
|
||||
\book {
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
\new Lyrics \lyricsto "one" {
|
||||
\verseOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\book {
|
||||
\bookOutputName "viel_volle_becher_score"
|
||||
\score {
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\layout {
|
||||
}
|
||||
}
|
||||
|
||||
\score {
|
||||
\unfoldRepeats \articulate
|
||||
<<
|
||||
\new Voice = "one" {
|
||||
\musicOne
|
||||
}
|
||||
>>
|
||||
\midi {
|
||||
\tempo 4 = 100
|
||||
}
|
||||
}
|
||||
}
|
75
src/templates/book.j2
Normal file
75
src/templates/book.j2
Normal file
@ -0,0 +1,75 @@
|
||||
% !Mode:: "TeX:UTF-8"
|
||||
|
||||
\documentclass[9pt, a5paper, openany]{scrbook}
|
||||
|
||||
\usepackage{fontspec}
|
||||
\usepackage{lmodern}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{geometry}
|
||||
\usepackage{tgschola}
|
||||
\usepackage{tocloft}
|
||||
\usepackage[unicode]{hyperref}
|
||||
\usepackage{lyluatex}
|
||||
|
||||
\makeatletter
|
||||
\newcommand{\unchapter}[1]{%
|
||||
\begingroup
|
||||
\let\@makechapterhead\@gobble % make \@makechapterhead do nothing
|
||||
\chapter{#1}
|
||||
\endgroup
|
||||
}
|
||||
|
||||
\makeatother
|
||||
|
||||
\setlength{\headheight}{15pt}
|
||||
|
||||
\pagestyle{fancy}
|
||||
\renewcommand{\chaptermark}[1]{ \markboth{#1}{} }
|
||||
\renewcommand{\sectionmark}[1]{ \markright{#1}{} }
|
||||
|
||||
\fancyhf{}
|
||||
\fancyhead[LE,RO]{\thepage}
|
||||
\fancyhead[RE]{\textit{ \nouppercase{\leftmark}} }
|
||||
\fancyhead[LO]{\textit{ \nouppercase{\rightmark}} }
|
||||
|
||||
\fancypagestyle{plain}{
|
||||
\fancyhf{}
|
||||
\fancyhead[LE,RO]{\thepage}
|
||||
\fancyhead[RE]{\textit{ \nouppercase{Vivat Alcolica!}} }
|
||||
\fancyhead[LO]{\textit{ \nouppercase{Vivat Alcolica!}} }
|
||||
}
|
||||
|
||||
\geometry{a5paper,left=20mm,right=20mm, top=3cm, bottom=3cm}
|
||||
|
||||
\renewcommand\addchaptertocentry[2]{\addtocentrydefault{chapter}{}{#2}}
|
||||
\renewcommand{\contentsname}{Inhalt}
|
||||
\renewcommand{\cfttoctitlefont}{\huge\textbf\rmfamily}
|
||||
\renewcommand{\cftchapfont}{\large\rmfamily}
|
||||
|
||||
\begin{document}
|
||||
\begin{titlepage}
|
||||
\begin{center}
|
||||
\rule{\linewidth}{0.5mm} \\[0.4cm]
|
||||
{ \huge \bfseries Vivat Alcolica!}
|
||||
|
||||
\rule{\linewidth}{0.5mm} \\[1.5cm]
|
||||
\end{center}
|
||||
|
||||
\end{titlepage}
|
||||
|
||||
\pagenumbering{Roman}
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\newpage
|
||||
|
||||
((* for score in scores *))
|
||||
\unchapter{((( score.title )))}
|
||||
|
||||
\includely[staffsize=14]{((( score.score )))}
|
||||
~\\
|
||||
~\\
|
||||
\input{((( score.lyrics )))}
|
||||
((* endfor *))
|
||||
|
||||
\end{document}
|
20
src/templates/score_lyrics.j2
Normal file
20
src/templates/score_lyrics.j2
Normal file
@ -0,0 +1,20 @@
|
||||
% !Mode:: "TeX:UTF-8"
|
||||
|
||||
\documentclass[9pt, a5paper, openany]{scrbook}
|
||||
|
||||
\usepackage{fontspec}
|
||||
\usepackage{lmodern}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage[unicode]{hyperref}
|
||||
\usepackage{lyluatex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\pagenumbering{gobble}
|
||||
|
||||
\includely[staffsize=18]{((( score_file )))}
|
||||
~\\
|
||||
~\\
|
||||
\input{((( lyrics_file )))}
|
||||
|
||||
\end{document}
|
23
src/tools/templater.py
Executable file
23
src/tools/templater.py
Executable file
@ -0,0 +1,23 @@
|
||||
#! /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)
|
170
waf
vendored
Executable file
170
waf
vendored
Executable file
File diff suppressed because one or more lines are too long
178
wscript
Normal file
178
wscript
Normal file
@ -0,0 +1,178 @@
|
||||
#! /usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from functools import reduce
|
||||
from waflib import TaskGen
|
||||
|
||||
APPNAME = 'kommersbuch'
|
||||
VERSION = '1.0'
|
||||
|
||||
top = '.'
|
||||
out = 'build'
|
||||
src = 'src'
|
||||
lib = 'lib'
|
||||
src_scores = os.path.join(src, 'scores')
|
||||
src_lyrics = os.path.join(src, 'lyrics')
|
||||
built_lyrics_path = os.path.abspath(os.path.join(out, src, 'lyrics'))
|
||||
built_scores_path = os.path.abspath(os.path.join(out, src, 'scores'))
|
||||
templater_path = os.path.abspath(os.path.join(src, 'tools/templater.py'))
|
||||
score_lyrics_template_path = os.path.abspath(
|
||||
os.path.join(src, 'templates', 'score_lyrics.j2'))
|
||||
book_template_path = os.path.abspath(
|
||||
os.path.join(src, 'templates', 'book.j2'))
|
||||
|
||||
|
||||
def dist(ctx):
|
||||
ctx.excl = '**/.waf* **/*~ **/*.pyc **/*.swp **/.lock* out pdf midi music .git .DS_Store'
|
||||
|
||||
|
||||
def configure(ctx):
|
||||
ctx.find_program('lualatex', var='LUALATEX')
|
||||
ctx.find_program('lilypond', var='LILYPOND')
|
||||
ctx.find_program('timidity', var='TIMIDITY')
|
||||
ctx.find_program('opusenc', var='OPUSENC')
|
||||
|
||||
|
||||
def pre(ctx):
|
||||
os.system('mkdir -p {1} && cp -r {0}/* {1}'.format(lib, built_lyrics_path))
|
||||
|
||||
TaskGen.declare_chain(
|
||||
name='opus',
|
||||
rule='${TIMIDITY} ${SRC} -Ow -o - | ${OPUSENC} - ${TGT}',
|
||||
ext_in='.midi',
|
||||
ext_out='.opus',
|
||||
shell=True)
|
||||
|
||||
|
||||
def build(ctx):
|
||||
ctx.add_pre_fun(pre)
|
||||
|
||||
ctx.add_group('lilypond')
|
||||
ctx.add_group('opus')
|
||||
ctx.add_group('book')
|
||||
|
||||
lilypond_rule = '${LILYPOND} -o ${TGT[0].abspath().replace(".pdf", "")} ${SRC}'
|
||||
lyrics_template_rule = templater_path + ' ' + \
|
||||
score_lyrics_template_path + ' "{0}" > ${{TGT}}'
|
||||
book_template_rule = templater_path + ' ' + \
|
||||
book_template_path + ' "{0}" > ${{TGT}}'
|
||||
lyrics_combined_rule = 'cd ' + built_lyrics_path + \
|
||||
' && ${LUALATEX} --shell-escape '
|
||||
|
||||
scoredata = []
|
||||
scores = ctx.path.ant_glob(src_scores + '/*.ly')
|
||||
for score in scores:
|
||||
filename = os.path.basename(score.abspath())
|
||||
|
||||
lyricsfile = os.path.join(src_lyrics, filename.replace('.ly', '.tex'))
|
||||
lilyfile = filename.replace('.ly', '.pdf')
|
||||
lily_score_file = '{0}_score.pdf'.format(
|
||||
lilyfile.replace('.pdf', ''))
|
||||
lily_midi_file = lilyfile.replace('.pdf', '_score.midi')
|
||||
target_files = '{0} {1} {2}'.format(
|
||||
os.path.join(src_scores, lilyfile),
|
||||
os.path.join(src_scores, lily_score_file),
|
||||
os.path.join(src_scores, lily_midi_file))
|
||||
|
||||
score_content = ''
|
||||
with open(score.abspath(), 'r') as f:
|
||||
score_content = f.read()
|
||||
|
||||
matches = re.findall('title = "(.*)"', score_content)
|
||||
score_title = matches[0]
|
||||
|
||||
scoredata.append(
|
||||
{'title': score_title,
|
||||
'score': score.abspath(),
|
||||
'lyrics': os.path.abspath(lyricsfile)})
|
||||
|
||||
ctx.set_group('lilypond')
|
||||
|
||||
# score without lyrics & midi
|
||||
|
||||
ctx(
|
||||
rule=lilypond_rule,
|
||||
source=score,
|
||||
target=target_files,
|
||||
shell=True
|
||||
)
|
||||
|
||||
# score with lyrics
|
||||
|
||||
template_data = {
|
||||
'score_file': score.abspath(),
|
||||
'lyrics_file': os.path.abspath(lyricsfile)
|
||||
}
|
||||
|
||||
lyrics_rule = lyrics_template_rule.format(str(template_data))
|
||||
built_lyricsfile = os.path.join(
|
||||
src_lyrics,
|
||||
filename.replace('.ly', '_built.tex'))
|
||||
|
||||
ctx(
|
||||
rule=lyrics_rule,
|
||||
source=lyricsfile,
|
||||
target=built_lyricsfile,
|
||||
shell=True
|
||||
)
|
||||
|
||||
final_lyrics_path = os.path.join(
|
||||
built_scores_path, filename.replace('.ly', '_lyrics.pdf'))
|
||||
|
||||
lyrics_combined_rule_final = lyrics_combined_rule + \
|
||||
filename.replace('.ly', '_built.tex') + \
|
||||
' && cp ' + filename.replace('.ly', '_built.pdf') + \
|
||||
' ' + final_lyrics_path
|
||||
|
||||
ctx(
|
||||
rule=lyrics_combined_rule_final,
|
||||
source=score.relpath() + ' ' + built_lyricsfile,
|
||||
target=os.path.join(
|
||||
src_scores, filename.replace('.ly', '_lyrics.pdf')),
|
||||
shell=True
|
||||
)
|
||||
|
||||
# opus
|
||||
|
||||
ctx.set_group('opus')
|
||||
ctx(source=os.path.join(src_scores, lily_midi_file))
|
||||
|
||||
# booklet
|
||||
|
||||
template_data = {
|
||||
'scores': scoredata,
|
||||
}
|
||||
|
||||
book_rule = book_template_rule.format(str(template_data))
|
||||
built_bookfile = os.path.join(src_lyrics, 'book.tex')
|
||||
|
||||
ctx.set_group('book')
|
||||
ctx(
|
||||
rule=book_rule,
|
||||
source=os.path.relpath(book_template_path),
|
||||
target=built_bookfile,
|
||||
shell=True
|
||||
)
|
||||
|
||||
final_book_path = os.path.join(built_scores_path, 'book.pdf')
|
||||
book_combined_rule_final = lyrics_combined_rule + \
|
||||
'book.tex' + \
|
||||
' && cp book.pdf' + \
|
||||
' ' + final_book_path
|
||||
|
||||
book_sources = os.path.relpath(book_template_path)
|
||||
for score in scoredata:
|
||||
book_sources = '{0} {1} {2}'.format(
|
||||
book_sources,
|
||||
os.path.relpath(score['score']),
|
||||
os.path.relpath(score['lyrics']))
|
||||
|
||||
ctx(
|
||||
rule='{0} && {0}'.format(book_combined_rule_final),
|
||||
source=book_sources,
|
||||
target=os.path.join(src_scores, 'book.pdf'),
|
||||
shell=True
|
||||
)
|
Loading…
Reference in New Issue
Block a user