From a44abbc5d2bbc839981d934f375687b3a889a8bf Mon Sep 17 00:00:00 2001 From: "Jip J. Dekker" Date: Wed, 30 Mar 2016 15:38:22 +0200 Subject: [PATCH] Use file name as default song name --- compiler/compile.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/compile.go b/compiler/compile.go index 3604562..058b90f 100644 --- a/compiler/compile.go +++ b/compiler/compile.go @@ -17,6 +17,7 @@ package compiler import ( "os" "path/filepath" + "strings" log "github.com/Sirupsen/logrus" "github.com/jjdekker/ponder/helpers" @@ -58,6 +59,7 @@ func generateScores() func(string, os.FileInfo) error { case ".ly": log.WithFields(log.Fields{"path": path}).Info("adding lilypond file") scores = append(scores, &settings.Score{ + Name: filepath.Base(path)[:strings.LastIndex(filepath.Base(path), ".")], Path: path, LastModified: file.ModTime(), })