sort songs

This commit is contained in:
Sebastian Hugentobler 2020-05-16 11:33:14 +02:00
parent 2bc34a35c3
commit bb50c93672
6 changed files with 7 additions and 2 deletions

View File

@ -15,7 +15,14 @@ function string.ends(String,End)
end end
function find_songs(dir) function find_songs(dir)
local files = {}
for file in lfs.dir(dir) do 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 if string.ends(file, ".ly") then
local ly_content = read_file(dir .. '/' .. file) local ly_content = read_file(dir .. '/' .. file)
local ly_title = string.match(ly_content, 'title = "(.-)"') local ly_title = string.match(ly_content, 'title = "(.-)"')

View File

@ -8,8 +8,6 @@
tagline = "" tagline = ""
} }
piuF = \markup { \italic più \dynamic f }
musicOne = \relative c' { musicOne = \relative c' {
\time 6/8 \time 6/8
\key d \minor \key d \minor