diff --git a/NEWS b/NEWS index f48205e8..7efe1cfb 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,45 @@ +version 3.5.6 + +Dimitri Delporte: + Belyscendre - Hélas madame + Francis Cabrel - La corrida +Romain Goffe: + The Bloody Irish Boys - Drunk tonight + Jacques Dutronc - La fille du Père Noël +broph: + Calvin Russel - Down down down +olivier desrobert: + : Debout sur le zinc - J'ai déjà donné + : Debout sur le zinc - Comme un frisson + : Debout sur le Zinc + : Debout sur le zinc - Elle m'ennuie + : Debout sur le zinc - les angles + +version 3.5.5 + +Kaosun: + Thomas Fersen - Bambi + Thomas Fersen - Croque + Thomas Fersen - Irène + Thomas Fersen - L'histoire d'une heure + Thomas Fersen - Les cravates + Thomas Fersen - Louise + Gary Jules - Mad world + Les Fatals Picards - Au mariage de Kévin et de ma soeur + Thomas Fersen - Rititi, ratata + Thomas Fersen - Le bouton + Anis - Dans tes yeux + Les Cowboys Fringants - Ces temps-ci + Le clandestin - Rue Grenelle + Jali - Española + La rue kétanou - Sao Loucas + Les Cowboys Fringants - 8 secondes + Debout sur le Zinc - Scylla +Romain Goffe: + Les Booze Brothers - Fields of Athenry + The Dubliners - The wild rover + version 3.5.4 BeXa: Jeanne Moreau - Les mots de rien @@ -57,7 +98,7 @@ Romain Goffe: broph: Jean-Pierre Mader - Macumba Noir Désir - Les écorchés - Louis Bertignac - Ces idées là + Louis Bertignac - Ces idées là  Rita Mitsouko - C'est comme ça Calvin Russel - Baby I love you Calvin Russel - Crossroad @@ -216,7 +257,7 @@ songbook (v0.8) The Rolling Stones - Angie The Rolling Stones - Ruby Tuesday Simon & Garfunkel - Me and Julio down by the schoolyard - Georges Brassens - À l'ombre du cÅ“ur de ma mie + Georges Brassens - À l'ombre du coeur de ma mie Georges Brassens - Je me suis fait tout petit Yuki Kajiura - Jr Crep - Kartopo @@ -247,7 +288,7 @@ songbook (v0.8) Mes souliers sont rouges - Sortis du bois Les Ogres de Barback - L'ennui et le jour Gogol Bordello - Supertheory of supereverything - Tri Yann - Les filles de Redon + update cover + Tri Yann - Les filles de Redon Tri Yann - Kiss the children for me Mary Les Fatals Picards - Goldorak est mort Charles Aznavour - Les comédiens @@ -290,7 +331,7 @@ songbook (v0.8) Les hurlements d'Léo - Une danseuse Les hurlements d'Léo - À bout d'souffle Jacques Brel - Amsterdam - Jacques Brel - Ces gens-là + Jacques Brel - Ces gens-là  Jacques Brel - La valse à mille temps Cookie Dingler - Femme libérée Jacques Higelin - Poil dans la main diff --git a/books/naheulbeuk.sb b/books/naheulbeuk.sb index e2e4e0a0..8b9930f7 100644 --- a/books/naheulbeuk.sb +++ b/books/naheulbeuk.sb @@ -15,6 +15,7 @@ "title" : "Le Donjon de Naheulbeuk", "version" : "0.4.1", "songs" : [ + "Belyscendre/Helas_madame.sg", "Belyscendre/Mon_pere_veut_me_marier.sg", "Belyscendre/Prends_garde_au_loup.sg", "Le_Donjon_de_Naheulbeuk/10_sous_dans_ma_poche.sg", diff --git a/books/volume-1.sb b/books/volume-1.sb index 2709b61c..8dc3899a 100644 --- a/books/volume-1.sb +++ b/books/volume-1.sb @@ -7,8 +7,9 @@ "pictures" ], "booktype" : "chorded", +"picture" : "feel-the-music", +"picturecopyright" : "foxygamergirl @ deviantart.com", "subtitle" : "Tome 1", -"title" : "Recueil de chansons pour guitare", "songs" : [ "Alain_Bashung/Gaby_oh_gaby.sg", "Amy_MacDonald/Mr._Rock_n_Roll.sg", diff --git a/books/volume-5.sb b/books/volume-5.sb new file mode 100644 index 00000000..829eddbb --- /dev/null +++ b/books/volume-5.sb @@ -0,0 +1,44 @@ +{ +"template" : "patacrep.tmpl", +"lang" : "french", +"bookoptions" : [ + "diagram", + "lilypond", + "pictures" + ], +"booktype" : "chorded", +"picture" : "The_Music_Machine_by_hit_squad", +"picturecopyright" : "hit-squad @ deviantart.com", +"subtitle" : "Tome 5", +"songs" : [ + "Anis/Dans_tes_yeux.sg", + "Belyscendre/Helas_madame.sg", + "Calvin_Russell/Down_down_down.sg", + "Debout_Sur_Le_Zinc/Comme_un_frisson.sg", + "Debout_Sur_Le_Zinc/Elle_m_ennuie.sg", + "Debout_Sur_Le_Zinc/J_ai_deja_donne.sg", + "Debout_Sur_Le_Zinc/Les_angles.sg", + "Debout_Sur_Le_Zinc/Scylla.sg", + "Debout_Sur_Le_Zinc/Sur_le_fil.sg", + "Francis_Cabrel/La_corrida.sg", + "Gary_Jules/Mad_world.sg", + "Jacques_Dutronc/La_fille_du_Pere_Noel.sg", + "Jali/Espanola.sg", + "La_Rue_Ketanou/Sao_loucas.sg", + "Le_clandestin/Rue_Grenelle.sg", + "Les_Booze_Brothers/Fields_of_Athenry.sg", + "Les_Cowboys_Fringants/8_secondes.sg", + "Les_Cowboys_Fringants/Ces_temps_ci.sg", + "Les_Fatals_Picards/Au_mariage_de_Kevin_et_de_ma_soeur.sg", + "The_Bloody_Irish_Boys/Drunk_tonight.sg", + "The_Dubliners/The_wild_rover.sg", + "Thomas_Fersen/Bambi.sg", + "Thomas_Fersen/Croque.sg", + "Thomas_Fersen/Irene.sg", + "Thomas_Fersen/Le_bouton.sg", + "Thomas_Fersen/Les_cravates.sg", + "Thomas_Fersen/L_histoire_d_une_heure.sg", + "Thomas_Fersen/Louise.sg", + "Thomas_Fersen/Rititi_ratata_il_parait_qu_elles_aiment_.sg", + "Yves_Simon/Les_bateaux_du_metro.sg"] +} diff --git a/img/The_Music_Machine_by_hit_squad.jpg b/img/The_Music_Machine_by_hit_squad.jpg new file mode 100644 index 00000000..e59148a2 Binary files /dev/null and b/img/The_Music_Machine_by_hit_squad.jpg differ diff --git a/makefile b/makefile index e9a681b4..dfc8af3f 100644 --- a/makefile +++ b/makefile @@ -24,6 +24,8 @@ PDF = $(TARGETS:%=%.pdf) CHORDS = chords.tex CHORDS_SRC = $(shell ls songs/*/*.sg) +DATE = $(shell date +%d)-$(shell date +%m)-$(shell date +%Y) + PRINT=printf "%s\n" PRINTTAB=printf "\t%s\n" @@ -40,10 +42,7 @@ else LILYFILE=$(LILY_SRC:%.ly=%.pdf) endif - LATEX=pdflatex $(LATEX_OPTIONS) -STAFF = "Staff" -#STAFF = "TabStaff" ############################################################ ### Targets @@ -61,7 +60,6 @@ clean: $(TARGETS:%=%.toc) $(TARGETS:%=%.out) $(TARGETS:%=%.log) \ $(TARGETS:%=%.nav) $(TARGETS:%=%.snm) @rm -f *.sbx *.sxd *.sxc - @rm -f lilypond/*.ps @rm -f *.pyc cleanall: clean @@ -88,11 +86,23 @@ $(PDF): %.pdf: %.tex %.aux $(MAKE_SONGBOOK) -s $< -d -o $@ %.pdf: %.ly - @$(LILYPOND) --format=pdf -e '(define-public songbookstaff $(STAFF))' --output=$(@:%.pdf=%) $< + @$(LILYPOND) --format=pdf -e '(define-public songbookstaff "$(SONGBOOKSTAFF)")' --output=$(@:%.pdf=%) $< $(CHORDS): $(CHORDS_SRC) $(MAKE_CHORDS) -o $@ +archive: clean + tar -czvf songbook-$(DATE).tar.gz \ + --exclude=*pdf \ + --exclude=.git --exclude=.gitignore \ + --exclude=$(BOOKS_DIR)/default.sb \ + --exclude=perso/* --exclude=perso \ + --exclude=build/* --exclude=build \ + --exclude=covers/* --exclude=covers \ + --exclude=data/* --exclude=data \ + --exclude=*tar.gz \ + ../songbook + ifeq (.pdf,$(suffix $(MAKECMDGOALS))) include $(MAKECMDGOALS:%.pdf=%.d) else ifneq ($(MAKECMDGOALS),clean) diff --git a/songbook.py b/songbook.py index 1c874c5e..0b074937 100755 --- a/songbook.py +++ b/songbook.py @@ -9,13 +9,32 @@ import re import json import locale import sortindex +import shutil + +def copyCovers(): + ''' + Copy all covers found in songs/ hierarchy into a same folder. This + allows a much faster search for pdflatex since the \graphicspath + macro now only contains a single directory instead of quite a long + list to search through. + ''' + #create "covers/" directory if it does not exist + d = os.path.dirname("covers/") + if not os.path.exists(d): + os.makedirs(d) + + covers = list(set(glob.glob('songs/*/*.jpg'))) + for cover in covers: + f = "covers/" + os.path.basename(cover) + if(os.path.exists(f) == False): + shutil.copy(cover, f) def matchRegexp(reg, iterable): return [ m.group(1) for m in (reg.match(l) for l in iterable) if m ] def songslist(songs): directories = set(["img/"] + map(lambda x: "songs/" + os.path.dirname(x), songs)) - result = ['\\graphicspath{'] + [ ' {{{0}/}},'.format(d) for d in directories ] + ['}'] + [ '\\input{{songs/{0}}}'.format(s.strip()) for s in songs ] + result = [ '\\input{{songs/{0}}}'.format(s.strip()) for s in songs ] return '\n'.join(result) def parseTemplate(template): @@ -187,6 +206,8 @@ def main(): sb = json.load(f) f.close() + copyCovers() + if depend: makeDepend(sb, output) else: diff --git a/templates/ancient.tmpl b/templates/ancient.tmpl index 4cc7cf2a..30075990 100644 --- a/templates/ancient.tmpl +++ b/templates/ancient.tmpl @@ -30,8 +30,8 @@ %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, %%: {"name":"lang", "description":"Language", "default":"english"}, %%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","pictures","tabs"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, -%%: {"name":"version", "description":"Version", "default":"3.5.4"}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, +%%: {"name":"version", "description":"Version", "default":"3.5.6"}, %%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, %%: {"name":"mail", "description":"Email", "default":"crep@team-on-fire.com"}, @@ -67,9 +67,7 @@ \newindex{titleidx}{\getname_title} \newauthorindex{authidx}{\getname_auth} -\graphicspath{ - {img/}, -} +\graphicspath{ {covers/}, {img/} } \definecolor{SongNumberBgColor}{HTML}{\getsongnumberbgcolor} \definecolor{NoteBgColor}{HTML}{\getnotebgcolor} diff --git a/templates/minimal.tmpl b/templates/minimal.tmpl index 5829b75d..11ed5b16 100644 --- a/templates/minimal.tmpl +++ b/templates/minimal.tmpl @@ -28,7 +28,7 @@ %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, %%: {"name":"lang", "description":"Language", "default":"english"}, %%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs","pictures"], "join":",", "mandatory":true, "default":["pictures"]}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["pictures"]}, %%: {"name":"mainfontsize", "description":"Font Size", "type":"font", "default":"10"} %%:] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -40,19 +40,14 @@ \usepackage[portuguese,spanish,english,french]{babel} \lang{\getlang} +\graphicspath{ {covers/}, {img/} } -\newindex{titleidx}{\getname_title} -\newauthorindex{authidx}{\getname_auth} - -\graphicspath{ {img/} } - -%hide song number -\renewcommand{\printsongnum}[1]{} -\setlength{\songnumwidth}{0.1cm} +\nosongnumbers +\pagestyle{empty} \begin{document} -\begin{songs}{titleidx,authidx} +\begin{songs}{} \getsongslist \end{songs} diff --git a/templates/patacrep-en.tmpl b/templates/patacrep-en.tmpl index 97a06dc9..c0f4134f 100644 --- a/templates/patacrep-en.tmpl +++ b/templates/patacrep-en.tmpl @@ -30,8 +30,8 @@ %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, %%: {"name":"lang", "description":"Language", "default":"english"}, %%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","pictures","tabs"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, -%%: {"name":"version", "description":"Version", "default":"3.5.4"}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, +%%: {"name":"version", "description":"Version", "default":"3.5.6"}, %%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, %%: {"name":"mail", "description":"Email", "default":"crep@team-on-fire.com"}, @@ -67,9 +67,7 @@ \newindex{titleidx}{\getname_title} \newauthorindex{authidx}{\getname_auth} -\graphicspath{ - {img/}, -} +\graphicspath{ {covers/}, {img/} } \definecolor{SongNumberBgColor}{HTML}{\getsongnumberbgcolor} \definecolor{NoteBgColor}{HTML}{\getnotebgcolor} diff --git a/templates/patacrep.tmpl b/templates/patacrep.tmpl index 739bb493..1e6353f1 100644 --- a/templates/patacrep.tmpl +++ b/templates/patacrep.tmpl @@ -30,8 +30,8 @@ %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, %%: {"name":"lang", "description":"Language", "default":"french"}, %%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, -%%: {"name":"version", "description":"Version", "default":"3.5.4"}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, +%%: {"name":"version", "description":"Version", "default":"3.5.6"}, %%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, %%: {"name":"mail", "description":"Email", "default":"crep@team-on-fire.com"}, @@ -67,9 +67,7 @@ \newindex{titleidx}{\getname_title} \newauthorindex{authidx}{\getname_auth} -\graphicspath{ - {img/}, -} +\graphicspath{ {covers/}, {img/} } \definecolor{SongNumberBgColor}{HTML}{\getsongnumberbgcolor} \definecolor{NoteBgColor}{HTML}{\getnotebgcolor} diff --git a/tex/crepbook.cls b/tex/crepbook.cls index ab820be9..be5fc699 100644 --- a/tex/crepbook.cls +++ b/tex/crepbook.cls @@ -15,6 +15,7 @@ \newif{\ifnorepeatchords} \newif{\ifukulele} \newif{\ifguitar} +\newif{\ifonesongperpage} \tabsfalse \lilypondfalse @@ -24,6 +25,7 @@ \norepeatchordstrue \ukulelefalse \guitarfalse +\onesongperpagefalse % Options \DeclareOption{tabs}{\tabstrue} @@ -41,6 +43,7 @@ \DeclareOption{noukulele}{\ukulelefalse} \DeclareOption{guitar}{\guitartrue} \DeclareOption{noguitar}{\guitarfalse} +\DeclareOption{onesongperpage}{\onesongperpagetrue} \DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{article}} @@ -503,4 +506,20 @@ \fi }{}% +\ifonesongperpage% + \renewcommand\songcolumns[1]{% + \SB@cnt#1\relax% + \ifSB@preamble\else{\SB@clearpage}\fi% + \SB@numcols\SB@cnt% + \ifnum\SB@numcols>\z@% + \SB@colwidth-\columnsep% + \multiply\SB@colwidth\SB@numcols% + \advance\SB@colwidth\columnsep% + \advance\SB@colwidth\textwidth% + \divide\SB@colwidth\SB@numcols% + \else% + \ifrepchorus\SB@warnrc\fi% + \fi% + } +\fi \makeatother diff --git a/utils/header-last-volume b/utils/header-last-volume index 99d953b5..57e21525 100644 --- a/utils/header-last-volume +++ b/utils/header-last-volume @@ -7,7 +7,7 @@ "pictures" ], "booktype" : "chorded", -"picture" : "music_by_lauratheartist", -"picturecopyright" : "LauraTheArtist @ deviantart.com", -"subtitle" : "Tome 4", +"picture" : "The_Music_Machine_by_hit_squad", +"picturecopyright" : "hit-squad @ deviantart.com", +"subtitle" : "Tome 5", "songs" : [ diff --git a/utils/last-volume.sh b/utils/last-volume.sh index 1cba77c8..b123e6e5 100755 --- a/utils/last-volume.sh +++ b/utils/last-volume.sh @@ -14,42 +14,33 @@ cd songs ls -1 */*.sg > ../res1 cd .. -#get volume 1 list -tail -n +13 "$BOOKS_DIR/volume-1.sb" > tmp1 -head -n -2 tmp1 > list1 -sed -i -e "s/\",//g" -e "s/ \"//g" -e "s/\"//g" list1 +for i in 1 2 3 4 +do + #get volume i list + tail -n +14 "$BOOKS_DIR/volume-$i.sb" > tmp$i + head -n -2 tmp$i > list$i + sed -i -e "s/\",//g" -e "s/ \"//g" -e "s/\"//g" list$i -#remove volume 1 songs -grep -vf list1 res1 > res2 - -#get volume 2 list -tail -n +14 "$BOOKS_DIR/volume-2.sb" > tmp2 -head -n -2 tmp2 > list2 -sed -i -e "s/\",//g" -e "s/ \"//g" -e "s/\"//g" list2 - -#remove volume 2 songs -grep -vf list2 res2 > res3 - -#get volume 3 list -tail -n +14 "$BOOKS_DIR/volume-3.sb" > tmp3 -head -n -2 tmp3 > list3 -sed -i -e "s/\",//g" -e "s/ \"//g" -e "s/\"//g" list3 - -#remove volume 3 songs -grep -vf list3 res3 > res4 + #remove volume i songs + grep -vf list$i res$i > res$(($i+1)) +done #format song list -sed -i -e "s/^/ \"/g" -e "s/$/\",/g" res4 -head -c -2 res4 > res +sed -i -e "s/^/ \"/g" -e "s/$/\",/g" res$(($i+1)) +head -c -2 res$(($i+1)) > res -#make volume 4 sb file -cat utils/header-last-volume > "$BOOKS_DIR/volume-4.sb" -cat res >> "$BOOKS_DIR/volume-4.sb" -echo "]" >> "$BOOKS_DIR/volume-4.sb" -echo "}" >> "$BOOKS_DIR/volume-4.sb" +#make volume i+1 sb file +cat utils/header-last-volume > "$BOOKS_DIR/volume-$(($i+1)).sb" +cat res >> "$BOOKS_DIR/volume-$(($i+1)).sb" +echo "]" >> "$BOOKS_DIR/volume-$(($i+1)).sb" +echo "}" >> "$BOOKS_DIR/volume-$(($i+1)).sb" #remove tmp files -rm -f res res1 res2 res3 res4 list1 list2 list3 tmp1 tmp2 tmp3 +for i in 1 2 3 4 +do + rm -f res$i list$i tmp$i +done +rm -f res res$(($i+1)) export GREP_OPTIONS="$GREP" diff --git a/utils/release.sh b/utils/release.sh index c529f2b0..5a743e2b 100755 --- a/utils/release.sh +++ b/utils/release.sh @@ -54,20 +54,17 @@ fi; #build all songbooks rm -f *.d make cleanall -make naheulbeuk.pdf -make volume-1.pdf -make volume-2.pdf -make volume-3.pdf -make volume-4.pdf -make english.pdf -make french.pdf -make songbook.pdf -make lyricbook.pdf - -#clean -make clean - -./utils/tarball.sh +make -j 4 naheulbeuk.pdf +make -j 4 volume-1.pdf +make -j 4 volume-2.pdf +make -j 4 volume-3.pdf +make -j 4 volume-4.pdf +make -j 4 volume-5.pdf +make -j 4 english.pdf +make -j 4 french.pdf +make -j 4 songbook.pdf +make -j 4 lyricbook.pdf +make -j 4 archive git status @@ -76,7 +73,7 @@ then ./utils/new-songs-list.sh | cat - NEWS > /tmp/out && mv -f /tmp/out NEWS echo "\nversion $MAIN.$MAJOR.$MINOR\n" | cat - NEWS > /tmp/out && mv -f /tmp/out NEWS git add templates/*.tmpl - git add books/volume-4.sb NEWS + git add books/*.sb NEWS git commit -m "patacrep release version $MAIN.$MAJOR.$MINOR" git tag "patacrep_$MAIN.$MAJOR.$MINOR" fi diff --git a/utils/rules.py b/utils/rules.py index 5ab464b4..446052f1 100755 --- a/utils/rules.py +++ b/utils/rules.py @@ -12,6 +12,7 @@ re.LOCALE word_dic = { ##: oe inclusion "coeur": "cÅ“ur", +"choeur": "chÅ“ur", "boeuf": "bÅ“uf", "oeuvre": "Å“uvre", "soeur": "sÅ“ur", @@ -20,11 +21,17 @@ word_dic = { "voeu": "vÅ“u", "oeuf": "Å“uf", "oe{}": "Å“", -"\Å“": "Å“", +"\\Å“": "Å“", ##: Contractions "ptit": "p'tit", +"y'a": "y a", +"Y'a": "Y a", +"ptê": "p't'ê", +"p'tê": "p't'ê", +"p't-ê": "p't'ê", ##: Punctuation "’": "'", +"‘": "'", "Ca ": "Ça ", "...": "{\\dots}", "…": "{\\dots}", @@ -76,13 +83,13 @@ word_dic = { "/Mi": "/E", "/Fa": "/F", "/Sol": "/G", -"gtab{La": "gtab{A", -"gtab{Si": "gtab{B", -"gtab{Do": "gtab{C", -"gtab{Ré": "gtab{D", -"gtab{Mi": "gtab{E", -"gtab{Fa": "gtab{F", -"gtab{Sol": "gtab{G", +"tab{La": "tab{A", +"tab{Si": "tab{B", +"tab{Do": "tab{C", +"tab{Ré": "tab{D", +"tab{Mi": "tab{E", +"tab{Fa": "tab{F", +"tab{Sol": "tab{G", "\\[La": "\\[A", "\\[Si": "\\[B", "\\[Do": "\\[C", @@ -161,9 +168,9 @@ def language_rules(string): #ensure non-breaking spaces before symbols ? ! ; : string = re.sub("(?P\S)(?P[!?;:])","\g \g", string) #... except for gtabs macros with capos - string = re.sub("(?Pgtab.*)\s:","\g:", string) + string = re.sub("(?Ptab.?{.*)\s:","\g:", string) #and apply a second time for cases like \gtab{Gm}{10:X02210:} - string = re.sub("(?Pgtab.*)\s:","\g:", string) + string = re.sub("(?Ptab.?{.*)\s:","\g:", string) #ensure no spaces after symbols ( string = re.sub("(?P[\(])\s(?P\S)","\g\g", string) #convert inverted commas diff --git a/utils/tarball.sh b/utils/tarball.sh deleted file mode 100755 index b66cf929..00000000 --- a/utils/tarball.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -#Author: Romain Goffe -#Date: 13/10/2011 -#Description: Build a tarball from the songbook git repo - -#Copy songbook directory -cd $HOME -cp -RH songbook songbook-$(date +%d)-$(date +%m)-$(date +%Y); - -#Remove unecessary directories -cd songbook-$(date +%d)-$(date +%m)-$(date +%Y); -rm -rf perso/ ; -rm -rf build/ ; -rm -rf data/ ; -rm -rf .git/ ; -rm -f .gitignore ; -rm -f utils/send.sh ; -rm -f books/tmp.sb books/default.sb -rm -f default* - -#Clean tmp files -find . -name "*~" -or -name "#*#" -type f -exec rm -f {} \; -make cleanall - -#Tarball -cd $HOME -tar czvf songbook.tar.gz songbook-$(date +%d)-$(date +%m)-$(date +%Y) - -#Remove copy -rm -rf songbook-$(date +%d)-$(date +%m)-$(date +%Y)/