marmot 0.0.3 → 0.0.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.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/bin/marmot +15 -12
- data/lib/marmot/options_sanitizer.rb +5 -1
- data/lib/marmot/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: 7a4b4139fb105fef311c6330107fe35398efde24
|
4
|
+
data.tar.gz: cf1901eecd1897cc33ab0c74f3c198c4480f1270
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b98e7a5dcc4780b852c6d14ae1e4d3bd363cf114465c34cadf168ac686e8f93c8e91503e9fea3bf919c286e897a312bedea00032d353ef6d045da946731eba6
|
7
|
+
data.tar.gz: 79d1483c47e443c19b0b88e2df6df3f353e1b2acdabb8bb79de89cb04b179e115cf32b11ec409d137e45911eb0a2e31111875c8bf47428f758112827b8683d26
|
data/.gitignore
CHANGED
data/bin/marmot
CHANGED
@@ -21,20 +21,21 @@ end
|
|
21
21
|
class Marmot::CLI
|
22
22
|
|
23
23
|
BANNER = <<-EOF
|
24
|
-
Usage: marmot [options] input [output]
|
24
|
+
Usage: marmot [options] input [output]
|
25
25
|
|
26
|
-
Description:
|
27
|
-
|
26
|
+
Description:
|
27
|
+
Convert font files to a webfont kit using FontSquirrel Webfont Generator
|
28
28
|
|
29
|
-
Example:
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
Example:
|
30
|
+
marmot -v font.ttf
|
31
|
+
marmot font.ttf archive.zip
|
32
|
+
marmot -c config.txt font.ttf
|
33
|
+
marmot --formats=ttf,woff font.ttf
|
34
|
+
marmot --add-spaces --no-add-hyphens font.ttf
|
35
35
|
|
36
|
-
Options:
|
37
|
-
EOF
|
36
|
+
Options:
|
37
|
+
EOF
|
38
|
+
.gsub /^ /, ''
|
38
39
|
|
39
40
|
MAPPING = {
|
40
41
|
:array => :string,
|
@@ -100,7 +101,9 @@ EOF
|
|
100
101
|
|
101
102
|
|
102
103
|
if(config_file)
|
103
|
-
|
104
|
+
options_from_config = JSON.parse(config_file.read.gsub /^#.*$/, '')
|
105
|
+
options_from_config = Marmot::OptionsSanitizer::FALSE_CHECKBOXES.merge(options_from_config)
|
106
|
+
options = options_from_config.merge options
|
104
107
|
end
|
105
108
|
if(output_file)
|
106
109
|
options[:output_io] = output_file
|
@@ -36,7 +36,11 @@ module Marmot
|
|
36
36
|
}
|
37
37
|
|
38
38
|
NON_EXPERT_OPTIONS = [:id, :agreement, :mode]
|
39
|
-
SUBSET_OPTIONS
|
39
|
+
SUBSET_OPTIONS = [:subset_range, :subset_custom, :subset_custom_range]
|
40
|
+
|
41
|
+
#{:fix_vertical_metrics=>false, :fix_gasp=>false, :remove_kerning=>false, :add_spaces=>false, :add_hyphens=>false, :webonly=>false, :base64=>false, :style_link=>false, :agreement=>false}
|
42
|
+
FALSE_CHECKBOXES = Hash[OPTIONS.collect{|k,v| [k,false] if v[0] == :checkbox }.compact]
|
43
|
+
|
40
44
|
|
41
45
|
# Sanitize options
|
42
46
|
def self.sanitize options, custom_options={}
|
data/lib/marmot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marmot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Filimonov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trollop
|