From 0845c3898a352d76b94c3f05aa95e8f6a8a48f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Wed, 12 Mar 2014 12:20:35 +0100 Subject: [PATCH] Add task to download Unicode 6.3 names list This list contains textual descriptions for emoji characters. --- .gitignore | 2 ++ Rakefile | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..97332a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.ruby-version +db/NamesList.txt diff --git a/Rakefile b/Rakefile index 84cecc6..0376663 100644 --- a/Rakefile +++ b/Rakefile @@ -9,11 +9,16 @@ end namespace :db do desc %(Generate Emoji data files needed for development) - task :generate => ['db/Category-Emoji.json'] + task :generate => ['db/Category-Emoji.json', 'db/NamesList.txt'] end emoji_plist = '/System/Library/Input Methods/CharacterPalette.app/Contents/Resources/Category-Emoji.plist' +nameslist_url = 'http://www.unicode.org/Public/6.3.0/ucd/NamesList.txt' task 'db/Category-Emoji.json' do |t| system "plutil -convert json -r '#{emoji_plist}' -o '#{t.name}'" end + +file 'db/NamesList.txt' do |t| + system "curl -fsSL '#{nameslist_url}' -o '#{t.name}'" +end