lyp 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/bin/lilypond +3 -0
- data/lib/lyp/etc/lyp.ly +7 -5
- data/lib/lyp/lilypond.rb +1 -1
- data/lib/lyp/resolver.rb +8 -3
- data/lib/lyp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d17c4c76b6e7d80fb92d00eb7308853034f2482c
|
4
|
+
data.tar.gz: 46a6db73bcad7379c7222584f45d896aceb28b14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e08ff84cd4fd32602a583e84ce4a501b3f201f1b346eeacc670f0055ef29b97efacc5c22cfc66d9092174c39127c906614ba954ebb69ea2c83b50368e498d98d
|
7
|
+
data.tar.gz: 83f4d533894a531c13ce561d1ea68dd1f91144e1b5adc190b44e0e36df2570f581fad3bb409d2b333df038606bbce7c35086a9a61ee8ef2722a33b4f235b1348
|
data/README.md
CHANGED
@@ -9,11 +9,11 @@
|
|
9
9
|
|
10
10
|
lyp is an open-source tool that takes the pain out of working with [Lilypond](http://lilypond.org/).
|
11
11
|
|
12
|
-
__Use packages__: Install [packages](http://lyp.noteflakes.com
|
12
|
+
__Use packages__: Install [packages](http://lyp.noteflakes.com/#/?id=working-with-packages) to enhance your Lilypond files with additional functionality. Add [specialized tweaks](http://lyp.noteflakes.com/#/packages?id=tweaking) or even [change the music font](http://lyp.noteflakes.com/#/packages?id=fonts).
|
13
13
|
|
14
|
-
__No hassle Lilypond installation__: with lyp you can [install Lilypond](http://lyp.noteflakes.com
|
14
|
+
__No hassle Lilypond installation__: with lyp you can [install Lilypond](http://lyp.noteflakes.com/#/?id=installing-and-using-lilypond) with a single easy command, no need to click links, or unzip and copy files around.
|
15
15
|
|
16
|
-
__Even more tools for power users__: watch and automatically [recompile](http://lyp.noteflakes.com
|
16
|
+
__Even more tools for power users__: watch and automatically [recompile](http://lyp.noteflakes.com/#/?id=lyp-watch) changed source files, [flatten](http://lyp.noteflakes.com/#/?id=lyp-flatten) include files, and [automatically install](http://lyp.noteflakes.com/#/?id=lyp-compile) package dependencies or any required version of Lilypond.
|
17
17
|
|
18
18
|
For more information, see the lyp [documentation](http://lyp.noteflakes.com/).
|
19
19
|
|
data/bin/lilypond
CHANGED
data/lib/lyp/etc/lyp.ly
CHANGED
@@ -117,6 +117,7 @@
|
|
117
117
|
(ly:parser-include-string parser str)))
|
118
118
|
|
119
119
|
(define (lyp:include parser location path once) (let* (
|
120
|
+
(path (if (symbol? path) (symbol->string path) path))
|
120
121
|
(current-dir (lyp:this-dir))
|
121
122
|
(abs-path (if (lyp:absolute-path? path)
|
122
123
|
path
|
@@ -146,7 +147,8 @@
|
|
146
147
|
)
|
147
148
|
|
148
149
|
% command form
|
149
|
-
require = #(define-void-function (parser location ref)(string?) (let* (
|
150
|
+
require = #(define-void-function (parser location ref)(string-or-symbol?) (let* (
|
151
|
+
(ref (if (symbol? ref) (symbol->string ref) ref))
|
150
152
|
(name (lyp:ref->name ref))
|
151
153
|
(package-dir (lyp:name->dir name))
|
152
154
|
(entry-point-path (lyp:join-path package-dir "package.ly"))
|
@@ -160,14 +162,14 @@ require = #(define-void-function (parser location ref)(string?) (let* (
|
|
160
162
|
))
|
161
163
|
))
|
162
164
|
|
163
|
-
pinclude = #(define-void-function (parser location path)(string?)
|
165
|
+
pinclude = #(define-void-function (parser location path)(string-or-symbol?)
|
164
166
|
(lyp:include parser location path #f))
|
165
167
|
|
166
|
-
pcondInclude = #(define-void-function (parser location expr path)(scheme? string?)
|
168
|
+
pcondInclude = #(define-void-function (parser location expr path)(scheme? string-or-symbol?)
|
167
169
|
(if expr (lyp:include parser location path #f)))
|
168
170
|
|
169
|
-
pincludeOnce = #(define-void-function (parser location path)(string?)
|
171
|
+
pincludeOnce = #(define-void-function (parser location path)(string-or-symbol?)
|
170
172
|
(lyp:include parser location path #t))
|
171
173
|
|
172
|
-
pcondIncludeOnce = #(define-void-function (parser location expr path)(scheme? string?)
|
174
|
+
pcondIncludeOnce = #(define-void-function (parser location expr path)(scheme? string-or-symbol?)
|
173
175
|
(if expr (lyp:include parser location path #t)))
|
data/lib/lyp/lilypond.rb
CHANGED
data/lib/lyp/resolver.rb
CHANGED
@@ -120,7 +120,7 @@ module Lyp
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
-
DEP_RE = /\\(require|include|pinclude|pincludeOnce)
|
123
|
+
DEP_RE = /\\(require|include|pinclude|pincludeOnce)\s+(?:"|#')?([^\s"]+)"?/.freeze
|
124
124
|
INCLUDE = "include".freeze
|
125
125
|
PINCLUDE = "pinclude".freeze
|
126
126
|
PINCLUDE_ONCE = "pincludeOnce".freeze
|
@@ -225,12 +225,17 @@ module Lyp
|
|
225
225
|
search_paths = [dir]
|
226
226
|
search_paths += @opts[:include_paths] if @opts[:include_paths]
|
227
227
|
|
228
|
+
# Reminder: return inside a proc returns from the caller
|
229
|
+
search = proc {|fn| return fn if File.file?(fn) }
|
230
|
+
|
228
231
|
search_paths.each do |path|
|
229
232
|
full_path = File.expand_path(ref, path)
|
230
|
-
|
233
|
+
search.(full_path)
|
234
|
+
search.("#{full_path}.ily")
|
235
|
+
search.("#{full_path}.ly")
|
231
236
|
end
|
232
237
|
|
233
|
-
error("
|
238
|
+
error("Could not find include file reference #{ref} specified in %s", location)
|
234
239
|
end
|
235
240
|
|
236
241
|
def process_require_command(ref, dir, leaf, opts, location)
|
data/lib/lyp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lyp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sharon Rosner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|