yamg 0.0.7 → 0.0.8
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 +2 -0
- data/bin/yamg +1 -1
- data/lib/yamg/cli.rb +8 -6
- data/lib/yamg/screenshot.rb +0 -1
- data/lib/yamg/templates.yaml +22 -33
- data/lib/yamg/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8a2760ddcfbeb317a2ca6d5915a6c7e7a94378b
|
4
|
+
data.tar.gz: a1232ce8502451fb1058de8d6450a9f563e8415e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39a3bafd89f26b55a2f6c457fbe7b2d4f3c7b31bf880bd3d74c9449b51d7ded8a0047cdd190f8dd42b976affe92edd7450217be50a5d3e2590b7597b75785bf7
|
7
|
+
data.tar.gz: 145ab86bed2deca1bb3aa016ed4a779c821a86b2095e30d887dd621dcd2983be8728faa9cf9b6ff0a030041a2214997044a38eb51c39d54672ffa506cc6f5de4
|
data/README.md
CHANGED
@@ -39,6 +39,8 @@ OSX
|
|
39
39
|
* Find best version (size) to use from icons folder.
|
40
40
|
* Splash screen/banner generation with gravity.
|
41
41
|
* Works with iOS/Android/Other mobile with Phonegap or Cordova.
|
42
|
+
* Exports icons and splashes for stores and social networks.
|
43
|
+
* Screenshots for stores and advertising.
|
42
44
|
|
43
45
|
|
44
46
|
## Use
|
data/bin/yamg
CHANGED
data/lib/yamg/cli.rb
CHANGED
@@ -11,8 +11,6 @@ module YAMG
|
|
11
11
|
return YAMG.init if argv.join =~ /init/
|
12
12
|
YAMG.load_config # (argv)
|
13
13
|
@works = YAMG.config['compile']
|
14
|
-
compile
|
15
|
-
screenshot
|
16
14
|
end
|
17
15
|
|
18
16
|
def setup_for(opts)
|
@@ -58,22 +56,26 @@ module YAMG
|
|
58
56
|
end
|
59
57
|
|
60
58
|
def compile(scope = nil)
|
61
|
-
time = Time.now
|
62
59
|
works.select! { |w| w =~ scope } if scope
|
63
60
|
works.each { |out, opts| compile_work(out, opts) }
|
64
61
|
works.select! { |w| w =~ scope } if scope
|
65
62
|
puts Rainbow("Working on #{works.keys.join(', ')}").yellow
|
63
|
+
end
|
66
64
|
|
65
|
+
def screenshot
|
67
66
|
YAMG.config['screenshots'].each do |ss|
|
68
67
|
Thread.new { Screenshot.new(ss).work('./media') }
|
69
68
|
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def work!
|
72
|
+
time = Time.now
|
73
|
+
compile
|
74
|
+
screenshot
|
70
75
|
puts Rainbow(Thread.list.size.to_s + ' jobs').black
|
71
76
|
Thread.list.reject { |t| t == Thread.current }.each(&:join)
|
72
77
|
puts Rainbow('-' * 59).black
|
73
78
|
puts Rainbow("Done compile #{Time.now - time}").red
|
74
79
|
end
|
75
|
-
|
76
|
-
def screenshot
|
77
|
-
end
|
78
80
|
end
|
79
81
|
end
|
data/lib/yamg/screenshot.rb
CHANGED
data/lib/yamg/templates.yaml
CHANGED
@@ -146,6 +146,16 @@ google:
|
|
146
146
|
'180.png': 180
|
147
147
|
splash:
|
148
148
|
'splash.png': [1024, 768]
|
149
|
+
screenshots:
|
150
|
+
'android/android-10in-1280x720-land': [1280, 720]
|
151
|
+
'android/android-10in-2048x1152-land': [2048, 1152]
|
152
|
+
'android/android-10in-1280x720-port': [720, 1280]
|
153
|
+
'android/android-10in-2048x1152-port': [1152, 2048]
|
154
|
+
'android/android-7in-1280x800-land': [1280, 800]
|
155
|
+
'android/android-7in-1280x800-port': [800, 1280]
|
156
|
+
'android/android-4in-1280x720-land': [1920, 1080]
|
157
|
+
'android/android-4in-1280x720-port': [1080, 1920]
|
158
|
+
|
149
159
|
|
150
160
|
apple:
|
151
161
|
icons:
|
@@ -154,40 +164,19 @@ apple:
|
|
154
164
|
splash:
|
155
165
|
'splash.png': [1024, 768]
|
156
166
|
screenshots:
|
167
|
+
'ios/ipad-1024x768-land': [1024, 768]
|
168
|
+
'ios/ipad-1024x768-port': [768, 1024]
|
169
|
+
'ios/ipadretina-2048x1536-land': [2048, 1536, 2]
|
170
|
+
'ios/ipadretina-2048x1536-port': [1536, 2048, 2]
|
171
|
+
'ios/iphone4-960x640-land': [960, 640]
|
172
|
+
'ios/iphone4-640x960-port': [640, 960]
|
173
|
+
'ios/iphone5-1136x640-land': [1136, 640, 2]
|
174
|
+
'ios/iphone5-640x1136-port': [640, 1136, 2]
|
175
|
+
'ios/iphone6p-1080x1920-port': [1080, 1920, 2]
|
176
|
+
'ios/iphone6p-1920x1080-land': [1920, 1080, 2]
|
177
|
+
'ios/iphone6-1334x750-land': [1334, 750, 2]
|
178
|
+
'ios/iphone6-750x1334-port': [750, 1334, 2]
|
157
179
|
|
158
|
-
{filename: "android-10in-1280x720-land", width: 1280, height: 720, savePath: 'Media/android/screenshots/10in'},
|
159
|
-
{filename: "android-10in-2048x1152-land", width: 2048, height: 1152, savePath: 'Media/android/screenshots/10in'},
|
160
|
-
{filename: "android-7in-1280x800-land", width: 1280, height: 800, savePath: 'Media/android/screenshots/7in'},
|
161
|
-
{filename: "android-10in-1280x720-port", width: 720, height: 1280, savePath: 'Media/android/screenshots/10in'},
|
162
|
-
{filename: "android-10in-2048x1152-port", width: 1152, height: 2048, savePath: 'Media/android/screenshots/10in'},
|
163
|
-
{filename: "android-7in-1280x800-port", width: 800, height: 1280, savePath: 'Media/android/screenshots/7in'},
|
164
|
-
{filename: "android-4in-1280x720-land", width: 1920, height: 1080, savePath: 'Media/android/screenshots/4in'},
|
165
|
-
{filename: "android-4in-1280x720-port", width: 1080, height: 1920, savePath: 'Media/android/screenshots/4in'},
|
166
|
-
{filename: "ipad-1024x768-land", width: 1024, height: 768, savePath: 'Media/ios/screenshots/ipad'},
|
167
|
-
{
|
168
|
-
filename: "ipadretina-2048x1536-land",
|
169
|
-
width: 2048,
|
170
|
-
height: 1536,
|
171
|
-
devicePixelRatio: 2,
|
172
|
-
savePath: 'Media/ios/screenshots/ipadRetina'
|
173
|
-
},
|
174
|
-
{filename: "iphone4-960x640-land", width: 960, height: 640, savePath: 'Media/ios/screenshots/iphone4'},
|
175
|
-
{filename: "iphone5-1136x640-land", width: 1136, height: 640, savePath: 'Media/ios/screenshots/iphone5'},
|
176
|
-
{filename: "ipad-1024x768-port", width: 768, height: 1024, savePath: 'Media/ios/screenshots/ipad'},
|
177
|
-
{
|
178
|
-
filename: "ipadretina-2048x1536-port",
|
179
|
-
width: 1536,
|
180
|
-
height: 2048,
|
181
|
-
devicePixelRatio: 2,
|
182
|
-
savePath: 'Media/ios/screenshots/ipadRetina'
|
183
|
-
},
|
184
|
-
{filename: "iphone4-640x960-port", width: 640, height: 960, savePath: 'Media/ios/screenshots/iphone4'},
|
185
|
-
{filename: "iphone5-640x1136-port", width: 640, height: 1136, savePath: 'Media/ios/screenshots/iphone5'},
|
186
|
-
{filename: "iphone6p-1080x1920-port", width: 1080, height: 1920, savePath: 'Media/ios/screenshots/iphone6p'},
|
187
|
-
{filename: "iphone6p-1920x1080-land", width: 1920, height: 1080, savePath: 'Media/ios/screenshots/iphone6p'},
|
188
|
-
{filename: "iphone6-1334x750-land", width: 1334, height: 750, savePath: 'Media/ios/screenshots/iphone6'},
|
189
|
-
{filename: "iphone6-750x1334-port", width: 750, height: 1334, savePath: 'Media/ios/screenshots/iphone6'}
|
190
|
-
]
|
191
180
|
|
192
181
|
facebook:
|
193
182
|
icons:
|
data/lib/yamg/version.rb
CHANGED