Archived
1
0

Adds the compilation process for PDF files

This commit is contained in:
Jip J. Dekker 2016-04-13 19:30:54 +02:00
parent e4664f6183
commit fd3610451a

View File

@ -41,7 +41,17 @@ func CompileDir(path string, opts *settings.Settings) {
if !helpers.Exists(scores[i].OutputPath) || if !helpers.Exists(scores[i].OutputPath) ||
scores[i].LastModified.After(helpers.LastModified(scores[i].OutputPath)) { scores[i].LastModified.After(helpers.LastModified(scores[i].OutputPath)) {
msg, err := Lilypond(scores[i].Path) var (
msg string
err error
)
switch filepath.Ext(scores[i].Path){
case ".ly":
msg, err = Lilypond(scores[i].Path)
case ".pdf":
err = os.Link(scores[i].Path, scores[i].OutputPath)
}
if err != nil { if err != nil {
log.WithFields(log.Fields{ log.WithFields(log.Fields{
"message": msg, "message": msg,