imsticker 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +58 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +50 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/imsticker +10 -0
- data/imsticker.gemspec +24 -0
- data/lib/imsticker.rb +276 -0
- data/lib/imsticker/version.rb +3 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1b2efd0f29a67f00feb9ef35f8017b470edb7b99
|
4
|
+
data.tar.gz: f798b11ff211b44146568593725bc99ff66ba84e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 216ad3c6e803e52f876493b952ddd10ab93af75826a5184629683ec6866bd9186322138139ba7f5635470f9e18534ce21c194a937b785abc15cd6daf02f7d51c
|
7
|
+
data.tar.gz: dd4fa68a1ebcc8b52f37e02d6aa8d9592b18cbad7566e0f344c09d2eac323ed21f7f818257cf5437ba3b6b9b6d23de732c87a40512e71af73a33bcb4719e68fa
|
data/.gitignore
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
/Gemfile.lock
|
2
|
+
*.gem
|
3
|
+
*.rbc
|
4
|
+
/.config
|
5
|
+
/coverage/
|
6
|
+
/InstalledFiles
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/spec/examples.txt
|
10
|
+
/test/tmp/
|
11
|
+
/test/version_tmp/
|
12
|
+
/tmp/
|
13
|
+
|
14
|
+
# Used by dotenv library to load environment variables.
|
15
|
+
# .env
|
16
|
+
|
17
|
+
## Specific to RubyMotion:
|
18
|
+
.dat*
|
19
|
+
.repl_history
|
20
|
+
build/
|
21
|
+
*.bridgesupport
|
22
|
+
build-iPhoneOS/
|
23
|
+
build-iPhoneSimulator/
|
24
|
+
|
25
|
+
## Specific to RubyMotion (use of CocoaPods):
|
26
|
+
#
|
27
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
28
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
29
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
30
|
+
#
|
31
|
+
# vendor/Pods/
|
32
|
+
|
33
|
+
## Documentation cache and generated files:
|
34
|
+
/.yardoc/
|
35
|
+
/_yardoc/
|
36
|
+
/doc/
|
37
|
+
/rdoc/
|
38
|
+
|
39
|
+
## Environment normalization:
|
40
|
+
/.bundle/
|
41
|
+
/vendor/bundle
|
42
|
+
/lib/bundler/man/
|
43
|
+
|
44
|
+
# for a library or gem, you might want to ignore these files since the code is
|
45
|
+
# intended to run in multiple environments; otherwise, check them in:
|
46
|
+
# Gemfile.lock
|
47
|
+
# .ruby-version
|
48
|
+
# .ruby-gemset
|
49
|
+
|
50
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
51
|
+
.rvmrc
|
52
|
+
|
53
|
+
lib/stickers
|
54
|
+
lib/output
|
55
|
+
lib/info.json
|
56
|
+
lib/test.rb
|
57
|
+
lib/icon1024x768*
|
58
|
+
lib/icon1024x1024*
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Nico Prananta
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Imsticker
|
2
|
+
|
3
|
+
This is a gem to quickly create iMessage Sticker Pack Xcode project from command line. You just need to prepare your sticker images and sticker sequence in a folder, and run one command.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
$ gem install -g imsticker
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
1. Create a directory for your project.
|
12
|
+
2. Create `stickers` directory inside your project directory and put all your stickers in it. Sticker sequence should be grouped in a directory.
|
13
|
+
3. Create an icon for the sticker pack with name `icon1024x768.png` and size `1024x768 px`.
|
14
|
+
4. Run `imsticker init` in the root directory of your project.
|
15
|
+
5. Edit `info.json` file to edit the name of your project.
|
16
|
+
6. Run `imsticker`.
|
17
|
+
7. Your Xcode project will be created inside `output` directory.
|
18
|
+
|
19
|
+
## Stickers
|
20
|
+
|
21
|
+
Prepare your stickers in structure like the following
|
22
|
+
|
23
|
+
```
|
24
|
+
- project_dir
|
25
|
+
|- info.json
|
26
|
+
|- icon1024x768.png
|
27
|
+
|- stickers
|
28
|
+
|- happy.png
|
29
|
+
|- mad.png
|
30
|
+
|- dancing
|
31
|
+
|- dancing01.png
|
32
|
+
|- dancing02.png
|
33
|
+
|- dancing03.png
|
34
|
+
|- dancing04.png
|
35
|
+
|- dancing05.png
|
36
|
+
|- dancing06.png
|
37
|
+
|- dancing07.png
|
38
|
+
```
|
39
|
+
|
40
|
+
## Demo
|
41
|
+
|
42
|
+
[Here](https://www.dropbox.com/s/tre94ak4fl5dsvk/imsticker.mp4?dl=0).
|
43
|
+
|
44
|
+
## Contributing
|
45
|
+
|
46
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/nicnocquee/imsticker.
|
47
|
+
|
48
|
+
## License
|
49
|
+
|
50
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "imsticker"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/exe/imsticker
ADDED
data/imsticker.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'imsticker/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "imsticker"
|
8
|
+
spec.version = Imsticker::VERSION
|
9
|
+
spec.authors = ["Nico Prananta"]
|
10
|
+
spec.email = ["nicnocquee@users.noreply.github.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Quickly create iMessage Sticker Pack Xcode Project}
|
13
|
+
spec.description = %q{This is a gem to quickly create iMessage Sticker Pack Xcode project from command line. You just need to prepare your sticker images and sticker sequence in a folder, and run one command.}
|
14
|
+
spec.homepage = "https://github.com/nicnocquee/imsticker.git"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
end
|
data/lib/imsticker.rb
ADDED
@@ -0,0 +1,276 @@
|
|
1
|
+
require "imsticker/version"
|
2
|
+
require 'zip'
|
3
|
+
require 'open-uri'
|
4
|
+
require 'json'
|
5
|
+
require 'image_resizer'
|
6
|
+
require 'pathname'
|
7
|
+
|
8
|
+
module Imsticker
|
9
|
+
|
10
|
+
def self.generate
|
11
|
+
info_message
|
12
|
+
# check if info.json exists
|
13
|
+
if File.exist?("info.json") == false
|
14
|
+
raise "Where is your info.json file? Create it by running `imsticker init`"
|
15
|
+
end
|
16
|
+
if Dir.exist?('stickers') == false
|
17
|
+
raise "Cannot find `stickers` directory in current directory."
|
18
|
+
end
|
19
|
+
|
20
|
+
# check if have downloaded template
|
21
|
+
# if yes, check version. if new version exists, download new template
|
22
|
+
# if no, download template
|
23
|
+
tmp_dir = File.join(Dir.home, ".imsticker")
|
24
|
+
if Dir.exist?(tmp_dir) == false
|
25
|
+
Dir.mkdir(tmp_dir)
|
26
|
+
end
|
27
|
+
|
28
|
+
template_dir = File.join(tmp_dir, 'template')
|
29
|
+
version_file = File.join(template_dir, 'version')
|
30
|
+
if File.exist?(version_file) == false
|
31
|
+
download_template(tmp_dir, template_dir)
|
32
|
+
else
|
33
|
+
downloaded_version = File.read(version_file)
|
34
|
+
puts "Current template version: #{downloaded_version}"
|
35
|
+
recent_version = downloaded_version
|
36
|
+
open('https://raw.githubusercontent.com/nicnocquee/iOStickersTemplate/master/version') {|f|
|
37
|
+
recent_version = f.read
|
38
|
+
}
|
39
|
+
puts "Online version #{recent_version}"
|
40
|
+
if downloaded_version != recent_version
|
41
|
+
puts "New template version available. Downloading ..."
|
42
|
+
download_template(tmp_dir, template_dir)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# copy the template to temp directory
|
47
|
+
proj_tmp_dir = Dir.mktmpdir
|
48
|
+
FileUtils.cp_r template_dir, proj_tmp_dir
|
49
|
+
proj_tmp_dir = File.join(proj_tmp_dir, 'template')
|
50
|
+
|
51
|
+
# read info file
|
52
|
+
info = JSON.parse(File.read('./info.json'))
|
53
|
+
info['name'] = "#{info['name'].split.map(&:capitalize)*' '}"
|
54
|
+
|
55
|
+
# list files in stickers folder. single file = single sticker image, a folder = sticker sequence
|
56
|
+
supported_exts = ['png', 'apng', 'gif', 'jpeg', 'jpg']
|
57
|
+
supported_files = File.join(File.join('.', 'stickers'), "*.{#{supported_exts.join(',')}}")
|
58
|
+
|
59
|
+
sticker_target_directory = File.join(File.join(File.join(proj_tmp_dir, 'StickerPackExtension'), 'Stickers.xcstickers'), "Sticker Pack.stickerpack")
|
60
|
+
sticker_contents_json = {
|
61
|
+
'info' => {
|
62
|
+
'version' => 1,
|
63
|
+
'author' => 'xcode'
|
64
|
+
},
|
65
|
+
'properties' => {
|
66
|
+
'filename' => ''
|
67
|
+
}
|
68
|
+
}
|
69
|
+
sticker_sequence_contents_json = {
|
70
|
+
'info' => {
|
71
|
+
'version' => 1,
|
72
|
+
'author' => 'xcode'
|
73
|
+
},
|
74
|
+
'properties' => {
|
75
|
+
"duration" => 15,
|
76
|
+
"duration-type" => "fps",
|
77
|
+
"repetitions" => 0
|
78
|
+
},
|
79
|
+
'frames' => []
|
80
|
+
}
|
81
|
+
stickers_contents_json_file = File.join(sticker_target_directory, 'Contents.json')
|
82
|
+
stickers_contents_json = JSON.parse(File.read(stickers_contents_json_file))
|
83
|
+
|
84
|
+
# create a directory in Sticker Pack.stickerpack directory for each of the stickers. e.g., file_name.sticker, file_name.stickersequence
|
85
|
+
puts "Reading stickers directory ..."
|
86
|
+
number_of_stickers = 0
|
87
|
+
Dir.entries('stickers').select {|entry|
|
88
|
+
if entry != '.' && entry != '..'
|
89
|
+
file = File.join('stickers', entry)
|
90
|
+
ext_with_period = File.extname(file)
|
91
|
+
file_name_without_ext = File.basename(file, ext_with_period)
|
92
|
+
ext = ext_with_period.downcase.strip.split('.').last
|
93
|
+
sticker_entry = ''
|
94
|
+
# if single sticker, write Contents.json in it with content following Contents-sticker.json, copy the image file to the directory.
|
95
|
+
if supported_exts.include?(ext)
|
96
|
+
number_of_stickers += 1
|
97
|
+
puts " Found #{entry} sticker"
|
98
|
+
sticker_entry = "#{file_name_without_ext}.sticker"
|
99
|
+
sticker_dir = File.join(sticker_target_directory, sticker_entry)
|
100
|
+
Dir.mkdir(sticker_dir)
|
101
|
+
FileUtils.cp(file, File.join(sticker_dir, entry))
|
102
|
+
sticker_contents_json['properties']['filename'] = entry
|
103
|
+
json = JSON.generate(sticker_contents_json)
|
104
|
+
File.open(File.join(sticker_dir, 'Contents.json'), "w") {|f|
|
105
|
+
f.write(json)
|
106
|
+
}
|
107
|
+
end
|
108
|
+
|
109
|
+
# if stickersequence, write Contents.json in it with content following Contents-stickersequence.json, copy the images files to the dir.
|
110
|
+
if File.directory?(file)
|
111
|
+
puts " Found #{entry} sticker sequence"
|
112
|
+
number_of_stickers += 1
|
113
|
+
sticker_entry = "#{file_name_without_ext}.stickersequence"
|
114
|
+
sticker_dir = File.join(sticker_target_directory, sticker_entry)
|
115
|
+
Dir.mkdir(sticker_dir)
|
116
|
+
Dir.entries(file).sort_by {|f| File.basename(f)}.select {|f|
|
117
|
+
if f != '.' && f != '..'
|
118
|
+
FileUtils.cp(File.join(file, f), File.join(sticker_dir, f))
|
119
|
+
sticker_sequence_contents_json['frames'].push({
|
120
|
+
'filename' => f
|
121
|
+
})
|
122
|
+
end
|
123
|
+
}
|
124
|
+
json = JSON.generate(sticker_sequence_contents_json)
|
125
|
+
File.open(File.join(sticker_dir, 'Contents.json'), "w") {|f|
|
126
|
+
f.write(json)
|
127
|
+
}
|
128
|
+
end
|
129
|
+
|
130
|
+
# add `stickers` key in Sticker Pack.stickerpack/Contents.json with value an array of dictionaries: { "filename": "stickername.sticker" }
|
131
|
+
if sticker_entry != ''
|
132
|
+
stickers_contents_json['stickers'].push({
|
133
|
+
'filename' => sticker_entry
|
134
|
+
})
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
# write Sticker Pack.stickerpack/Contents.json
|
139
|
+
json = JSON.generate(stickers_contents_json)
|
140
|
+
File.open(stickers_contents_json_file, "w") {|f|
|
141
|
+
f.write(json)
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
puts "Processed #{number_of_stickers} stickers."
|
146
|
+
|
147
|
+
# check if user provides icons
|
148
|
+
rectangle_icon = 'icon1024x768.png'
|
149
|
+
icons_directory = File.join(File.join(File.join(proj_tmp_dir, 'StickerPackExtension'), 'Stickers.xcstickers'), "iMessage App Icon.stickersiconset")
|
150
|
+
if File.exist?(rectangle_icon)
|
151
|
+
puts "Found icon. Creating icons ..."
|
152
|
+
processor = ImageResizer::Processor.new
|
153
|
+
sizes = ['32x24', '27x20', '60x45', '74x55', '67x50']
|
154
|
+
sizes.each {|size|
|
155
|
+
width = size.split('x')[0].to_i
|
156
|
+
height = size.split('x')[1].to_i
|
157
|
+
[1, 2, 3].each {|scale|
|
158
|
+
scale_string = ( scale > 1 ) ? "@#{scale}x.png" : ".png"
|
159
|
+
filename = "#{size}#{scale_string}"
|
160
|
+
image = ImageResizer::TempObject.new(File.new(rectangle_icon))
|
161
|
+
tempfile = processor.resize(image, :width => scale * width, :height => scale * height)
|
162
|
+
File.open(File.join(icons_directory, filename), 'wb') { |f| f.write(File.read(tempfile)) }
|
163
|
+
}
|
164
|
+
}
|
165
|
+
square_sizes = ['29x29']
|
166
|
+
crop_length = ((1024.0-768.0)/2.0)/1024.0
|
167
|
+
square_sizes.each {|size|
|
168
|
+
width = size.split('x')[0].to_i
|
169
|
+
upper_left = [crop_length, 0]
|
170
|
+
lower_right = [1-crop_length, 1]
|
171
|
+
[1, 2, 3].each {|scale|
|
172
|
+
scale_string = ( scale > 1 ) ? "@#{scale}x.png" : ".png"
|
173
|
+
filename = "#{size}#{scale_string}"
|
174
|
+
image = ImageResizer::TempObject.new(File.new(rectangle_icon))
|
175
|
+
tempfile = processor.crop_to_frame_and_resize(image,
|
176
|
+
:upper_left => upper_left,
|
177
|
+
:lower_right => lower_right,
|
178
|
+
:width => scale * width
|
179
|
+
)
|
180
|
+
File.open(File.join(icons_directory, filename), 'wb') { |f| f.write(File.read(tempfile)) }
|
181
|
+
|
182
|
+
# ipad 2x
|
183
|
+
if scale == 2
|
184
|
+
filename2 = "#{size}@#{scale}x-1.png"
|
185
|
+
File.open(File.join(icons_directory, filename2), 'wb') { |f| f.write(File.read(tempfile)) }
|
186
|
+
end
|
187
|
+
}
|
188
|
+
}
|
189
|
+
else
|
190
|
+
puts "Cannot find `icon1024x768.png`. Add `icon1024x768.png` to automate icons creation."
|
191
|
+
end
|
192
|
+
|
193
|
+
# cp the app store image
|
194
|
+
FileUtils.cp rectangle_icon, File.join(icons_directory, "#{info['name']}.png")
|
195
|
+
|
196
|
+
# copy the modified template to output directory
|
197
|
+
puts "Writing project to output directory ..."
|
198
|
+
FileUtils.rm_rf './output'
|
199
|
+
FileUtils.cp_r proj_tmp_dir, './output'
|
200
|
+
|
201
|
+
# Rename project
|
202
|
+
puts "Renaming project name ..."
|
203
|
+
xcodeproj = File.join('./output', 'Awesome Stickers.xcodeproj')
|
204
|
+
new_xcodeproj = File.join('./output', "#{info['name']}.xcodeproj")
|
205
|
+
pbxproj = File.join(xcodeproj, 'project.pbxproj')
|
206
|
+
new_pbxproj = File.read(pbxproj).gsub('Awesome Stickers', info['name'])
|
207
|
+
xcworkspacedata = File.join(File.join(xcodeproj, 'project.xcworkspace'), 'contents.xcworkspacedata')
|
208
|
+
new_xcworkspacedata = File.read(xcworkspacedata).gsub('Awesome Stickers', info['name'])
|
209
|
+
File.open(pbxproj, 'wb') {|f| f.write(new_pbxproj)}
|
210
|
+
File.open(xcworkspacedata, 'wb') {|f| f.write(new_xcworkspacedata)}
|
211
|
+
File.rename xcodeproj, new_xcodeproj
|
212
|
+
|
213
|
+
info_plist = File.join(File.join('./output', 'TestStickers'), 'Info.plist')
|
214
|
+
info_plist_content = File.read(info_plist)
|
215
|
+
new_info_plist_content = info_plist_content.gsub('Awesome Stickers', info['name'])
|
216
|
+
File.open(info_plist, 'wb') {|f| f.write(new_info_plist_content)}
|
217
|
+
|
218
|
+
info_plist = File.join(File.join('./output', 'StickerPackExtension'), 'Info.plist')
|
219
|
+
info_plist_content = File.read(info_plist)
|
220
|
+
new_info_plist_content = info_plist_content.gsub('Awesome Stickers', info['name'])
|
221
|
+
File.open(info_plist, 'wb') {|f| f.write(new_info_plist_content)}
|
222
|
+
|
223
|
+
puts "Done. Now you can open file \"output/#{info['name']}.xcodeproj\" and run it in the simulator."
|
224
|
+
end
|
225
|
+
|
226
|
+
def self.download_template(tmp_dir, template_dir)
|
227
|
+
puts 'No templates. Downloading ...'
|
228
|
+
if File.exist?(template_dir)
|
229
|
+
FileUtils.rm_rf template_dir
|
230
|
+
end
|
231
|
+
parent = Pathname.new(template_dir).parent()
|
232
|
+
if File.exist?(parent)
|
233
|
+
FileUtils.rm_rf File.join(parent, 'iOStickersTemplate-master')
|
234
|
+
end
|
235
|
+
open('https://github.com/nicnocquee/iOStickersTemplate/archive/master.zip') {|f|
|
236
|
+
master_zip = File.join(tmp_dir, "master.zip")
|
237
|
+
File.open(master_zip,"wb") do |file|
|
238
|
+
file.puts f.read
|
239
|
+
puts 'Extracting sticker template ...'
|
240
|
+
Zip::File.open(master_zip) do |zip_file|
|
241
|
+
zip_file.each do |entry|
|
242
|
+
# puts "\tExtracting #{entry.name}"
|
243
|
+
dest_file = File.join(tmp_dir, entry.name)
|
244
|
+
entry.extract(dest_file)
|
245
|
+
end
|
246
|
+
File.rename(File.join(tmp_dir, 'iOStickersTemplate-master'), template_dir)
|
247
|
+
puts "Template downloaded."
|
248
|
+
File.delete(master_zip)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
}
|
252
|
+
end
|
253
|
+
|
254
|
+
def self.info_message
|
255
|
+
puts ""
|
256
|
+
puts ""
|
257
|
+
puts "================================"
|
258
|
+
puts "imsticker v#{Imsticker::VERSION}"
|
259
|
+
puts "================================"
|
260
|
+
puts ""
|
261
|
+
puts ""
|
262
|
+
end
|
263
|
+
|
264
|
+
def self.init
|
265
|
+
info_message
|
266
|
+
info = {
|
267
|
+
"name" => "Awesome stickers",
|
268
|
+
"website" => "http://delightfuldev.com"
|
269
|
+
}
|
270
|
+
json = JSON.pretty_generate(info)
|
271
|
+
File.open('info.json', "w") {|f|
|
272
|
+
f.write(json)
|
273
|
+
}
|
274
|
+
puts "Created `info.json` in current directory. Edit it to your liking."
|
275
|
+
end
|
276
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: imsticker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.7
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nico Prananta
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-07-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.12'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: This is a gem to quickly create iMessage Sticker Pack Xcode project from
|
42
|
+
command line. You just need to prepare your sticker images and sticker sequence
|
43
|
+
in a folder, and run one command.
|
44
|
+
email:
|
45
|
+
- nicnocquee@users.noreply.github.com
|
46
|
+
executables:
|
47
|
+
- imsticker
|
48
|
+
extensions: []
|
49
|
+
extra_rdoc_files: []
|
50
|
+
files:
|
51
|
+
- ".gitignore"
|
52
|
+
- Gemfile
|
53
|
+
- LICENSE.txt
|
54
|
+
- README.md
|
55
|
+
- Rakefile
|
56
|
+
- bin/console
|
57
|
+
- bin/setup
|
58
|
+
- exe/imsticker
|
59
|
+
- imsticker.gemspec
|
60
|
+
- lib/imsticker.rb
|
61
|
+
- lib/imsticker/version.rb
|
62
|
+
homepage: https://github.com/nicnocquee/imsticker.git
|
63
|
+
licenses:
|
64
|
+
- MIT
|
65
|
+
metadata: {}
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubyforge_project:
|
82
|
+
rubygems_version: 2.5.1
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: Quickly create iMessage Sticker Pack Xcode Project
|
86
|
+
test_files: []
|
87
|
+
has_rdoc:
|