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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9a9e9c8933d6ada4337136856f460869e332ecac613773fac999eeef3d69e89
4
- data.tar.gz: 5cceee23994612b008ab67238b8904980ab3b46415430a37ca8e1091e1e73cd4
3
+ metadata.gz: 1c2ad7d86bc9b1992ca3665bac72e198649cc668d3822a84104e1ff27d151554
4
+ data.tar.gz: 346ce42098432d6a0a275baa3c80911a56fb6901a810ce26d29e0cb6ebc8081f
5
5
  SHA512:
6
- metadata.gz: c8fc65761f4ace6de53db596956cbca7df5823bde403f9e8cbf7d3559b750a379b0887e110c6b7af77feee0034902e4380df0da120b3efed597f7b181ed556a5
7
- data.tar.gz: ab41dcdb4478eaebbd292aa199df247528471c8c268584655423ba9f07ede3a7b2864f82dede3704f2d1108df0f73cbedaa12c52dc34f84c8568673e1089ac05
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', 'utf-only', 'uncategorized', 'clean-cache', 'no-adult')
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
- "--utf-only UTF/Unicode only (does not export Extended)\n" \
28
+ "--standard UTF/Unicode only (does not export Extended)\n" \
29
29
  "--uncategorized doesn't separate emoji into categorized folders\n" \
30
- "--no-adult don't include adult/R-18 emoji"
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['utf-only'],
39
- params['t'].to_sym, !(params['uncategorized']), params['no-adult'])
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.4'
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, no_adult = false, clean_cache = 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: !(no_adult))
29
- @extended = Emojidex::Data::Extended.new(r18: !(no_adult))
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: true)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emojidex-static-collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rei Kagetsuki