diff options
author | EuAndreh <eu@euandre.org> | 2021-01-01 22:55:54 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-01-01 22:55:54 -0300 |
commit | 15db3f0980b64aba8ac0a51f5d28ef3a7f829a3d (patch) | |
tree | 5ff20ddf1e19cacd79136dde38b931429f839115 | |
parent | TODOs.org: Add 720e79b4-9e38-41c6-9958-cdadd67d2298 (diff) | |
download | euandre.org-15db3f0980b64aba8ac0a51f5d28ef3a7f829a3d.tar.gz euandre.org-15db3f0980b64aba8ac0a51f5d28ef3a7f829a3d.tar.xz |
linter.rb: Add assert_lilypond
-rw-r--r-- | _plugins/linter.rb | 18 | ||||
-rw-r--r-- | music/choro-da-saudade.ly | 1 | ||||
-rw-r--r-- | music/dengoso.ly | 1 | ||||
-rw-r--r-- | music/marcha-dos-marinheiros.ly | 1 |
4 files changed, 21 insertions, 0 deletions
diff --git a/_plugins/linter.rb b/_plugins/linter.rb index 919a8bb..8078dae 100644 --- a/_plugins/linter.rb +++ b/_plugins/linter.rb @@ -192,11 +192,29 @@ module Jekyll end end + def assert_lilypond(site) + site.config['musics'].each do |music| + assert music['title'], "Missing 'title' in #{music}" + assert music['composer'], "Missing 'composer' in #{music}" + ref = assert music['ref'], "Missing 'ref' in #{music}" + ly = "music/#{ref}.ly" + unless File.exist? ly then + raise "Missing '#{ly}' file present in _config.yml." + end + + point_and_click_off = open(ly) { |f| f.include? "\\pointAndClickOff\n" } + unless point_and_click_off then + raise "Missing '\\pointAndClickOff' in '#{ly}'" + end + end + end + def generate(site) assert_unique_ids(site) assert_frontmatter(site) assert_media_metadata(site) assert_git_annex(site) + assert_lilypond(site) end def all_documents(site) diff --git a/music/choro-da-saudade.ly b/music/choro-da-saudade.ly index 513239b..c175d9f 100644 --- a/music/choro-da-saudade.ly +++ b/music/choro-da-saudade.ly @@ -1,4 +1,5 @@ \version "2.20.0" +\pointAndClickOff \header { title = "Choro da Saudade" diff --git a/music/dengoso.ly b/music/dengoso.ly index d949604..2798a9f 100644 --- a/music/dengoso.ly +++ b/music/dengoso.ly @@ -1,4 +1,5 @@ \version "2.20.0" +\pointAndClickOff \header { title = "Dengoso" diff --git a/music/marcha-dos-marinheiros.ly b/music/marcha-dos-marinheiros.ly index 1de28d0..78411da 100644 --- a/music/marcha-dos-marinheiros.ly +++ b/music/marcha-dos-marinheiros.ly @@ -1,4 +1,5 @@ \version "2.20.0" +\pointAndClickOff \header { title = "Marcha dos Marinheiros" |