Skip to content

Commit

Permalink
Refactor scheme/Lilypond API (#61)
Browse files Browse the repository at this point in the history
- Deprecate `\require`, `\pinclude` et al commands. They still work, but
  will produce a warning when verbose option is used.
- Introduce new commands to replace the old commands:
  - `lyp-require`: load a package
  - `lyp-load`: load a file
  - `lyp-include`: load a file only once
- Richer, easier to use `lyp-include` commands accept:
  - directory for loading all files in directory: `\lyp-include utils`
  - filename pattern with wildcard: `\lyp-include "lib/*.ly"`
  - multiple file references: `\lyp-include #'(stave1 stave2)`
- Cleanup and refactor scheme definitions.
  • Loading branch information
noteflakes committed Feb 20, 2018
1 parent a8b611b commit ba86475
Show file tree
Hide file tree
Showing 12 changed files with 351 additions and 81 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ dist
*.pdf
*.ps
*.png
*.svg
*.svg
test.ly
spec/package_setups/tmp
spec/lilypond_setups/tmp
26 changes: 17 additions & 9 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
- Specs for CLI commands.
- Add post about using custom fonts
- Add post about compiling with lyp

- Specs for lilypond command.
- Add `install_lilypond` / `il` command:

- rename require, pinclude, pincludeOnce etc:
```ruby
desc "install_lilypond VERSION", "Install a version of Lilypond."
method_option :default, aliases: '-d', type: :boolean, desc: 'Set default Lilypond version'
def install_lilypond
$cmd_options = options

```lilypond
\req "blah"
\incl "blah.ly"
\inclOnce "blah.ly"
\condIncl #(eq? edition 'urtext) "urtext_tweaks.ly"
\condInclOnce #(eq? edition 'urtext) "urtext_tweaks.ly"
Lyp::System.test_installed_status!
args.each do |version|
Lyp::Lilypond.install(version, options)
end
end
```

- Specs for CLI commands.

- Specs for lilypond command.

4 changes: 4 additions & 0 deletions docs/news.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ $ lilypond mymusic.ly

_2018/2/5_

<div>
<script src="https://asciinema.org/a/123683.js" id="asciicast-123683" async></script>
</div>

It's been a year since I last worked on lyp. Fortunately, some people still care about it and have brought some [issues](https://github.com/noteflakes/lyp/issues) to my attention. I've been able to help some of them and have just put out a new release. Also, in the last few days the old Lilypond binaries download link has stopped working. I've updated lyp to download from the new location (on the lilypond.org website). So you should update your lyp installation to the latest version - 1.3.8. Here are some of the changes since 2017:

- Fix Lilypond installation link (the http://download.linuxaudio.org/lilypond links don't work anymore).
Expand Down
Loading

0 comments on commit ba86475

Please sign in to comment.