diff --git a/patacrep/content/song.py b/patacrep/content/song.py index 85a175e8..a9123244 100755 --- a/patacrep/content/song.py +++ b/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) diff --git a/patacrep/data/latex/patacrep.sty b/patacrep/data/latex/patacrep.sty index 084e5866..a0919772 100644 --- a/patacrep/data/latex/patacrep.sty +++ b/patacrep/data/latex/patacrep.sty @@ -415,4 +415,15 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Intersong management : discard command \sortassong +\newcommand{\sortassong}[2][]{% + \@ifnextchar[% + \@void% + {}% +} +\def\@void[#1]{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \endinput diff --git a/patacrep/plastex.py b/patacrep/plastex.py index 6ffab971..c4c81e62 100644 --- a/patacrep/plastex.py +++ b/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"] diff --git a/patacrep/plastex_songs.py b/patacrep/plastex_songs.py index 37536ef6..43c31986 100755 --- a/patacrep/plastex_songs.py +++ b/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