Current section
7 Versions
Jump to
Current section
7 Versions
Compare versions
5
files changed
+35
additions
-33
deletions
| @@ -1,31 +1,31 @@ | |
| 1 | - {<<"app">>,<<"emojix">>}. |
| 2 | - {<<"build_tools">>,[<<"mix">>]}. |
| 1 | + {<<"links">>,[{<<"GitHub">>,<<"https://github.com/ukita/emojix">>}]}. |
| 2 | + {<<"name">>,<<"emojix">>}. |
| 3 | + {<<"version">>,<<"0.4.0">>}. |
| 3 4 | {<<"description">>, |
| 4 5 | <<83,105,109,112,108,101,32,101,109,111,106,105,32,108,105,98,114,97,114,121, |
| 5 6 | 32,102,111,114,32,69,108,105,120,105,114,46,32,240,159,146,169>>}. |
| 6 7 | {<<"elixir">>,<<"~> 1.9">>}. |
| 8 | + {<<"app">>,<<"emojix">>}. |
| 9 | + {<<"licenses">>,[<<"MIT">>]}. |
| 10 | + {<<"requirements">>, |
| 11 | + [[{<<"name">>,<<"jason">>}, |
| 12 | + {<<"app">>,<<"jason">>}, |
| 13 | + {<<"optional">>,false}, |
| 14 | + {<<"requirement">>,<<"~> 1.4">>}, |
| 15 | + {<<"repository">>,<<"hexpm">>}], |
| 16 | + [{<<"name">>,<<"castore">>}, |
| 17 | + {<<"app">>,<<"castore">>}, |
| 18 | + {<<"optional">>,false}, |
| 19 | + {<<"requirement">>,<<"~> 1.0">>}, |
| 20 | + {<<"repository">>,<<"hexpm">>}], |
| 21 | + [{<<"name">>,<<"mint">>}, |
| 22 | + {<<"app">>,<<"mint">>}, |
| 23 | + {<<"optional">>,false}, |
| 24 | + {<<"requirement">>,<<"~> 1.5">>}, |
| 25 | + {<<"repository">>,<<"hexpm">>}]]}. |
| 7 26 | {<<"files">>, |
| 8 27 | [<<"lib">>,<<"lib/emojix.ex">>,<<"lib/emojix">>,<<"lib/emojix/emoji.ex">>, |
| 9 28 | <<"lib/emojix/data_loader.ex">>,<<"lib/emojix/repo.ex">>, |
| 10 | - <<"lib/emojix/app.ex">>,<<"priv">>,<<"priv/dataset.ets">>, |
| 29 | + <<"lib/emojix/app.ex">>,<<"priv">>,<<"priv/dataset_15.2.0.ets">>, |
| 11 30 | <<".formatter.exs">>,<<"mix.exs">>,<<"README.md">>,<<"LICENSE">>]}. |
| 12 | - {<<"licenses">>,[<<"MIT">>]}. |
| 13 | - {<<"links">>,[{<<"GitHub">>,<<"https://github.com/ukita/emojix">>}]}. |
| 14 | - {<<"name">>,<<"emojix">>}. |
| 15 | - {<<"requirements">>, |
| 16 | - [[{<<"app">>,<<"jason">>}, |
| 17 | - {<<"name">>,<<"jason">>}, |
| 18 | - {<<"optional">>,false}, |
| 19 | - {<<"repository">>,<<"hexpm">>}, |
| 20 | - {<<"requirement">>,<<"~> 1.1">>}], |
| 21 | - [{<<"app">>,<<"castore">>}, |
| 22 | - {<<"name">>,<<"castore">>}, |
| 23 | - {<<"optional">>,false}, |
| 24 | - {<<"repository">>,<<"hexpm">>}, |
| 25 | - {<<"requirement">>,<<"~> 0.1.0">>}], |
| 26 | - [{<<"app">>,<<"mint">>}, |
| 27 | - {<<"name">>,<<"mint">>}, |
| 28 | - {<<"optional">>,false}, |
| 29 | - {<<"repository">>,<<"hexpm">>}, |
| 30 | - {<<"requirement">>,<<"~> 0.4.0">>}]]}. |
| 31 | - {<<"version">>,<<"0.3.1">>}. |
| 31 | + {<<"build_tools">>,[<<"mix">>]}. |
| @@ -3,16 +3,18 @@ defmodule Emojix.DataLoader do | |
| 3 3 | |
| 4 4 | require Logger |
| 5 5 | |
| 6 | + require IEx |
| 6 7 | alias Mint.HTTP |
| 7 8 | |
| 9 | + @emoji_version "15.2.0" |
| 8 10 | @download_host "cdn.jsdelivr.net" |
| 9 | - @download_path "/npm/emojibase-data@6.0.0/en/compact.json" |
| 10 | - @download_shortcodes "/npm/emojibase-data@6.0.0/en/shortcodes/iamcal.json" |
| 11 | - @download_legacy_shortcodes "/npm/emojibase-data@6.0.0/en/shortcodes/emojibase-legacy.json" |
| 11 | + @download_path "/npm/emojibase-data@#{@emoji_version}/en/compact.json" |
| 12 | + @download_shortcodes "/npm/emojibase-data@#{@emoji_version}/en/shortcodes/iamcal.json" |
| 13 | + @download_legacy_shortcodes "/npm/emojibase-data@#{@emoji_version}/en/shortcodes/emojibase-legacy.json" |
| 12 14 | |
| 13 15 | @spec ets_table_path :: Path |
| 14 16 | def ets_table_path do |
| 15 | - Path.join(:code.priv_dir(:emojix), "dataset.ets") |
| 17 | + Path.join(:code.priv_dir(:emojix), "dataset_#{@emoji_version}.ets") |
| 16 18 | end |
| 17 19 | |
| 18 20 | @spec load_table :: :emoji_table |
| @@ -98,7 +100,7 @@ defmodule Emojix.DataLoader do | |
| 98 100 | %Emojix.Emoji{ |
| 99 101 | id: emoji.order, |
| 100 102 | hexcode: emoji.hexcode, |
| 101 | - description: emoji.annotation, |
| 103 | + description: emoji.label, |
| 102 104 | shortcodes: List.wrap(shortcodes), |
| 103 105 | unicode: emoji.unicode, |
| 104 106 | tags: Map.get(emoji, :tags, []), |
| @@ -1,7 +1,7 @@ | |
| 1 1 | defmodule Emojix.MixProject do |
| 2 2 | use Mix.Project |
| 3 3 | |
| 4 | - @version "0.3.1" |
| 4 | + @version "0.4.0" |
| 5 5 | |
| 6 6 | def project do |
| 7 7 | [ |
| @@ -26,10 +26,10 @@ defmodule Emojix.MixProject do | |
| 26 26 | # Run "mix help deps" to learn about dependencies. |
| 27 27 | defp deps do |
| 28 28 | [ |
| 29 | - {:jason, "~> 1.1"}, |
| 30 | - {:castore, "~> 0.1.0"}, |
| 31 | - {:mint, "~> 0.4.0"}, |
| 32 | - {:ex_doc, "~> 0.21", only: :dev, runtime: false} |
| 29 | + {:jason, "~> 1.4"}, |
| 30 | + {:castore, "~> 1.0"}, |
| 31 | + {:mint, "~> 1.5"}, |
| 32 | + {:ex_doc, "~> 0.30", only: :dev, runtime: false} |
| 33 33 | ] |
| 34 34 | end |
unknownpriv/dataset.ets
File is too large to be displayed (100 KB limit).
unknownpriv/dataset_15.2.0.ets
File is too large to be displayed (100 KB limit).