Browse Source

Possibilité d'utiliser des intersong

Cela fonctionnait il y a longtemps, mais a été perdu au fil du temps.
http://www.patacrep.com/forum/viewtopic.php?pid=670#p670
pull/54/head
Louis 11 years ago
parent
commit
c161ed1e2d
  1. 5
      patacrep/content/song.py
  2. 11
      patacrep/data/latex/patacrep.sty
  3. 2
      patacrep/plastex.py
  4. 4
      patacrep/plastex_songs.py

5
patacrep/content/song.py

@ -61,7 +61,10 @@ def parse(keyword, argument, contentlist, config):
contentlist = [
files.relpath(filename, songdir)
for filename
in files.recursive_find(songdir, "*.sg")
in (
files.recursive_find(songdir, "*.sg")
+ files.recursive_find(songdir, "*.is")
)
]
for elem in contentlist:
before = len(songlist)

11
patacrep/data/latex/patacrep.sty

@ -415,4 +415,15 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Intersong management : discard command \sortassong
\newcommand{\sortassong}[2][]{%
\@ifnextchar[%
\@void%
{}%
}
\def\@void[#1]{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput

2
patacrep/plastex.py

@ -106,7 +106,7 @@ def parsetex(filename):
for node in doc.allChildNodes:
if node.nodeName == "selectlanguage":
data["languages"].add(node.attributes['lang'])
if node.nodeName == "beginsong":
if node.nodeName in ["beginsong", "sortassong"]:
data["titles"] = node.attributes["titles"]
data["args"] = node.attributes["args"]

4
patacrep/plastex_songs.py

@ -61,3 +61,7 @@ class beginsong(plasTeX.Command): # pylint: disable=invalid-name,too-many-public
else:
args[key] = unicode(val)
self.attributes['args'] = args
class sortassong(beginsong): # pylint: disable=invalid-name,too-many-public-methods
r"""Treat '\sortassong' exactly as if it were a '\beginsong'."""
pass

Loading…
Cancel
Save