From bb50c936721a4eaf2a12fcf0643cc5ca006102fd Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sat, 16 May 2020 11:33:14 +0200 Subject: [PATCH] sort songs --- src/songs.lua | 7 +++++++ src/songs/altassyrisch.ly | 2 -- src/songs/{der_bettelvogt.ly => bettelvogt.ly} | 0 src/songs/{der_bettelvogt.tex => bettelvogt.tex} | 0 src/songs/{der_soldat.ly => soldat.ly} | 0 src/songs/{der_soldat.tex => soldat.tex} | 0 6 files changed, 7 insertions(+), 2 deletions(-) rename src/songs/{der_bettelvogt.ly => bettelvogt.ly} (100%) rename src/songs/{der_bettelvogt.tex => bettelvogt.tex} (100%) rename src/songs/{der_soldat.ly => soldat.ly} (100%) rename src/songs/{der_soldat.tex => soldat.tex} (100%) diff --git a/src/songs.lua b/src/songs.lua index 6fec3b0..4c1945d 100644 --- a/src/songs.lua +++ b/src/songs.lua @@ -15,7 +15,14 @@ function string.ends(String,End) end function find_songs(dir) + local files = {} for file in lfs.dir(dir) do + table.insert(files, file) + end + table.sort(files) + + for i = 1, #files do + local file = files[i] if string.ends(file, ".ly") then local ly_content = read_file(dir .. '/' .. file) local ly_title = string.match(ly_content, 'title = "(.-)"') diff --git a/src/songs/altassyrisch.ly b/src/songs/altassyrisch.ly index 905a2ce..6a96749 100644 --- a/src/songs/altassyrisch.ly +++ b/src/songs/altassyrisch.ly @@ -8,8 +8,6 @@ tagline = "" } -piuF = \markup { \italic piĆ¹ \dynamic f } - musicOne = \relative c' { \time 6/8 \key d \minor diff --git a/src/songs/der_bettelvogt.ly b/src/songs/bettelvogt.ly similarity index 100% rename from src/songs/der_bettelvogt.ly rename to src/songs/bettelvogt.ly diff --git a/src/songs/der_bettelvogt.tex b/src/songs/bettelvogt.tex similarity index 100% rename from src/songs/der_bettelvogt.tex rename to src/songs/bettelvogt.tex diff --git a/src/songs/der_soldat.ly b/src/songs/soldat.ly similarity index 100% rename from src/songs/der_soldat.ly rename to src/songs/soldat.ly diff --git a/src/songs/der_soldat.tex b/src/songs/soldat.tex similarity index 100% rename from src/songs/der_soldat.tex rename to src/songs/soldat.tex