Adds the compilation process for PDF files
This commit is contained in:
parent
e4664f6183
commit
fd3610451a
@ -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,
|
||||||
|
Reference in New Issue
Block a user