Browse Source

Merge branch 'master' of git://git.lohrun.net/songbook

remotes/origin/translate_notes
crep 15 years ago
parent
commit
69a54e2efb
  1. 8
      NEWS
  2. 3
      crepbook.cls
  3. 10
      songbook.py
  4. 7
      templates/minimal.tmpl
  5. 7
      templates/patacrep.tmpl

8
NEWS

@ -1,3 +1,11 @@
songbook (v0.?)
(lohrun) Add three new type of template parameters : color, flag and enum.
(lohrun) Add a diagram option to the crepbook class.
(crep) Use LaTeX Songs package v2.11.
-- Alexandre Dupas <alexandre.dupas@gmail.com> Mon, 16 Aug 2010 23:41:45 +0200
songbook (v0.7) songbook (v0.7)
(various authors) Add songs (various authors) Add songs

3
crepbook.cls

@ -15,8 +15,11 @@
% Options % Options
\DeclareOption{tabs}{\tabstrue} \DeclareOption{tabs}{\tabstrue}
\DeclareOption{notabs}{\tabsfalse}
\DeclareOption{lilypond}{\lilypondtrue} \DeclareOption{lilypond}{\lilypondtrue}
\DeclareOption{nolilypond}{\lilypondfalse}
\DeclareOption{nodiagram}{\nodiagramtrue} \DeclareOption{nodiagram}{\nodiagramtrue}
\DeclareOption{diagram}{\nodiagramfalse}
\DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{article}}

10
songbook.py

@ -38,6 +38,14 @@ def toValue(parameter, data):
return joinText.join(data) return joinText.join(data)
elif parameter["type"] == "color": elif parameter["type"] == "color":
return data[1:] return data[1:]
elif parameter["type"] == "enum":
return data
elif parameter["type"] == "flag":
if "join" in parameter:
joinText = parameter["join"]
else:
joinText = ''
return joinText.join(data)
def formatDeclaration(name, parameter): def formatDeclaration(name, parameter):
value = "" value = ""
@ -111,7 +119,7 @@ def makeDepend(sb, output):
# check for lilypond deps (in songs data) if necessary # check for lilypond deps (in songs data) if necessary
lilypond = [] lilypond = []
if "booktype" in sb and "lilypond" in sb["booktype"]: if "bookoptions" in sb and "lilypond" in sb["bookoptions"]:
for filename in deps: for filename in deps:
tmpl = open(filename) tmpl = open(filename)
lilypond += matchRegexp(lilypondPattern, tmpl) lilypond += matchRegexp(lilypondPattern, tmpl)

7
templates/minimal.tmpl

@ -25,7 +25,12 @@
% Template parameters % Template parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%:[ %%:[
%%: {"name":"booktype", "description":"Booktype", "type":"stringlist", "default":["chorded"], "join":","} %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true},
%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs"], "join":",", "mandatory":true, "default":["diagram"]},
%%: {"name":"mainfontsize", "description":"Font Size", "type":"enum", "values":["10pt","11pt","12pt"], "default":"10pt"},
%%: {"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"}
%%:] %%:]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% begin document % begin document

7
templates/patacrep.tmpl

@ -25,8 +25,10 @@
% Template parameters % Template parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%:[ %%:[
%%: {"name":"title", "description":"Title", "default":"Recueil de chansons pour guitare"}, %%: {"name":"title", "description":"Title", "default":"Recueil de chansons pour guitare", "mandatory":true},
%%: {"name":"author", "description":"Author", "default":"Romain Goffe \\and Alexandre Dupas"}, %%: {"name":"author", "description":"Author", "default":"Romain Goffe \\and Alexandre Dupas", "mandatory":true},
%%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true},
%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs"], "join":",", "mandatory":true, "default":["diagram"]},
%%: {"name":"version", "description":"Version", "default":"3.2"}, %%: {"name":"version", "description":"Version", "default":"3.2"},
%%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"subtitle", "description":"Subtitle"},
%%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"},
@ -35,7 +37,6 @@
%%: {"name":"picturecopyright", "description":"Copyright", "default":"foxygamergirl@deviantart.com"}, %%: {"name":"picturecopyright", "description":"Copyright", "default":"foxygamergirl@deviantart.com"},
%%: {"name":"footer", "description":"Footer", "default":"\\begin{flushleft}\\includegraphics[width=3cm]{on-fire}\\end{flushleft}"}, %%: {"name":"footer", "description":"Footer", "default":"\\begin{flushleft}\\includegraphics[width=3cm]{on-fire}\\end{flushleft}"},
%%: {"name":"license", "description":"License", "default":"\\input{license.tex}"}, %%: {"name":"license", "description":"License", "default":"\\input{license.tex}"},
%%: {"name":"booktype", "description":"Booktype", "type":"stringlist", "default":["chorded"], "join":","},
%%: {"name":"mainfontsize", "description":"Font Size", "values":["10pt","11pt","12pt"], "default":"10pt"}, %%: {"name":"mainfontsize", "description":"Font Size", "values":["10pt","11pt","12pt"], "default":"10pt"},
%%: {"name":"songnumberbgcolor", "description":"Number Shade", "type":"color", "default":"#D1E4AE"}, %%: {"name":"songnumberbgcolor", "description":"Number Shade", "type":"color", "default":"#D1E4AE"},
%%: {"name":"notebgcolor", "description":"Note Shade", "type":"color", "default":"#D1E4AE"}, %%: {"name":"notebgcolor", "description":"Note Shade", "type":"color", "default":"#D1E4AE"},

Loading…
Cancel
Save