frameit 2.7.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -3
- data/lib/frameit.rb +1 -0
- data/lib/frameit/editor.rb +5 -1
- data/lib/frameit/offsets.rb +0 -2
- data/lib/frameit/screenshot.rb +1 -1
- data/lib/frameit/strings_parser.rb +4 -0
- data/lib/frameit/template_finder.rb +0 -1
- data/lib/frameit/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5d29de960084e2ece56a732f13b8ec0d8a1833a
|
4
|
+
data.tar.gz: bbdf114d3489c4c8d908fff8501a7e1a43343c70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f425e0880bd3e12085471ebc0caef3ccbe3b56c3dbe890c790b73c4e8afc6e22eeaa87ea27423a705fcb817930cd899f1b221f1590d6139e041bba9e41440e18
|
7
|
+
data.tar.gz: c39aac2349ea4f6685fe759864d42083b88a3f51a0a6ba942a72f99d5104b54bab2a9b2b752192bd878fa47d92ab0942be5c2cda675585badbecc34113eb5f6c
|
data/README.md
CHANGED
@@ -36,6 +36,9 @@ frameit
|
|
36
36
|
|
37
37
|
###### Quickly put your screenshots into the right device frames
|
38
38
|
|
39
|
+
`frameit` allows you to put a gorgeous device frame around your iOS screenshots just by running one simple command. Use `frameit` to prepare perfect screenshots for the App Store, your website, QA or emails.
|
40
|
+
|
41
|
+
|
39
42
|
Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.com/FastlaneTools)
|
40
43
|
|
41
44
|
|
@@ -52,7 +55,6 @@ Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.c
|
|
52
55
|
<h5 align="center"><code>frameit</code> is part of <a href="https://fastlane.tools">fastlane</a>: The easiest way to automate building and releasing your iOS and Android apps.</h5>
|
53
56
|
|
54
57
|
|
55
|
-
|
56
58
|
# Features
|
57
59
|
|
58
60
|
Put a gorgeous device frame around your iOS screenshots just by running one simple command. Support for:
|
@@ -173,7 +175,7 @@ Use it to define the general information:
|
|
173
175
|
]
|
174
176
|
}
|
175
177
|
```
|
176
|
-
The `show_complete_frame` value specifies whether frameit should shrink the device and frame so that they show in full in the framed screenshot. If it is false, then they can hang over the bottom of the screenshot.
|
178
|
+
The `show_complete_frame` value specifies whether `frameit` should shrink the device and frame so that they show in full in the framed screenshot. If it is false, then they can hang over the bottom of the screenshot.
|
177
179
|
|
178
180
|
The `filter` value is a part of the screenshot named for which the given option should be used. If a screenshot is named `iPhone5_Brainstorming.png` the first entry in the `data` array will be used.
|
179
181
|
|
@@ -189,6 +191,7 @@ The `keyword.strings` and `title.strings` are standard `.strings` file you alrea
|
|
189
191
|
|
190
192
|
**Note:** These `.strings` files **MUST** be utf-16 encoded (UTF-16 LE with BOM). They also must begin with an empty line. If you are having trouble see [issue #1740](https://github.com/fastlane/fastlane/issues/1740)
|
191
193
|
|
194
|
+
**Note:** You **MUST** provide a background if you want titles. `frameit` will not add the tiles if a background is not specified.
|
192
195
|
|
193
196
|
#### Uploading screenshots to iTC
|
194
197
|
|
@@ -196,7 +199,7 @@ Use [deliver](https://github.com/fastlane/fastlane/tree/master/deliver) to uploa
|
|
196
199
|
|
197
200
|
### Mac
|
198
201
|
|
199
|
-
With `frameit` 2.0 it's possible to also frame
|
202
|
+
With `frameit` 2.0 it's possible to also frame macOS Application screenshots. You have to provide the following:
|
200
203
|
|
201
204
|
- The `offset` information so `frameit` knows where to put your screenshots
|
202
205
|
- A path to a `background`, which should contain both the background and the Mac
|
data/lib/frameit.rb
CHANGED
data/lib/frameit/editor.rb
CHANGED
@@ -231,7 +231,7 @@ module Frameit
|
|
231
231
|
results = {}
|
232
232
|
words.each do |key|
|
233
233
|
# Create empty background
|
234
|
-
empty_path = File.join(
|
234
|
+
empty_path = File.join(Frameit::ROOT, "lib/assets/empty.png")
|
235
235
|
title_image = MiniMagick::Image.open(empty_path)
|
236
236
|
image_height = max_height # gets trimmed afterwards anyway, and on the iPad the `y` would get cut
|
237
237
|
title_image.combine_options do |i|
|
@@ -245,6 +245,9 @@ module Frameit
|
|
245
245
|
UI.verbose("Adding text '#{text}'")
|
246
246
|
|
247
247
|
text.gsub! '\n', "\n"
|
248
|
+
text.gsub!(/(?<!\\)(')/) { |s| "\\#{s}" } # escape unescaped apostrophes with a backslash
|
249
|
+
|
250
|
+
interline_spacing = fetch_config['interline_spacing']
|
248
251
|
|
249
252
|
# Add the actual title
|
250
253
|
title_image.combine_options do |i|
|
@@ -252,6 +255,7 @@ module Frameit
|
|
252
255
|
i.gravity "Center"
|
253
256
|
i.pointsize actual_font_size
|
254
257
|
i.draw "text 0,0 '#{text}'"
|
258
|
+
i.interline_spacing interline_spacing if interline_spacing
|
255
259
|
i.fill fetch_config[key.to_s]['color']
|
256
260
|
end
|
257
261
|
title_image.trim # remove white space
|
data/lib/frameit/offsets.rb
CHANGED
@@ -2,7 +2,6 @@ module Frameit
|
|
2
2
|
class Offsets
|
3
3
|
# Returns the image offset needed for a certain device type for a given orientation
|
4
4
|
# uses deliver to detect the screen size
|
5
|
-
# rubocop:disable Metrics/MethodLength
|
6
5
|
def self.image_offset(screenshot)
|
7
6
|
size = Deliver::AppScreenshot::ScreenSize
|
8
7
|
case screenshot.orientation_name
|
@@ -88,6 +87,5 @@ module Frameit
|
|
88
87
|
end
|
89
88
|
end
|
90
89
|
end
|
91
|
-
# rubocop:enable Metrics/MethodLength
|
92
90
|
end
|
93
91
|
end
|
data/lib/frameit/screenshot.rb
CHANGED
@@ -4,7 +4,7 @@ module Frameit
|
|
4
4
|
attr_accessor :path # path to the screenshot
|
5
5
|
attr_accessor :size # size in px array of 2 elements: height and width
|
6
6
|
attr_accessor :screen_size # deliver screen size type, is unique per device type, used in device_name
|
7
|
-
attr_accessor :color # the color to use for the frame
|
7
|
+
attr_accessor :color # the color to use for the frame (from Frameit::Color)
|
8
8
|
|
9
9
|
# path: Path to screenshot
|
10
10
|
# color: Color to use for the frame
|
data/lib/frameit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frameit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.52.1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.52.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
259
|
version: '0'
|
260
260
|
requirements: []
|
261
261
|
rubyforge_project:
|
262
|
-
rubygems_version: 2.
|
262
|
+
rubygems_version: 2.6.6
|
263
263
|
signing_key:
|
264
264
|
specification_version: 4
|
265
265
|
summary: Quickly put your screenshots into the right device frames
|