appiconset 2.6.0 → 2.8.0
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/.rubocop_todo.yml +4 -1
- data/README.base.md +2 -0
- data/README.ja.md +1 -0
- data/README.md +1 -0
- data/lib/appiconset/generator.rb +16 -51
- data/lib/appiconset/settings/favicon-Contents.json +39 -0
- data/lib/appiconset/settings/icns.iconset-Contents.json +64 -0
- data/lib/appiconset/version.rb +1 -1
- data/sample/tv-appstore/Icon@1x.png +0 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28423220ebc350413e2b46587e70333a39b5bed37dc3e45ba6980ba9a5486726
|
4
|
+
data.tar.gz: 6b0a4badc573fa5bf74f5d3fc3080bdcda8812685ca4b43ed82037016a2381ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73dc8fdffac661a7c8a46e2106959385f7a163e110c785f02c79e5d22d8f93a2e05ef632a7aa41220562402ccf50a69afe10aca97967032f79d47575b27f2cc7
|
7
|
+
data.tar.gz: 2d2cf96130f81644fd5a6c1cac38c12d1d1b9da3bcc9a43aa788ab582388cc76f5250c4bc4972bf2e9720b9b76eac61b325123a6d5da0ffce6a90273eba691f9
|
data/.rubocop_todo.yml
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
# Offense count: 3
|
10
10
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
11
11
|
Metrics/AbcSize:
|
12
|
-
Max:
|
12
|
+
Max: 50
|
13
13
|
|
14
14
|
# Offense count: 1
|
15
15
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
@@ -31,3 +31,6 @@ Metrics/CyclomaticComplexity:
|
|
31
31
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
32
32
|
Metrics/MethodLength:
|
33
33
|
Max: 64
|
34
|
+
|
35
|
+
Metrics/PerceivedComplexity:
|
36
|
+
Max: 12
|
data/README.base.md
CHANGED
@@ -52,6 +52,7 @@ tvOSアプリ向けのアイコンを作成するには。4640px x 1440px の画
|
|
52
52
|
| ディレクトリの名前 | サイズ | 画像 |
|
53
53
|
|--|--|--|
|
54
54
|
| tv | 400x1440 |  |
|
55
|
+
| tv-appstore | 1280x768 |  |
|
55
56
|
| tv-top-shelf | 3840x1440 | |
|
56
57
|
| tv-top-shelf-wide | 4640x1440 | |
|
57
58
|
|
@@ -106,6 +107,7 @@ The input image is the same as tv-top-shelf-wide, tv-top-shelf is the image from
|
|
106
107
|
| Directory name | Size | Image |
|
107
108
|
|--|--|--|
|
108
109
|
| tv | 400x1440 |  |
|
110
|
+
| tv-appstore | 1280x768 |  |
|
109
111
|
| tv-top-shelf | 3840x1440 | |
|
110
112
|
| tv-top-shelf-wide | 4640x1440 | |
|
111
113
|
|
data/README.ja.md
CHANGED
@@ -46,6 +46,7 @@ tvOSアプリ向けのアイコンを作成するには。4640px x 1440px の画
|
|
46
46
|
| ディレクトリの名前 | サイズ | 画像 |
|
47
47
|
|--|--|--|
|
48
48
|
| tv | 400x1440 |  |
|
49
|
+
| tv-appstore | 1280x768 |  |
|
49
50
|
| tv-top-shelf | 3840x1440 | |
|
50
51
|
| tv-top-shelf-wide | 4640x1440 | |
|
51
52
|
|
data/README.md
CHANGED
@@ -46,6 +46,7 @@ The input image is the same as tv-top-shelf-wide, tv-top-shelf is the image from
|
|
46
46
|
| Directory name | Size | Image |
|
47
47
|
|--|--|--|
|
48
48
|
| tv | 400x1440 |  |
|
49
|
+
| tv-appstore | 1280x768 |  |
|
49
50
|
| tv-top-shelf | 3840x1440 | |
|
50
51
|
| tv-top-shelf-wide | 4640x1440 | |
|
51
52
|
|
data/lib/appiconset/generator.rb
CHANGED
@@ -32,8 +32,6 @@ module Appiconset
|
|
32
32
|
def square_platforms
|
33
33
|
return unless size_match?([1024, 1024])
|
34
34
|
|
35
|
-
show_info('square')
|
36
|
-
|
37
35
|
json_dir = "#{__dir__}/settings/*.json"
|
38
36
|
|
39
37
|
Dir.glob(json_dir).each do |path|
|
@@ -44,9 +42,10 @@ module Appiconset
|
|
44
42
|
# プラットフォームごとのディレクトリ
|
45
43
|
platform = File.basename(path).gsub('-Contents.json', '')
|
46
44
|
output_dir = "#{@output}#{platform}/"
|
47
|
-
|
48
45
|
FileUtils.mkdir_p(output_dir)
|
49
46
|
|
47
|
+
show_info(platform)
|
48
|
+
|
50
49
|
json_data['images'].each do |image|
|
51
50
|
size = image['size'].match(/(.*?)x/)[1].to_f
|
52
51
|
scale = image['scale'].gsub('x', '').to_i
|
@@ -66,12 +65,20 @@ module Appiconset
|
|
66
65
|
rescue StandardError
|
67
66
|
# none
|
68
67
|
end
|
68
|
+
|
69
|
+
if platform == 'icns.iconset' && RbConfig::CONFIG['host_os'].match(/darwin|mac os/)
|
70
|
+
# macOSで実行可能
|
71
|
+
system("iconutil -c icns --output #{output_dir}/Icon.icns #{output_dir}/")
|
72
|
+
elsif platform == 'favicon'
|
73
|
+
images = Dir.glob("#{output_dir}*")
|
74
|
+
image = Magick::ImageList.new(*images)
|
75
|
+
image.format = 'ICO'
|
76
|
+
image.write("#{output_dir}favicon.ico")
|
77
|
+
end
|
69
78
|
end
|
70
79
|
end
|
71
80
|
|
72
|
-
|
73
|
-
# rubocop:todo Metrics/AbcSize
|
74
|
-
def any_platforms # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity
|
81
|
+
def any_platforms
|
75
82
|
platforms = [
|
76
83
|
{
|
77
84
|
name: 'universal',
|
@@ -107,34 +114,10 @@ module Appiconset
|
|
107
114
|
]
|
108
115
|
},
|
109
116
|
{
|
110
|
-
name: '
|
111
|
-
size: [
|
112
|
-
contents: [
|
113
|
-
{ width: 1024, height: 1024, name: 'icon_512x512@2x.png' },
|
114
|
-
{ width: 512, height: 512, name: 'icon_512x512.png' },
|
115
|
-
{ width: 512, height: 512, name: 'icon_256x256@2x.png' },
|
116
|
-
{ width: 256, height: 256, name: 'icon_256x256.png' },
|
117
|
-
{ width: 256, height: 256, name: 'icon_128x128@2x.png' },
|
118
|
-
{ width: 128, height: 128, name: 'icon_128x128.png' },
|
119
|
-
{ width: 128, height: 128, name: 'icon_64x64@2x.png' },
|
120
|
-
{ width: 64, height: 64, name: 'icon_64x64.png' },
|
121
|
-
{ width: 64, height: 64, name: 'icon_32x32@2x.png' },
|
122
|
-
{ width: 32, height: 32, name: 'icon_32x32.png' },
|
123
|
-
{ width: 32, height: 32, name: 'icon_16x16@2x.png' },
|
124
|
-
{ width: 16, height: 16, name: 'icon_16x16.png' }
|
125
|
-
]
|
126
|
-
},
|
127
|
-
{
|
128
|
-
name: 'favicon',
|
129
|
-
size: [1024, 1024],
|
117
|
+
name: 'tv-appstore',
|
118
|
+
size: [4640, 1440],
|
130
119
|
contents: [
|
131
|
-
{ width:
|
132
|
-
{ width: 128, height: 128, name: 'icon_128x128.png' },
|
133
|
-
{ width: 64, height: 64, name: 'icon_64x64.png' },
|
134
|
-
{ width: 48, height: 48, name: 'icon_48x48.png' },
|
135
|
-
{ width: 32, height: 32, name: 'icon_32x32.png' },
|
136
|
-
{ width: 24, height: 24, name: 'icon_24x24.png' },
|
137
|
-
{ width: 16, height: 16, name: 'icon_16x16.png' }
|
120
|
+
{ width: 1280, height: 768, name: 'Icon@1x.png' }
|
138
121
|
]
|
139
122
|
}
|
140
123
|
]
|
@@ -163,26 +146,8 @@ module Appiconset
|
|
163
146
|
image.format = 'PNG'
|
164
147
|
image.write(output_dir + name)
|
165
148
|
end
|
166
|
-
|
167
|
-
if platform_name == 'icns.iconset' && RbConfig::CONFIG['host_os'].match(/darwin|mac os/)
|
168
|
-
# macOSで実行可能
|
169
|
-
show_info('icns')
|
170
|
-
system("iconutil -c icns --output #{@output}Icon.icns #{@output}icns.iconset/")
|
171
|
-
elsif platform_name == 'favicon'
|
172
|
-
images = platforms.find do |x|
|
173
|
-
x[:name] == 'favicon'
|
174
|
-
end[:contents].map do |x| # rubocop:disable Style/MultilineBlockChain
|
175
|
-
"#{output_dir}#{x[:name]}"
|
176
|
-
end
|
177
|
-
|
178
|
-
image = Magick::ImageList.new(*images)
|
179
|
-
image.format = 'ICO'
|
180
|
-
image.write("#{@output}favicon/favicon.ico")
|
181
|
-
end
|
182
149
|
end
|
183
150
|
end
|
184
|
-
# rubocop:enable Metrics/AbcSize
|
185
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
186
151
|
|
187
152
|
private
|
188
153
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"images": [
|
3
|
+
{
|
4
|
+
"size": "256x256",
|
5
|
+
"filename": "icon_256x256.png",
|
6
|
+
"scale": "1x"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"size": "128x128",
|
10
|
+
"filename": "icon_128x128.png",
|
11
|
+
"scale": "1x"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"size": "64x64",
|
15
|
+
"filename": "icon_64x64.png",
|
16
|
+
"scale": "1x"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"size": "48x48",
|
20
|
+
"filename": "icon_48x48.png",
|
21
|
+
"scale": "1x"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"size": "32x32",
|
25
|
+
"filename": "icon_32x32.png",
|
26
|
+
"scale": "1x"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"size": "24x24",
|
30
|
+
"filename": "icon_24x24.png",
|
31
|
+
"scale": "1x"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"size": "16x16",
|
35
|
+
"filename": "icon_16x16.png",
|
36
|
+
"scale": "1x"
|
37
|
+
}
|
38
|
+
]
|
39
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
{
|
2
|
+
"images": [
|
3
|
+
{
|
4
|
+
"size": "512x512",
|
5
|
+
"filename": "icon_512x512@2x.png",
|
6
|
+
"scale": "2x"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"size": "512x512",
|
10
|
+
"filename": "icon_512x512.png",
|
11
|
+
"scale": "1x"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"size": "256x256",
|
15
|
+
"filename": "icon_256x256@2x.png",
|
16
|
+
"scale": "2x"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"size": "256x256",
|
20
|
+
"filename": "icon_256x256.png",
|
21
|
+
"scale": "1x"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"size": "128x128",
|
25
|
+
"filename": "icon_128x128@2x.png",
|
26
|
+
"scale": "2x"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"size": "128x128",
|
30
|
+
"filename": "icon_128x128.png",
|
31
|
+
"scale": "1x"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"size": "64x64",
|
35
|
+
"filename": "icon_64x64@2x.png",
|
36
|
+
"scale": "2x"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"size": "64x64",
|
40
|
+
"filename": "icon_64x64.png",
|
41
|
+
"scale": "1x"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"size": "32x32",
|
45
|
+
"filename": "icon_32x32@2x.png",
|
46
|
+
"scale": "2x"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"size": "32x32",
|
50
|
+
"filename": "icon_32x32.png",
|
51
|
+
"scale": "1x"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"size": "16x16",
|
55
|
+
"filename": "icon_16x16@2x.png",
|
56
|
+
"scale": "2x"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"size": "16x16",
|
60
|
+
"filename": "icon_16x16.png",
|
61
|
+
"scale": "1x"
|
62
|
+
}
|
63
|
+
]
|
64
|
+
}
|
data/lib/appiconset/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appiconset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arthur87
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -89,6 +89,8 @@ files:
|
|
89
89
|
- lib/appiconset.rb
|
90
90
|
- lib/appiconset/cli.rb
|
91
91
|
- lib/appiconset/generator.rb
|
92
|
+
- lib/appiconset/settings/favicon-Contents.json
|
93
|
+
- lib/appiconset/settings/icns.iconset-Contents.json
|
92
94
|
- lib/appiconset/settings/iphone-xcode9.1-Contents.json
|
93
95
|
- lib/appiconset/settings/mac-xcode9.1-Contents.json
|
94
96
|
- lib/appiconset/settings/mipmap-hdpi-Contents.json
|
@@ -99,6 +101,7 @@ files:
|
|
99
101
|
- lib/appiconset/settings/universal-xcode9.1-Contents.json
|
100
102
|
- lib/appiconset/settings/watch-xcode10.0-Contents.json
|
101
103
|
- lib/appiconset/version.rb
|
104
|
+
- sample/tv-appstore/Icon@1x.png
|
102
105
|
- sample/tv-top-shelf-wide/Icon@1x.png
|
103
106
|
- sample/tv-top-shelf-wide/Icon@2x.png
|
104
107
|
- sample/tv-top-shelf/Icon@1x.png
|
@@ -127,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
130
|
- !ruby/object:Gem::Version
|
128
131
|
version: '0'
|
129
132
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
133
|
+
rubygems_version: 3.3.3
|
131
134
|
signing_key:
|
132
135
|
specification_version: 4
|
133
136
|
summary: appiconset generator for Xcode
|