yamg 0.0.8 → 0.0.9
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 +13 -0
- data/lib/yamg/screenshot.rb +2 -5
- data/lib/yamg/version.rb +1 -1
- data/lib/yamg/yamg.yml +12 -6
- 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: 0065481167ba7ffeabcaa8c0227d00606fc9ebdd
|
|
4
|
+
data.tar.gz: 33cdc79edfffc34f7674fa949a824d418cfc2c51
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58ff6a4fc04946b8ea39e9d354b35ca08ca806c02977065e65676020f93dc0ae4f513b0e4b8eb40f82ccaddeda60383bb7ffac1d266c16206a513dee6ea85274
|
|
7
|
+
data.tar.gz: e399be3267dda8c25c45110f2afaa7dc7a24059da713d89972bfea163ae76fe0888cad72743eff82f56302f6cc0e1836f69bdf5bba887c512c113b45858a1fb6
|
data/README.md
CHANGED
|
@@ -91,3 +91,16 @@ Soon.
|
|
|
91
91
|
* Facebook
|
|
92
92
|
* Twitter
|
|
93
93
|
* Write your own (really easy, fork and change yml)
|
|
94
|
+
|
|
95
|
+
## Notes
|
|
96
|
+
|
|
97
|
+
#### Media
|
|
98
|
+
|
|
99
|
+
Media is a logo, icon + name.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
#### Phonegap or Cordova
|
|
103
|
+
|
|
104
|
+
You may generate assets for both, but the difference is:
|
|
105
|
+
Phonegap (`www/res`) assets are used only on Phonegap Build.
|
|
106
|
+
To build locally use Cordova assets (`platforms/<platform>/*`)
|
data/lib/yamg/screenshot.rb
CHANGED
|
@@ -10,18 +10,16 @@ module YAMG
|
|
|
10
10
|
|
|
11
11
|
# Uses PhantomJS
|
|
12
12
|
def initialize(ss)
|
|
13
|
-
require 'smartshot'
|
|
14
|
-
require 'capybara'
|
|
15
|
-
require 'capybara/poltergeist'
|
|
16
13
|
@name, opts = *ss
|
|
17
14
|
uri = URI.parse(opts['url'])
|
|
18
15
|
@url = "http://#{uri}"
|
|
19
16
|
@size = opts['size'].split(/\s?,\s?/)
|
|
20
17
|
# @fetcher = Smartshot::Screenshot.new(window_size: @size)
|
|
21
18
|
@fetcher = Screencap::Fetcher.new(@url)
|
|
22
|
-
|
|
23
19
|
end
|
|
24
20
|
|
|
21
|
+
# Take the screenshot
|
|
22
|
+
# Do we need pixel depth??
|
|
25
23
|
def work(path)
|
|
26
24
|
# visit(url)
|
|
27
25
|
# page.save_screenshot("#{path}/#{@name}.png")
|
|
@@ -30,5 +28,4 @@ module YAMG
|
|
|
30
28
|
puts Rainbow("SS #{url} #{size}").black
|
|
31
29
|
end
|
|
32
30
|
end
|
|
33
|
-
|
|
34
31
|
end
|
data/lib/yamg/version.rb
CHANGED
data/lib/yamg/yamg.yml
CHANGED
|
@@ -22,6 +22,7 @@ media:
|
|
|
22
22
|
# What to do?
|
|
23
23
|
#
|
|
24
24
|
compile:
|
|
25
|
+
# Just remove if you don't need
|
|
25
26
|
|
|
26
27
|
# Web projects
|
|
27
28
|
#
|
|
@@ -41,21 +42,26 @@ compile:
|
|
|
41
42
|
android: '/path/to/project/platforms/android/'
|
|
42
43
|
# winos: '../proj'
|
|
43
44
|
|
|
45
|
+
#
|
|
44
46
|
# Assets for web stores/players
|
|
47
|
+
# Just remove if you don't need
|
|
45
48
|
#
|
|
46
|
-
# Compiles to media/
|
|
49
|
+
# Compiles to media/apple
|
|
47
50
|
apple: true
|
|
48
|
-
# Compiles to media/
|
|
51
|
+
# Compiles to media/google
|
|
49
52
|
google: true
|
|
50
|
-
# Compiles to media/
|
|
53
|
+
# Compiles to media/twitter
|
|
51
54
|
twitter: true
|
|
52
|
-
# Compiles to media/
|
|
55
|
+
# Compiles to media/facebook
|
|
53
56
|
facebook: true
|
|
54
|
-
|
|
57
|
+
|
|
58
|
+
# Custom icons/splash
|
|
59
|
+
# Compiles to media/*
|
|
55
60
|
custom:
|
|
56
61
|
icons: [32, 64, 128]
|
|
57
62
|
medias: [400, 800]
|
|
58
63
|
|
|
64
|
+
# Custom screenshots
|
|
59
65
|
screenshots:
|
|
60
66
|
home:
|
|
61
|
-
url: '
|
|
67
|
+
url: 'github.com'
|