From e915bf307c1d43c8b9ccaf3af0033f0de878bea6 Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 2 Apr 2014 16:01:26 +0200 Subject: [PATCH 1/4] Suppression des variables inutiles Suite aux modifications sur les templates : https://github.com/patacrep/songbook-core/issues/18 --- books/naheulbeuk.sb | 3 ++- templates/data.tex | 28 ++++++---------------------- templates/naheulbeuk.tex | 23 ----------------------- 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/books/naheulbeuk.sb b/books/naheulbeuk.sb index 6de0cac9..f0436b72 100644 --- a/books/naheulbeuk.sb +++ b/books/naheulbeuk.sb @@ -20,5 +20,6 @@ "authwords" : { "sep" : ["and", "et"] }, - "datadir" : ".." + "datadir" : "..", + "notebgcolor" : "FFFDB3" } diff --git a/templates/data.tex b/templates/data.tex index 4a24cfc0..279aa52e 100644 --- a/templates/data.tex +++ b/templates/data.tex @@ -16,29 +16,13 @@ % along with this program; if not, write to the Free Software % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, % MA 02110-1301, USA. + (% variables %) -[ -{"name":"title", "description":"Title", "default":"Recueil de chansons pour guitare", "mandatory":true}, -{"name":"author", "description":"Author", "default":"The Songbook Team", "mandatory":true}, -{"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","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, -{"name":"version", "description":"Version", "default":"unknown"}, -{"name":"subtitle", "description":"Subtitle"}, -{"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, -{"name":"mail", "description":"Email", "default":"crep@team-on-fire.com"}, -{"name":"picture", "description":"Picture", "type":"file", "default":"treble_a"}, -{"name":"picturecopyright", "description":"Copyright", "default":"Dbolton \\url{http://commons.wikimedia.org/wiki/User:Dbolton}"}, -{"name":"footer", "description":"Footer", "default":"\\begin{flushright}Generated using Songbook (\\url{http://www.patacrep.com})\\end{flushright}"}, -{"name":"mainfontsize", "description":"Font Size", "type":"font", "default":"10"}, -{"name":"songnumberbgcolor", "description":"Number Shade", "type":"color", "default":"D1E4AE"}, -{"name":"notebgcolor", "description":"Note Shade", "type":"color", "default":"D1E4AE"}, -{"name":"indexbgcolor", "description":"Index Shade", "type":"color", "default":"D1E4AE"}, -{"name":"titleprefixwords", "description":"Ignore some words in the beginning of song titles"}, -{"name":"authwords", "descriptipn":"Set of options to process author string (LaTeX commands authsepword, authignoreword, authbyword)"}, -{"name":"languages", "description":"List of languages used by songs", "default":"english"} -] +{ +"version":{ "description": {"en": "Version", "fr": "Version"}, + "default": {"default": "3.7.2"} + } +} (% endvariables %) % begin document diff --git a/templates/naheulbeuk.tex b/templates/naheulbeuk.tex index 554e4c42..53161b20 100644 --- a/templates/naheulbeuk.tex +++ b/templates/naheulbeuk.tex @@ -17,29 +17,6 @@ % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, % MA 02110-1301, USA. -(% variables %) -[ -{"name":"title", "description":"Title", "default":"Recueil de chansons pour guitare", "mandatory":true}, -{"name":"author", "description":"Author", "default":"Crep (R. Goffe) \\and Lohrun (A. Dupas)", "mandatory":true}, -{"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","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, -{"name":"version", "description":"Version", "default":"3.7.2"}, -{"name":"subtitle", "description":"Subtitle"}, -{"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, -{"name":"mail", "description":"Email", "default":"crep@team-on-fire.com"}, -{"name":"picture", "description":"Picture", "type":"file", "default":"feel-the-music"}, -{"name":"picturecopyright", "description":"Copyright", "default":"foxygamergirl@deviantart.com"}, -{"name":"footer", "description":"Footer", "default":"\\begin{flushleft}\\includegraphics[width=3cm]{on-fire}\\end{flushleft}"}, -{"name":"mainfontsize", "description":"Font Size", "type":"font", "default":"10"}, -{"name":"songnumberbgcolor", "description":"Number Shade", "type":"color", "default":"D1E4AE"}, -{"name":"notebgcolor", "description":"Note Shade", "type":"color", "default":"FFFDB3"}, -{"name":"indexbgcolor", "description":"Index Shade", "type":"color", "default":"D1E4AE"}, -{"name":"languages", "description":"List of languages used by songs", "default":""} -] -(% endvariables %) - (* extends "data.tex" *) (* block preambule *) From bd7244d9ad5304dba087240415e3350826357fa4 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 4 Apr 2014 19:19:21 +0200 Subject: [PATCH 2/4] =?UTF-8?q?Prise=20en=20compte=20des=20derni=C3=A8res?= =?UTF-8?q?=20modifications=20du=20moteur=20de=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Voir la discussion sur [songbook-core](/patacrep/songbook-core/issues/18). --- templates/data.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/data.tex b/templates/data.tex index 279aa52e..0d1e166e 100644 --- a/templates/data.tex +++ b/templates/data.tex @@ -17,13 +17,13 @@ % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, % MA 02110-1301, USA. -(% variables %) +(* variables *) { -"version":{ "description": {"en": "Version", "fr": "Version"}, +"version":{ "description": {"english": "Version", "french": "Version"}, "default": {"default": "3.7.2"} } } -(% endvariables %) +(* endvariables *) % begin document (* extends "patacrep.tex" *) From 32943a81266e349bab6fe16b29f945c2af2502d0 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 4 Apr 2014 19:20:23 +0200 Subject: [PATCH 3/4] Utilisation du template data --- books/lyricbook.sb | 2 +- books/lyricbook_en.sb | 2 +- books/lyricbook_fr.sb | 2 +- books/matteo.sb | 2 +- books/songbook.sb | 2 +- books/songbook_en.sb | 2 +- books/songbook_fr.sb | 2 +- books/volume-1.sb | 2 +- books/volume-2.sb | 2 +- books/volume-3.sb | 2 +- books/volume-4.sb | 2 +- books/volume-5.sb | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/books/lyricbook.sb b/books/lyricbook.sb index b181a740..fea74e3e 100644 --- a/books/lyricbook.sb +++ b/books/lyricbook.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "bookoptions" : [], "booktype" : "lyric", diff --git a/books/lyricbook_en.sb b/books/lyricbook_en.sb index 0b84a35c..853d5e67 100644 --- a/books/lyricbook_en.sb +++ b/books/lyricbook_en.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "english", "bookoptions" : [], "booktype" : "lyric", diff --git a/books/lyricbook_fr.sb b/books/lyricbook_fr.sb index 1236aabe..871b1493 100644 --- a/books/lyricbook_fr.sb +++ b/books/lyricbook_fr.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "bookoptions" : [], "booktype" : "lyric", diff --git a/books/matteo.sb b/books/matteo.sb index 17f2a0b7..ead4c509 100644 --- a/books/matteo.sb +++ b/books/matteo.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "bookoptions" : [ "importantdiagramonly", diff --git a/books/songbook.sb b/books/songbook.sb index 6c09d41c..9fce6fc6 100644 --- a/books/songbook.sb +++ b/books/songbook.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "authwords" : { "sep" : ["and", "et"] diff --git a/books/songbook_en.sb b/books/songbook_en.sb index fe867802..9c67e87d 100644 --- a/books/songbook_en.sb +++ b/books/songbook_en.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "english", "bookoptions" : [ "diagram", diff --git a/books/songbook_fr.sb b/books/songbook_fr.sb index 925b443c..615db5f8 100644 --- a/books/songbook_fr.sb +++ b/books/songbook_fr.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "bookoptions" : [ "diagram", diff --git a/books/volume-1.sb b/books/volume-1.sb index c22217ab..4f62500f 100644 --- a/books/volume-1.sb +++ b/books/volume-1.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "bookoptions" : [ "diagram", diff --git a/books/volume-2.sb b/books/volume-2.sb index feec3d8a..df73fe87 100644 --- a/books/volume-2.sb +++ b/books/volume-2.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "bookoptions" : [ "diagram", diff --git a/books/volume-3.sb b/books/volume-3.sb index 2a61e35d..97d41890 100644 --- a/books/volume-3.sb +++ b/books/volume-3.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "bookoptions" : [ "diagram", diff --git a/books/volume-4.sb b/books/volume-4.sb index f177c7dd..3ba9d97b 100644 --- a/books/volume-4.sb +++ b/books/volume-4.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "bookoptions" : [ "diagram", diff --git a/books/volume-5.sb b/books/volume-5.sb index 77008be8..ef106dca 100644 --- a/books/volume-5.sb +++ b/books/volume-5.sb @@ -1,5 +1,5 @@ { -"template" : "patacrep.tex", +"template" : "data.tex", "lang" : "french", "bookoptions" : [ "diagram", From b72eb2bae0ccc8a275f1691d9548daf2b8c12195 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 4 Apr 2014 20:58:24 +0200 Subject: [PATCH 4/4] Remplacement de 'songs' par 'content'. Voir [#22](/patacrep/songbook-core/pull/22) --- books/matteo.sb | 2 +- books/naheulbeuk.sb | 2 +- books/volume-1.sb | 2 +- books/volume-2.sb | 2 +- books/volume-3.sb | 2 +- books/volume-4.sb | 2 +- books/volume-5.sb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/books/matteo.sb b/books/matteo.sb index ead4c509..27a6a465 100644 --- a/books/matteo.sb +++ b/books/matteo.sb @@ -9,7 +9,7 @@ ], "booktype" : "chorded", "subtitle" : "Matteo's songs", -"songs" : [ +"content" : [ "hubert-felix_thiefaine/sentiments_numeriques_revisites.sg", "jean_leloup/promeneur.sg", "maxime_le_forestier/parachutiste.sg", diff --git a/books/naheulbeuk.sb b/books/naheulbeuk.sb index f0436b72..f27f33ff 100644 --- a/books/naheulbeuk.sb +++ b/books/naheulbeuk.sb @@ -13,7 +13,7 @@ "subtitle" : "Recueil de chansons non-officiel", "title" : "Le Donjon de Naheulbeuk", "version" : "0.5", -"songs" : [ +"content" : [ "belyscendre/*.sg", "le_donjon_de_naheulbeuk/*.sg" ], diff --git a/books/volume-1.sb b/books/volume-1.sb index 4f62500f..edac15d8 100644 --- a/books/volume-1.sb +++ b/books/volume-1.sb @@ -10,7 +10,7 @@ "picture" : "feel-the-music", "picturecopyright" : "foxygamergirl @ deviantart.com", "subtitle" : "Tome 1", -"songs" : [ +"content" : [ "alain_bashung/gaby_oh_gaby.sg", "amy_macdonald/mr._rock_n_roll.sg", "amy_macdonald/this_is_the_life.sg", diff --git a/books/volume-2.sb b/books/volume-2.sb index df73fe87..418c27df 100644 --- a/books/volume-2.sb +++ b/books/volume-2.sb @@ -10,7 +10,7 @@ "picture" : "sound", "picturecopyright" : "ellesh @ deviantart.com", "subtitle" : "Tome 2", -"songs" : [ +"content" : [ "aaron/u_turn_lili.sg", "alain_souchon/foule_sentimentale.sg", "alex_beaupain/je_n_aime_que_toi.sg", diff --git a/books/volume-3.sb b/books/volume-3.sb index 97d41890..cc4e7696 100644 --- a/books/volume-3.sb +++ b/books/volume-3.sb @@ -10,7 +10,7 @@ "picture" : "Mousey_Band_by_Duffzilla", "picturecopyright" : "duffzilla @ deviantart.com", "subtitle" : "Tome 3", -"songs" : [ +"content" : [ "alain_souchon/l_amour_a_la_machine.sg", "alanis_morissette/ironic.sg", "alex_beaupain/as_tu_deja_aime.sg", diff --git a/books/volume-4.sb b/books/volume-4.sb index 3ba9d97b..dd85bef9 100644 --- a/books/volume-4.sb +++ b/books/volume-4.sb @@ -10,7 +10,7 @@ "picture" : "music_by_lauratheartist", "picturecopyright" : "LauraTheArtist @ deviantart.com", "subtitle" : "Tome 4", -"songs" : [ +"content" : [ "alain_souchon/bidon.sg", "ben_e_king/stand_by_me.sg", "bill_withers/just_two_of_us.sg", diff --git a/books/volume-5.sb b/books/volume-5.sb index ef106dca..fae7f97e 100644 --- a/books/volume-5.sb +++ b/books/volume-5.sb @@ -10,7 +10,7 @@ "picture" : "The_Music_Machine_by_hit_squad", "picturecopyright" : "hit-squad @ deviantart.com", "subtitle" : "Tome 5", -"songs" : [ +"content" : [ "3_doors_down/here_without_you.sg", "adele/rolling_in_the_deep.sg", "alain_souchon/la_ballade_de_jim.sg",