Generating sets works

This commit is contained in:
Eric Teunis de Boone 2017-09-25 00:04:23 +02:00
commit 0586677015
5 changed files with 440 additions and 0 deletions

322
example.tex Normal file
View file

@ -0,0 +1,322 @@
\newcommand{\tunesep}{ - }
\newcommand{\amountofcols}{6}
\newcommand{\seventeen}[1]{\textit{#1}}
\newcommand{\noscore}{ - }
\begin{table}[h!]
\centering
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{| r | l
| l %Pipes
| l %Bass
| l %Tenor
| l %Side
|}
\multicolumn{\amountofcols}{c}{ \textbf{Setlist 2017 Seaforth Highlanders of Holland }}
\\
\hline
Set & Titel
& Pipes %Pipes
& Bass %Bass
& Tenor %Tenor
& Snare %Side
\\%
\hline
1 & 4/4 \hyperref[4-4-marches-bonnie-galloway-pipes]{Bonnie Galloway}\tunesep\hyperref[4-4-marches-were-no-awa-tae-bide-awa-pipes]{We're No Awa Tae Bide Awa}
& \pageref{4-4-marches-bonnie-galloway-pipes}\tunesep\pageref{4-4-marches-were-no-awa-tae-bide-awa-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 4/4}%Tenor
& \hyperref[standards-24-44-standards.side]{Std. 4/4}%Side
\\ %
2 & 2/4 \hyperref[2-4-marches-high-road-to-gairloch-pipes]{High Road to Gairloch}\tunesep\hyperref[2-4-marches-brown-haired-maiden-pipes]{Brown Haired Maiden}\tunesep\hyperref[2-4-marches-mairis-wedding-pipes]{Mairi's Wedding}
& \pageref{2-4-marches-high-road-to-gairloch-pipes}\tunesep\pageref{2-4-marches-brown-haired-maiden-pipes}\tunesep\pageref{2-4-marches-mairis-wedding-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 2/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 2/4}%Tenor
& \hyperref[standards-24-44-standards.side]{Std. 2/4}%Side
\\%
3 & 3/4 \hyperref[3-4-marches-green-hills-pipes]{Green Hills of Tyrol} -\hyperref[3-4-marches-when-the-battle-pipes]{When the Battle is Over}\tunesep\hyperref[3-4-marches-my-land-pipes]{My Land}
& \pageref{3-4-marches-green-hills-pipes} -\pageref{3-4-marches-when-the-battle-pipes}\tunesep\pageref{3-4-marches-my-land-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 3/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 3/4}%Tenor
& \hyperref[standards-34-standards.side]{Std. 3/4}%Side
\\%
4 & 3/4 \hyperref[3-4-marches-collins-cattle-pipes]{Collin's Cattle}\tunesep\hyperref[3-4-marches-red-hackle-pipes]{Red Hackle}\tunesep\hyperref[3-4-marches-shoals-of-herring-pipes]{Shoals of Herring}
& \pageref{3-4-marches-collins-cattle-pipes}\tunesep\pageref{3-4-marches-red-hackle-pipes}\tunesep\pageref{3-4-marches-shoals-of-herring-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 3/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 3/4}%Tenor
& \hyperref[standards-34-standards.side]{Std. 3/4}%Side
\\%
5 & 4/4 \hyperref[4-4-marches-scotland-the-brave-pipes]{Scotland the Brave}\tunesep\hyperref[4-4-marches-wings-pipes]{Wings}\tunesep\hyperref[4-4-marches-rowan-tree-pipes]{Rowan Tree}\tunesep\hyperref[4-4-marches-scotland-the-brave-high-pipes]{Scotland the Brave(high)}
& \pageref{4-4-marches-scotland-the-brave-pipes}\tunesep\pageref{4-4-marches-wings-pipes}\tunesep\pageref{4-4-marches-rowan-tree-pipes}\tunesep\pageref{4-4-marches-scotland-the-brave-high-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 4/4}%Tenor
& \pageref{4-4-marches-scotland-the-brave-side}\tunesep\pageref{4-4-marches-wings-side}\tunesep\pageref{4-4-marches-rowan-tree-side}\tunesep\pageref{4-4-marches-scotland-the-brave-side}%Side
\\%
&
& %Pipes
& %Bass
& %Tenor
& %Side
\\%
6 & 4/4 \hyperref[4-4-marches-bonnie-lass-o-fyvie-pipes]{Bonnie Lass O'Fyvie}\tunesep\hyperref[4-4-marches-cockney-jocks-pipes]{Cockney Jocks}
& \pageref{4-4-marches-bonnie-lass-o-fyvie-pipes}\tunesep\pageref{4-4-marches-cockney-jocks-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 4/4}%Tenor
& \hyperref[standards-24-44-standards.side]{Std. 4/4}%Side
\\%
7 & 4/4 \hyperref[4-4-marches-51st-highland-division-pipes]{\nth{51} Highland Division}\tunesep\hyperref[4-4-marches-scotland-the-brave-high-pipes]{Scotland the Brave (high)}
& \pageref{4-4-marches-51st-highland-division-pipes}\tunesep\pageref{4-4-marches-scotland-the-brave-high-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \pageref{4-4-marches-51st-highland-division-tenor}\tunesep\hyperref[standards-standards.tenor]{Std. 4/4}%Tenor
& \pageref{4-4-marches-51st-highland-division-side}\tunesep\pageref{4-4-marches-scotland-the-brave-side}%Side
\\%
8 & 6/8 \hyperref[6-8-marches-10th-hli-crossing-the-rhine-pipes]{The \nth{10} Btn. HLI Crossing the Rhine}\tunesep{\hyperref[6-8-marches-farewell-to-the-creeks-pipes]{Farewell to the Creeks}}\tunesep\seventeen{\hyperref[6-8-marches-cock-o-the-north-pipes]{Cock o'the North}}\tunesep\seventeen{\hyperref[6-8-marches-glendaruel-highlanders-pipes]{Glendaruel Highlanders}}
& \pageref{6-8-marches-10th-hli-crossing-the-rhine-pipes}\tunesep\seventeen{\pageref{6-8-marches-farewell-to-the-creeks-pipes}}\tunesep\seventeen{\pageref{6-8-marches-cock-o-the-north-pipes}}\tunesep\seventeen{\pageref{6-8-marches-glendaruel-highlanders-pipes}}%Pipes
& \hyperref[standards-standards.bass]{Std. 6/8}%Bass
& \hyperref[standards-standards.tenor]{Std. 6/8}%Tenor
& \hyperref[standards-68-standards.side]{Std. 6/8}%Side
\\%
9 & 6/8 \hyperref[airs-the-mist-covered-mountains-pipes]{Mist Covered Mountains}\tunesep\hyperref[airs-my-home-pipes]{My Home}
& \pageref{airs-the-mist-covered-mountains-pipes}\tunesep\pageref{airs-my-home-pipes}%Pipes
& \pageref{airs-the-mist-covered-mountains-bass}\tunesep\pageref{airs-my-home-bass}%Bass
& \pageref{airs-the-mist-covered-mountains-tenor}\tunesep\pageref{airs-my-home-tenor}%Tenor
& \pageref{airs-the-mist-covered-mountains-side}\tunesep\pageref{airs-my-home-side}%Side
\\%
10 & 6/8 \hyperref[airs-morag-of-dunvegan-pipes]{Morag of Dunvegan}\tunesep4/4 Set 1
& \pageref{airs-morag-of-dunvegan-pipes}\tunesep4/4 Set 1%Pipes
& \hyperref[standards-standards.bass]{Std. 6/8}\tunesep\hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \pageref{airs-morag-of-dunvegan-tenor}\tunesep\hyperref[standards-standards.tenor]{Std. 4/4}%Tenor
& \pageref{airs-morag-of-dunvegan-side}\tunesep\hyperref[standards-24-44-standards.side]{Std. 4/4}%Side
\\%
&
& %Pipes
& %Bass
& %Tenor
& %Side
\\%
12 & 4/4 \hyperref[4-4-marches-the-leaving-of-liverpool-pipes]{The Leaving of Liverpool}\tunesep\hyperref[4-4-marches-the-old-rustic-bridge-pipes]{Old Rustic Bridge}
& \pageref{4-4-marches-the-leaving-of-liverpool-pipes}\tunesep\pageref{4-4-marches-the-old-rustic-bridge-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \pageref{4-4-marches-the-leaving-of-liverpool-tenor}\tunesep\pageref{4-4-marches-the-old-rustic-bridge-tenor}%Tenor
& \pageref{4-4-marches-the-leaving-of-liverpool-side}\tunesep\hyperref[standards-24-44-standards.side]{Std. 4/4}%Side
\\%
13 & 3/4 \seventeen{\hyperref[3-4-marches-torosay-castle-pipes]{Torosay Castle}}\tunesep\hyperref[3-4-marches-lochanside-pipes]{Lochanside}\tunesep\hyperref[3-4-marches-pipe-major-jk-cairns-pipes]{PM JK Cairns}\tunesep\seventeen{\hyperref[3-4-marches-jim-thomson-of-flagstaff-pipes]{Jim Thomson of Flagstaff}}
& \pageref{3-4-marches-torosay-castle-pipes}\tunesep\pageref{3-4-marches-lochanside-pipes}\tunesep\pageref{3-4-marches-pipe-major-jk-cairns-pipes}\tunesep\pageref{3-4-marches-jim-thomson-of-flagstaff-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 3/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 3/4}%Tenor
& \hyperref[standards-34-standards.side]{Std. 3/4}%Side
\\%
14 & 4/4 \hyperref[4-4-marches-minstrel-boy-pipes]{Minstrel Boy}\tunesep2/4 \hyperref[2-4-marches-pipers-cave-pipes]{The Pipers Cave}
& \pageref{4-4-marches-minstrel-boy-pipes}\tunesep\pageref{2-4-marches-pipers-cave-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}\tunesep\hyperref[standards-standards.bass]{Std. 2/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 4/4}\tunesep\hyperref[standards-standards.tenor]{Std. 2/4}%Tenor
& \hyperref[standards-24-44-standards.side]{Std. 4/4}\tunesep\hyperref[standards-24-44-standards.side]{Std. 2/4}%Side
\\%
15 & 3/4 \hyperref[3-4-marches-on-the-road-to-passchendaele-pipes]{On the Road to Passchendaele}\tunesep\hyperref[4-4-marches-hills-of-argyll-pipes]{4/4 The Hills of Argyll}
& \pageref{3-4-marches-on-the-road-to-passchendaele-pipes}\tunesep\pageref{4-4-marches-hills-of-argyll-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 3/4}\tunesep\hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 3/4}\tunesep\hyperref[standards-standards.tenor]{Std. 4/4}%Tenor
& \pageref{3-4-marches-on-the-road-to-passchendaele-side}\tunesep\hyperref[standards-24-44-standards.side]{Std. 4/4}%Side
\\%
&
& %Pipes
& %Bass
& %Tenor
& %Side
\\%
16 & 4/4 \hyperref[4-4-marches-flett-from-flotta-pipes]{Flett from Flotta}\tunesep\hyperref[4-4-marches-the-crusaders-march-pipes]{Crusader's March}\tunesep\hyperref[4-4-marches-the-pikemans-march-pipes]{Pikeman's March}
& \pageref{4-4-marches-flett-from-flotta-pipes}\tunesep\pageref{4-4-marches-the-crusaders-march-pipes}\tunesep\pageref{4-4-marches-the-pikemans-march-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 4/4}\tunesep\pageref{4-4-marches-the-crusaders-march-tenor}\tunesep\pageref{4-4-marches-the-pikemans-march-tenor}%Tenor
& \pageref{4-4-marches-flett-from-flotta-side}\tunesep\pageref{4-4-marches-the-crusaders-march-side}\tunesep\pageref{4-4-marches-the-pikemans-march-side}%Side
\\%
17 & 2/4 \hyperref[2-4-marches-teribus-pipes]{Teribus}\tunesep\hyperref[2-4-marches-corriechoillie-welcome-to-the-43rd-northern-meeting-pipes]{Corriechoillies \nth{43} Welcome to the Northern Meeting}\tunesep\seventeen{\hyperref[2-4-marches-barren-rocks-of-aden-pipes]{Barren Rocks of Aden}}
& \pageref{2-4-marches-teribus-pipes}\tunesep\pageref{2-4-marches-corriechoillie-welcome-to-the-43rd-northern-meeting-pipes}\tunesep\pageref{2-4-marches-barren-rocks-of-aden-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 2/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 2/4}%Tenor
& \hyperref[standards-24-44-standards.side]{Std. 2/4}%Side
\\%
18 & 2/4 \hyperref[2-4-marches-mackenzie-highlanders-pipes]{Mackenzie Highlanders}\tunesep\hyperref[2-4-marches-black-bear-pipes]{Black Bear}
& \pageref{2-4-marches-mackenzie-highlanders-pipes}\tunesep\pageref{2-4-marches-black-bear-pipes}%Pipes
& \pageref{2-4-marches-mackenzie-highlanders-bass}\tunesep\pageref{2-4-marches-black-bear-bass}%Bass
& \pageref{2-4-marches-mackenzie-highlanders-tenor}\tunesep\pageref{2-4-marches-black-bear-tenor}%Tenor
& \pageref{2-4-marches-mackenzie-highlanders-side}\tunesep\pageref{2-4-marches-black-bear-side}%Side
\\%
19 & Strathspeys: \hyperref[strathspeys-molly-connell-pipes]{Molly Connell}\tunesep\seventeen{\hyperref[strathspeys-keel-row-pipes]{Keel Row}}
& \pageref{strathspeys-molly-connell-pipes}\tunesep\pageref{strathspeys-keel-row-pipes}%Pipes
& \pageref{strathspeys-molly-connell-bass}\tunesep\pageref{strathspeys-keel-row-bass}%Bass
& \pageref{strathspeys-molly-connell-tenor}\tunesep\pageref{strathspeys-keel-row-tenor}%Tenor
& \pageref{strathspeys-molly-connell-side}\tunesep\pageref{strathspeys-keel-row-side}%Side
\\%
20 & 9/8 \seventeen{\hyperref[9-8-marches-heights-of-dargai-pipes]{Heights of Dargai}}\tunesep\seventeen{\hyperref[9-8-marches-battle-of-the-somme-pipes]{Battle of the Somme}}
& \pageref{9-8-marches-heights-of-dargai-pipes}\tunesep\pageref{9-8-marches-battle-of-the-somme-pipes}%Pipes
& \pageref{9-8-marches-heights-of-dargai-bass}\tunesep\pageref{9-8-marches-battle-of-the-somme-bass}%Bass
& \pageref{9-8-marches-heights-of-dargai-tenor}\tunesep\pageref{9-8-marches-battle-of-the-somme-tenor}%Tenor
& \hyperref[standards-98-standards.side]{Std. 9/8} %Side
\\%
&
& %Pipes
& %Bass
& %Tenor
& %Side
\\%
21 & 6/8 \hyperref[airs-alexander-mackenzie-pipes]{Alexander MacKenzie}
& \pageref{airs-alexander-mackenzie-pipes}%Pipes
& \pageref{airs-alexander-mackenzie-bass}%Bass
& \pageref{airs-alexander-mackenzie-tenor}%Tenor
& \pageref{airs-alexander-mackenzie-side}%Side
\\%
22 & 5/4 \hyperref[5-4-marches-cullen-bay-pipes]{Cullen Bay}
& \pageref{5-4-marches-cullen-bay-pipes}%Pipes
& \pageref{5-4-marches-cullen-bay-bass}%Bass
& \pageref{5-4-marches-cullen-bay-tenor}%Tenor
& \pageref{5-4-marches-cullen-bay-side}%Side
\\%
23 & 4/4 \seventeen{\hyperref[4-4-marches-cabar-feidh-pipes]{Cabar F\`eidh}}
& \pageref{4-4-marches-cabar-feidh-pipes}%Pipes
& \pageref{4-4-marches-cabar-feidh-bass}%Bass
& \pageref{4-4-marches-cabar-feidh-tenor}%Tenor
& \pageref{4-4-marches-cabar-feidh-side}%Side
\\%
24 & MSR: \hyperref[2-4-marches-mackenzie-highlanders-pipes]{MacKenzie Highlanders}\tunesep\hyperref[strathspeys-lady-mackenzie-of-fairburn-pipes]{Lady MacKenzie of Fairburn}\tunesep\seventeen{\hyperref[reels-jock-wilsons-ball-pipes]{Jock Wilson's Ball}}
& \pageref{2-4-marches-mackenzie-highlanders-pipes}\tunesep\pageref{strathspeys-lady-mackenzie-of-fairburn-pipes}\tunesep\pageref{reels-jock-wilsons-ball-pipes}%Pipes
& \pageref{2-4-marches-mackenzie-highlanders-bass}\tunesep\pageref{strathspeys-lady-mackenzie-of-fairburn-bass}\tunesep\pageref{reels-jock-wilsons-ball-bass}%Bass
& \pageref{2-4-marches-mackenzie-highlanders-tenor}\tunesep\pageref{strathspeys-lady-mackenzie-of-fairburn-tenor}\tunesep\pageref{reels-jock-wilsons-ball-tenor}%Tenor
& \pageref{2-4-marches-mackenzie-highlanders-side}\tunesep\pageref{strathspeys-lady-mackenzie-of-fairburn-side}\tunesep\pageref{reels-jock-wilsons-ball-side}%Side
\\%
25 & 6/8 \seventeen{\hyperref[6-8-marches-72nd-highlanders-pipes]{72nd Highlanders}}\tunesep\hyperref[6-8-marches-piobaireachd-of-donald-dubh-pipes]{Piobaireachd o'Donuil Dubh}
& \pageref{6-8-marches-72nd-highlanders-pipes}\tunesep\pageref{6-8-marches-piobaireachd-of-donald-dubh-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 6/8}%Bass
& \hyperref[standards-standards.tenor]{Std. 6/8}%Tenor
& \hyperref[standards-68-standards.side]{Std. 6/8}%Side
\\%
\hline
\multicolumn{\amountofcols}{|c|}{Losse Nummers}\\%
\hline
2/4 & \hyperref[2-4-marches-duncan-mcinness-side]{Duncan McInness}
& \noscore{}%Pipes
& \hyperref[standards-standards.bass]{Std. 2/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 2/4}%Tenor
& \pageref{2-4-marches-duncan-mcinness-side}%Side
\\%
3/4 & \hyperref[airs-amazing-grace-pipes]{Amazing Grace}
& \pageref{airs-amazing-grace-pipes}%Pipes
& \pageref{airs-amazing-grace-bass}%Bass
& \pageref{airs-amazing-grace-tenor}%Tenor
& \pageref{airs-amazing-grace-side}%Side
\\%
& \hyperref[3-4-marches-ballad-of-the-green-berets-pipes]{Ballad of the Green Berets}
& \pageref{3-4-marches-ballad-of-the-green-berets-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 3/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 3/4}%Tenor
& \pageref{3-4-marches-ballad-of-the-green-berets-side}%Side
\\%
& \hyperref[3-4-marches-balmoral-pipes]{Balmoral}
& \pageref{3-4-marches-balmoral-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 3/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 3/4}%Tenor
& \hyperref[standards-34-standards.side]{Std. 3/4}%Side
\\%
4/4 & \hyperref[airs-abide-with-me-pipes]{Abide With Me}
& \pageref{airs-abide-with-me-pipes}%Pipes
& \pageref{airs-abide-with-me-bass}%Bass
& \pageref{airs-abide-with-me-tenor}%Tenor
& \pageref{airs-abide-with-me-side}%Side
\\%
& \hyperref[4-4-marches-auld-lang-syne-pipes]{Auld Lang Syne}
& \pageref{4-4-marches-auld-lang-syne-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 4/4}%Tenor
& \hyperref[standards-44-standards.side]{Std. 4/4}%Side
\\%
& \seventeen{\hyperref[airs-bells-of-dunblane-pipes]{Bells of Dunblane}}
& \pageref{airs-bells-of-dunblane-pipes}%Pipes
& \pageref{airs-bells-of-dunblane-bass}%Bass
& \pageref{airs-bells-of-dunblane-tenor}%Tenor
& \pageref{airs-bells-of-dunblane-side}%Side
\\%
& \hyperref[4-4-marches-dawning-of-the-day-pipes]{Dawning of the Day}
& \pageref{4-4-marches-dawning-of-the-day-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 4/4}%Tenor
& \hyperref[standards-44-standards.side]{Std. 4/4}%Side
\\%
& \hyperref[airs-highland-cathedral-pipes]{Highland Cathedral}
& \pageref{airs-highland-cathedral-pipes}%Pipes
& \pageref{airs-highland-cathedral-bass}%Bass
& \pageref{airs-highland-cathedral-tenor}%Tenor
& \pageref{airs-highland-cathedral-side}%Side
\\%
& \seventeen{\hyperref[4-4-marches-la-baum-pipes]{La Baum}}
& \pageref{4-4-marches-la-baum-pipes}%Pipes
& \hyperref[standards-standards.bass]{Std. 4/4}%Bass
& \hyperref[standards-standards.tenor]{Std. 4/4}%Tenor
& \pageref{4-4-marches-la-baum-side}%Side
\\%
6/8 & \hyperref[airs-mull-of-kintyre-pipes]{Mull of Kintyre}
& \pageref{airs-mull-of-kintyre-pipes}%Pipes
& \pageref{airs-mull-of-kintyre-bass}%Bass
& \pageref{airs-mull-of-kintyre-tenor}%Tenor
& \pageref{airs-mull-of-kintyre-side}%Side
\\%
& \hyperref[jigs-seaforth-sticks-pipes]{Seaforth Sticks}
& \noscore{} %Pipes
& \pageref{jigs-seaforth-sticks-bass}%Bass
& \pageref{jigs-seaforth-sticks-tenor}%Tenor
& \pageref{jigs-seaforth-sticks-side}%Side
\\%
9/8 & \hyperref[9-8-marches-going-to-vancouver-hills-pipes]{Going to Vancouver Hills}
& \pageref{9-8-marches-going-to-vancouver-hills-pipes}%Pipes
& \pageref{9-8-marches-going-to-vancouver-hills-bass}%Bass
& \pageref{9-8-marches-going-to-vancouver-hills-tenor}%Tenor
& \hyperref[standards-98-standards.side]{Std. 9/8}%Side
\\%
\hline
\end{tabular}
\end{adjustbox}
\end{table}

65
gen_set.py Executable file
View file

@ -0,0 +1,65 @@
#!/usr/bin/env python3
import os
def generate_set(title=None, scores=None, copy=False, root=None):
"""Generate a new lilypond file containing all entries from scores, if copy is False, they will be 'linked'"""
if title is not None:
title = "\\header {\n\ttitle = \""+ title + "\"\n}\n"
else:
title = ""
scorestext = ""
for item in scores:
if item.startswith('std'):
continue
# item is always relative
if root is not None:
item = os.path.join(root, item)
if not os.path.exists(item):
continue
if copy is True:
with open(item, 'r') as f:
for line in f:
if line.startswith('\\include'):
incline = line.replace('\\include', '').strip('"\' ')
if os.path.isabs(incline): #already absolute
incline = os.path.join(os.path.abspath(os.path.dirname(item)), incline)
line = "\\include \""+incline+"\""
scorestext += line.replace('\r', '')+'\n'
else:
scorestext += '\\include \"' + os.path.join( os.path.abspath( os.curdir ) ,item) + '\"\n'
## Output
if scorestext == "":
return False
return """\\version \"2.19.65\"
"""+ title + """
\\paper {
#(define page-breaking ly:minimal-breaking)
}
%% Scores
""" + scorestext
if __name__ == "__main__":
from argparse import ArgumentParser
parser = ArgumentParser(__file__)
parser.add_argument('-c',dest='copy',action='store_true',default=False,help="Copy files instead of just linkingi")
parser.add_argument('-t',dest='title',help="Title for the set",default=None)
parser.add_argument('scores',nargs='+')
args = parser.parse_args()
print(generate_set(args.title, args.scores, args.copy))

26
sets2tex.py Executable file
View file

@ -0,0 +1,26 @@
#! /usr/bin/env python3
from tunes_db.tune import Tune
from tunes_db.sets import sets
from gen_set import generate_set
music_root = "/home/ericteunis/projects/pipeband-scoring/music/"
for tuneset in sets:
############################################
# Generate a pdf for each instrument from instrument array
############################################
title = "Set " + tuneset.setid + ": " + tuneset.name
print(title)
for instrument, scores in tuneset.instruments.items():
instrset = generate_set(title, scores, root=music_root)
############################################
# Save it into the texfile linking all scores
############################################
############################################
# Generate Table of Contents entry for setlist
############################################

26
tunes2tex.py Executable file
View file

@ -0,0 +1,26 @@
#! /usr/bin/env python3
from tunes_db.tune import Tune
from tunes_db.tunes import tunes
from gen_set import generate_set
music_root = "/home/ericteunis/projects/pipeband-scoring/music/"
for tune in tunes:
############################################
# Generate a pdf for each instrument from instrument array
############################################
print(tune.name)
for instrument, scores in tune.instruments.items():
instrset = generate_set(tune.name, scores, root=music_root)
############################################
# Save it into the texfile linking all scores
############################################
############################################
# Generate Table of Contents entry for setlist
############################################

1
tunes_db Symbolic link
View file

@ -0,0 +1 @@
/home/ericteunis/projects/tunes_db/