macaw-ruby 0.0.29 → 0.0.30
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/Gemfile.lock +1 -1
- data/bin/macaw +16 -3
- data/lib/macaw/i18n/en.yml +5 -5
- data/lib/macaw/rules/sumatrapdf.rb +10 -0
- data/lib/macaw/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b37d407a208c6f6fd19358b3275935fd01445419
|
4
|
+
data.tar.gz: bcbd2cff8f1c99b9497249561c3095c907b6a396
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d960ad2e088d5c6a41b1a796b33676308fbbf979a8cd9b686a4a5ed98e423c4194f105bbc7266713aa32414cd140fb6eb988bc0f1ca9a9d1dedac55045e62bb4
|
7
|
+
data.tar.gz: 516000ca6d8a6d59a7e87e5f055b14bebd1f53642590cf37092347dbdaafca02e2a70deae340316200bb3d06673027d033b4e050d53ea574719b5a2f853a3978
|
data/Gemfile.lock
CHANGED
data/bin/macaw
CHANGED
@@ -61,7 +61,7 @@ def options!
|
|
61
61
|
options[:language] = lang.intern
|
62
62
|
rescue I18n::InvalidLocale
|
63
63
|
if !dryrun
|
64
|
-
puts
|
64
|
+
puts I81n.t('error.InvalidLanguageConfigurationFile', languages: I18n.available_locales.collect{|l| l.to_s}.join(', '))
|
65
65
|
exit
|
66
66
|
end
|
67
67
|
end
|
@@ -177,14 +177,21 @@ class Macaw
|
|
177
177
|
error("No filename to process") if ARGV.size == 0
|
178
178
|
error("Expected exactly one filename to process #{ARGV.inspect}") if ARGV.size != 1
|
179
179
|
tex = File.file?(ARGV[0]) ? ARGV[0] : ARGV[0] + '.tex'
|
180
|
-
error(
|
180
|
+
error(I18n.t('error.FileDoesNotExist', file: tex)) if !File.exists?(tex)
|
181
181
|
|
182
182
|
Macaw.load_rules
|
183
|
+
|
184
|
+
puts I18n.t('log.ProcessingFile', file: tex)
|
185
|
+
|
183
186
|
macaw = Macaw.new(tex)
|
184
187
|
@@log = File.open(macaw.base + '.log', 'w') if @@options.log
|
185
188
|
|
186
|
-
|
189
|
+
executed = 0
|
190
|
+
IO.readlines(tex).each_with_index{|line, lineno|
|
191
|
+
@@lineno = lineno + 1
|
192
|
+
|
187
193
|
next unless line =~ /^% arara: /
|
194
|
+
executed += 1
|
188
195
|
line.strip!
|
189
196
|
line.sub!(/^%\s+arara\s*:\s*/, '')
|
190
197
|
data = line.split(':', 2).collect{|v| v.strip}
|
@@ -218,6 +225,12 @@ class Macaw
|
|
218
225
|
puts "\n** #{line} **\n"
|
219
226
|
macaw.send(cmd, *accept.collect{|k, v| params[v.to_s]})
|
220
227
|
}
|
228
|
+
|
229
|
+
if executed == 0
|
230
|
+
puts I18n.t('log.NoDirectivesFound', file: tex)
|
231
|
+
else
|
232
|
+
puts I18n.t('log.Done')
|
233
|
+
end
|
221
234
|
end
|
222
235
|
|
223
236
|
def self.log(line, force=false)
|
data/lib/macaw/i18n/en.yml
CHANGED
@@ -13,7 +13,7 @@ en:
|
|
13
13
|
Progress: print dots for progress
|
14
14
|
log:
|
15
15
|
WelcomeMessage: Welcome to arara %{0}!
|
16
|
-
ProcessingFile: Processing file '
|
16
|
+
ProcessingFile: Processing file '%{file}', please wait.
|
17
17
|
Done: Done.
|
18
18
|
ExceptionRaised: 'Arara raised an exception with the following message:'
|
19
19
|
ReadyToRunCommands: Ready to run commands.
|
@@ -31,7 +31,7 @@ en:
|
|
31
31
|
Slogan: The cool TeX automation tool
|
32
32
|
AllRightsReserved: All rights reserved.
|
33
33
|
msg:
|
34
|
-
NoDirectivesFound: I didn''t find any directives in '
|
34
|
+
NoDirectivesFound: I didn''t find any directives in '%{file}', and so didn't do
|
35
35
|
anything. Is that what you really wanted?
|
36
36
|
SpecialThanks: A special thanks goes to %{contributors}, and many others for making this humble tool possible.
|
37
37
|
RunningCommand: Running %{0}...
|
@@ -43,14 +43,14 @@ en:
|
|
43
43
|
Problem: 'Problem: %{0}'
|
44
44
|
ErrorLocation: Error found in line %{0}, column %{1}.
|
45
45
|
error:
|
46
|
-
FileDoesNotExistWithExtensionsList: I'
|
46
|
+
FileDoesNotExistWithExtensionsList: I'm sorry, but the file '%{0} %{1}' does
|
47
47
|
not exist. Note that when you provide only the basename (i.e, the filename without
|
48
48
|
the extension) or with an unknown extension, arara will try to look for files
|
49
49
|
ending with the predefined extensions %{1} in that order. You can override the
|
50
50
|
order, the search pattern or even add support for new extensions through the
|
51
51
|
configuration file. Please refer to the arara manual to learn more about this
|
52
52
|
feature.
|
53
|
-
FileDoesNotExist: File '
|
53
|
+
FileDoesNotExist: File '%{file}' does not exist.
|
54
54
|
CommandNotFound: "\\nI''m sorry, but the command from the ''%{0}'' task could
|
55
55
|
not be found. Are you sure the command ''%{1}'' is correct, or even accessible
|
56
56
|
from the system path?"
|
@@ -63,7 +63,7 @@ en:
|
|
63
63
|
a proper configuration file is provided.
|
64
64
|
InvalidLanguageConfigurationFile: 'Houston, we have a problem. Sadly, the language
|
65
65
|
set in the configuration file is not valid. Currently, arara can provide support
|
66
|
-
for the following languages: %{
|
66
|
+
for the following languages: %{languages}. Make sure to choose a valid language or remove
|
67
67
|
the entry from the configuration file (the field is optional), otherwise arara
|
68
68
|
cannot proceed.'
|
69
69
|
InvalidFiletypesConfigurationFile: I'm sorry, but it seems your configuration
|
data/lib/macaw/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macaw-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emiliano Heyns
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- lib/macaw/rules/ps2pdf.rb
|
160
160
|
- lib/macaw/rules/sketch.rb
|
161
161
|
- lib/macaw/rules/songidx.rb
|
162
|
+
- lib/macaw/rules/sumatrapdf.rb
|
162
163
|
- lib/macaw/rules/tex.rb
|
163
164
|
- lib/macaw/rules/xdvipdfmx.rb
|
164
165
|
- lib/macaw/rules/xelatex.rb
|