emojidex-static-collector 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/emojidex-static-collector +5 -5
- data/emojidex-static-collector.gemspec +1 -1
- data/lib/emojidex_static_collector.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c2ad7d86bc9b1992ca3665bac72e198649cc668d3822a84104e1ff27d151554
|
4
|
+
data.tar.gz: 346ce42098432d6a0a275baa3c80911a56fb6901a810ce26d29e0cb6ebc8081f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4a63c4ede5bf30c9f98c71c8117540fb535830be6b362494b53555282ae9291ae068c64fabadd70217344e4aa7e6993802d76bdc3e12b14a36be04ea587b6cb
|
7
|
+
data.tar.gz: 5eeeb8699980743d88cd4f64d396d9dbd0c8a10d47c9b1ae896b780a912dac8caa3c29444159bf825bd9c166241fadad8fd49b40db1ddd0abbf875a3570e18c2
|
@@ -6,7 +6,7 @@ require_relative '../lib/emojidex_static_collector'
|
|
6
6
|
puts '⊂ em😜🏼jidex Static Collector⊃'
|
7
7
|
|
8
8
|
# s:size, t:type, o:output
|
9
|
-
params = ARGV.getopts('s:t:o:h', '
|
9
|
+
params = ARGV.getopts('s:t:o:h', 'standard', 'uncategorized', 'clean', 'safe')
|
10
10
|
|
11
11
|
# Set params.
|
12
12
|
params['s'] = '256' if params['s'].nil?
|
@@ -25,9 +25,9 @@ if params['h']
|
|
25
25
|
" \"char\" (raw character codes)\n" \
|
26
26
|
" \"moji\" (moji code (character code with Japanese category directories))\n" \
|
27
27
|
" \"unicode\" (unicode/utf code)\n" \
|
28
|
-
"--
|
28
|
+
"--standard UTF/Unicode only (does not export Extended)\n" \
|
29
29
|
"--uncategorized doesn't separate emoji into categorized folders\n" \
|
30
|
-
"--
|
30
|
+
"--safe don't include adult/R-18 emoji"
|
31
31
|
else
|
32
32
|
# Create folder.
|
33
33
|
out_dir = File.expand_path(params['o'], __FILE__)
|
@@ -35,6 +35,6 @@ else
|
|
35
35
|
|
36
36
|
# Generate
|
37
37
|
collector = EmojidexStaticCollector.new
|
38
|
-
collector.generate(params['o'], params['s'].to_i, params['
|
39
|
-
params['t'].to_sym, !(params['uncategorized']), params['
|
38
|
+
collector.generate(params['o'], params['s'].to_i, params['standard'],
|
39
|
+
params['t'].to_sym, !(params['uncategorized']), !(params['safe']))
|
40
40
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'emojidex-static-collector'
|
3
|
-
s.version = '0.
|
3
|
+
s.version = '0.4.0'
|
4
4
|
s.license = 'emojiOL'
|
5
5
|
s.summary = 'Create static collections from emojidex assets'
|
6
6
|
s.description = 'Generates PNG rasters from emojidex vectors in a ' \
|
@@ -23,14 +23,14 @@ class EmojidexStaticCollector
|
|
23
23
|
# :char (raw character codes)
|
24
24
|
# :moji (moji code (:char with Japanese category directories))
|
25
25
|
# :unicode (unicode codes as file names)
|
26
|
-
def generate(path = './', size = 64, utf_only = false, code_type = :en, categorized = true,
|
26
|
+
def generate(path = './', size = 64, utf_only = false, code_type = :en, categorized = true, adult = true, clean_cache = true)
|
27
27
|
cache_dir = File.join(path, '.cache')
|
28
|
-
@utf = Emojidex::Data::UTF.new(r18:
|
29
|
-
@extended = Emojidex::Data::Extended.new(r18:
|
28
|
+
@utf = Emojidex::Data::UTF.new(r18: adult)
|
29
|
+
@extended = Emojidex::Data::Extended.new(r18: adult)
|
30
30
|
@categories = Emojidex::Data::Categories.new
|
31
|
-
@utf.cache(cache_path: cache_dir, formats: [:svg])
|
32
|
-
@extended.cache(cache_path: cache_dir, formats: [:svg]) unless utf_only
|
33
|
-
collection = Emojidex::Data::Collection.new(local_load_path: "#{cache_dir}/emoji", r18:
|
31
|
+
@utf.cache(cache_path: cache_dir, formats: [:svg], r18: adult)
|
32
|
+
@extended.cache(cache_path: cache_dir, formats: [:svg], r18: adult) unless utf_only
|
33
|
+
collection = Emojidex::Data::Collection.new(local_load_path: "#{cache_dir}/emoji", r18: adult)
|
34
34
|
if categorized
|
35
35
|
_generate_categories(collection, path, size, code_type)
|
36
36
|
else
|