Adjust tool/enc-unicode.rb to deal with new location of some emoji files

- Change location of file emoji-data.txt
- Change range of files in emoji directory
  ([stz] is for emoji-sequences.txt, emoji-test.txt, and emoji-zwj-sequences.txt)
- Make sure that version of all emoji files is checked against Emoji version
This commit is contained in:
Martin Dürst 2021-07-04 17:11:22 +09:00
Родитель b6113a3fd8
Коммит 94fc4b1869
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -138,7 +138,7 @@ def parse_scripts(data, categories)
{:fn => 'DerivedCoreProperties.txt', :title => 'Derived Property'},
{:fn => 'Scripts.txt', :title => 'Script'},
{:fn => 'PropList.txt', :title => 'Binary Property'},
{:fn => 'emoji-data.txt', :title => 'Emoji'}
{:fn => 'emoji/emoji-data.txt', :title => 'Emoji'}
]
current = nil
cps = []
@ -305,13 +305,13 @@ def constantize_blockname(name)
end
def get_file(name)
File.join(ARGV[name.start_with?("emoji-") ? 1 : 0], name)
File.join(ARGV[name.start_with?("emoji-[stz]") ? 1 : 0], name)
end
def data_foreach(name, &block)
fn = get_file(name)
warn "Reading #{name}"
if /^emoji-/ =~ name
if /^emoji/ =~ name
sep = ""
pat = /^# #{Regexp.quote(File.basename(name))}.*^# Version: ([\d.]+)/m
type = :Emoji