From f692c16128d00ad91f6187c0dbc1bcf2573c9709 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Wed, 9 Jun 2010 17:30:22 +0200 Subject: [PATCH] Sort the list of all songs to be coherent with the old songbook version. --- songbook.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/songbook.py b/songbook.py index 690f2379..3f1f7a2e 100755 --- a/songbook.py +++ b/songbook.py @@ -38,7 +38,9 @@ def makeTexFile(songbook, output): # output \songlist if not type(songs) is list: if songs == "all": - songs = map(lambda x: x[6:], glob.glob('songs/*/*.sg')) + l = glob.glob('songs/*/*.sg') + l.sort() + songs = map(lambda x: x[6:], l) if len(songs) > 0: out.write('\\newcommand{\\songslist}{\n') dir += map(os.path.dirname, map(lambda x:"songs/"+x, songs))