lydown 0.10.0 → 0.12.4

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.
@@ -3,11 +3,12 @@ module Lydown::Rendering
3
3
  # for notes in a macro group
4
4
  class SourceRef < Base
5
5
  def translate
6
- return # unless @context['options/proof_mode']
7
-
8
6
  fn = @event[:filename]
9
7
  if fn && fn != @context['process/last_filename']
10
8
  @context['process/last_filename'] = fn
9
+
10
+ return # unless @context['options/proof_mode']
11
+
11
12
  @context.emit(@event[:stream] || :music, "%{::#{File.expand_path(fn)}%} ")
12
13
  end
13
14
  end
@@ -4,6 +4,11 @@
4
4
  \include "<%= File.join(LY_LIB_DIR, 'lib.ly') %>"
5
5
  <% end %>
6
6
 
7
+ <% includes = Lydown::Rendering.include_files(self, {}) %>
8
+ <% includes.each do |i| %>
9
+ <%= i %>
10
+ <% end %>
11
+
7
12
  <% if self.render_mode == :proof %>
8
13
  <%= Lydown::Rendering::PROOFING_LY_SETTINGS %>
9
14
  <% end %>
@@ -24,7 +24,7 @@
24
24
 
25
25
  page_breaks = Lydown::Rendering::Movement.page_breaks(self, movement: name)
26
26
 
27
- includes = Lydown::Rendering::Movement.include_files(self, movement: name)
27
+ includes = Lydown::Rendering.include_files(self, movement: name)
28
28
 
29
29
  hide_bar_numbers = Lydown::Rendering::Movement.hide_bar_numbers?(
30
30
  self, movement: name
@@ -2,6 +2,8 @@
2
2
  <% self['movements'].each do |mvt_name, mvt|
3
3
  mvt['parts'].each do |part_name, part|
4
4
  var_opts = {movement: mvt_name, part: part_name}
5
+ notation_size = self.get_setting(:notation_size, var_opts)
6
+
5
7
  if part_name && !part_name.empty?
6
8
  voice_prefix = "#{part_name}_"
7
9
  else
@@ -11,6 +13,9 @@
11
13
  <%= var_name[var_opts.merge(stream: :music)] %> = \relative c {
12
14
  <<
13
15
  \new Voice = "<%= voice_prefix %>voice1" {
16
+ <% if notation_size %>
17
+ \<%= notation_size %>
18
+ <% end %>
14
19
  <%= part['music'] %>
15
20
  }
16
21
  >>
@@ -1,3 +1,3 @@
1
1
  module Lydown
2
- VERSION = "0.10.0"
2
+ VERSION = "0.12.4"
3
3
  end
@@ -58,7 +58,6 @@ module Lydown
58
58
  end
59
59
 
60
60
  def process_file(path, prefix = [], opts = {})
61
- $stderr.puts path
62
61
  content = IO.read(path)
63
62
  stream = LydownParser.parse(content, {
64
63
  filename: File.expand_path(path),
@@ -155,14 +154,16 @@ module Lydown
155
154
  proof_mode = @context['options/proof_mode']
156
155
  paths = streams.keys
157
156
 
158
- processed_streams = Parallel.map(paths, PARALLEL_PARSE_OPTIONS.clone) do |path|
157
+ opts = PARALLEL_PARSE_OPTIONS.clone
158
+ opts[:progress] = nil if @context['options/no_progress_bar']
159
+ processed_streams = Parallel.map(paths, opts) do |path|
159
160
  content = IO.read(path)
160
161
  Cache.hit(content) do
161
162
  LydownParser.parse(content, {
162
163
  filename: File.expand_path(path),
163
164
  source: content,
164
165
  proof_mode: proof_mode,
165
- no_progress: true
166
+ no_progress_bar: true
166
167
  })
167
168
  end
168
169
  end
@@ -180,7 +181,11 @@ module Lydown
180
181
 
181
182
  def translate_movement_files(state)
182
183
  stream_entries = prepare_work_stream_array(state)
183
- processed_contexts = Parallel.map(stream_entries, PARALLEL_PROCESS_OPTIONS.clone) do |entry|
184
+
185
+ opts = PARALLEL_PROCESS_OPTIONS.clone
186
+ opts[:progress] = nil if @context['options/no_progress_bar']
187
+
188
+ processed_contexts = Parallel.map(stream_entries, opts) do |entry|
184
189
  mvmt_stream, stream = *entry
185
190
  ctx = @context.clone_for_translation
186
191
  Cache.hit(ctx, mvmt_stream, stream) do
@@ -366,10 +366,6 @@ module Lydown
366
366
  self['options/mode'] || self['render_opts/mode']
367
367
  end
368
368
 
369
- def to_msgpack
370
- @context.to_msgpack
371
- end
372
-
373
369
  # Returns a list of parts to extract for the specified opts. Only parts
374
370
  # that should be extracted (based on the render_modes setting) are included.
375
371
  def part_list_for_extraction(opts)
@@ -377,10 +373,12 @@ module Lydown
377
373
  return parts unless @context[:movements]
378
374
 
379
375
  @context[:movements].each do |mname, m|
380
- m[:parts].each do |pname, p|
381
- # Add only parts that render in part mode
382
- if part_render_modes(mname, pname).include?(:part)
383
- parts << pname unless (pname == '') || parts.include?(pname)
376
+ if m[:parts]
377
+ m[:parts].each do |pname, p|
378
+ # Add only parts that render in part mode
379
+ if part_render_modes(mname, pname).include?(:part)
380
+ parts << pname unless (pname == '') || parts.include?(pname)
381
+ end
384
382
  end
385
383
  end
386
384
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lydown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-20 00:00:00.000000000 Z
11
+ date: 2015-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: treetop
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.0
47
+ version: 1.0.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.0
54
+ version: 1.0.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: thor
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -108,20 +108,6 @@ dependencies:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
110
  version: 1.6.1
111
- - !ruby/object:Gem::Dependency
112
- name: msgpack
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - '='
116
- - !ruby/object:Gem::Version
117
- version: 0.6.2
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - '='
123
- - !ruby/object:Gem::Version
124
- version: 0.6.2
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: combine_pdf
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -136,20 +122,6 @@ dependencies:
136
122
  - - '='
137
123
  - !ruby/object:Gem::Version
138
124
  version: 0.2.5
139
- - !ruby/object:Gem::Dependency
140
- name: rspec
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - '='
144
- - !ruby/object:Gem::Version
145
- version: 3.2.0
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - '='
151
- - !ruby/object:Gem::Version
152
- version: 3.2.0
153
125
  description: Lydown is a language and tool for music notation
154
126
  email: ciconia@gmail.com
155
127
  executables:
@@ -166,8 +138,10 @@ files:
166
138
  - lib/lydown/cli/commands.rb
167
139
  - lib/lydown/cli/compiler.rb
168
140
  - lib/lydown/cli/diff.rb
141
+ - lib/lydown/cli/installer.rb
169
142
  - lib/lydown/cli/output.rb
170
143
  - lib/lydown/cli/proofing.rb
144
+ - lib/lydown/cli/repl.rb
171
145
  - lib/lydown/cli/signals.rb
172
146
  - lib/lydown/cli/support.rb
173
147
  - lib/lydown/cli/translation.rb
@@ -227,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
201
  version: '0'
228
202
  requirements: []
229
203
  rubyforge_project:
230
- rubygems_version: 2.4.6
204
+ rubygems_version: 2.4.8
231
205
  signing_key:
232
206
  specification_version: 4
233
207
  summary: Lydown is a language for music notation