diff --git a/README.md b/README.md index ebe802b..9f75cc5 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Emoji Resources for FileFormat.Info Images ------ * [EmojiOne](https://www.emojione.com/) - ([GitHub](https://github.com/emojione/emojione/tree/2.2.7/assets) - assets in 2.2.7 branch) + * [EmojiTwo](https://emojitwo.github.io/) - fork of open version of EmojiOne * [Twemoji](https://github.com/twitter/twemoji/tree/gh-pages/2/svg) from Twitter * [Gemoji](https://github.com/github/gemoji) from Github * [Noto](https://github.com/googlei18n/noto-emoji) from Google @@ -37,3 +38,11 @@ Unicode Emoji Data * [Comparison table](http://unicode.org/emoji/charts/full-emoji-list.html) - with images * [Charts](http://unicode.org/emoji/charts/index.html) +To Do +----- + - [ ] /sample/xxx.svg - canonical example (for use on FFI) + .json with metadata + - [ ] radio buttons for background image/color/none + - [ ] counts on all pages + - [ ] paging when > ?500? images + - [ ] links to FFI (when FFI has new url scheme working) + - [ ] /data subdirectory diff --git a/bin/update-db.py b/bin/update-db.py index 23f8c9b..13b690c 100755 --- a/bin/update-db.py +++ b/bin/update-db.py @@ -16,7 +16,7 @@ import urllib.parse import urllib.request -default_output = os.path.abspath("../docs") +default_output = os.path.abspath("../docs/data") default_src = "http://unicode.org/Public/emoji/5.0/" datafiles = { @@ -230,7 +230,7 @@ def to_hex(i): else: sys.stdout.write("INFO: all non-fully-qualified emoji are mapped\n") -filename = "data.json" +filename = "emoji.json" sys.stdout.write("INFO: saving to file '%s'\n" % filename) f = open(os.path.join(args.output, filename), mode='w', encoding='utf-8') f.write(json.dumps(emojis, ensure_ascii=False, sort_keys=False, indent=4, separators=(',', ': '))) diff --git a/bin/update-dir.py b/bin/update-dir.py index 99f0747..28f99fb 100755 --- a/bin/update-dir.py +++ b/bin/update-dir.py @@ -14,7 +14,7 @@ import tempfile import time -default_data = "../docs/data.json" +default_data = "../docs/data/emoji.json" parser = argparse.ArgumentParser() parser.add_argument("-q", "--quiet", help="hide status messages", default=True, dest='verbose', action="store_false") @@ -37,36 +37,70 @@ with open(args.emojidata) as edfp: emojidata = json.load(edfp, object_pairs_hook=collections.OrderedDict) +count = 0 f = open(os.path.join(srcdir, "base.html"), mode='w', encoding='utf-8') f.write("---\n") f.write("title: Base Emoji in %s\n" % args.name) f.write("tab: base\n") f.write("---\n") f.write("{% include tabs.html %}\n") +f.write("

") for key in emojidata: if "_200d" in key: continue + if emojidata[key]["status"] != "fully-qualified": + continue if key in files: text = emojidata[key]["text"] if "text" in emojidata[key] else key - f.write("\"%s\"\n" % (key, text)) - + f.write("\"%s\"\n" % (key, text, key)) + count = count + 1 +f.write("

") +f.write("

Total base emojis: %d

" % count) f.close() +count = 0 f = open(os.path.join(srcdir, "variant.html"), mode='w', encoding='utf-8') f.write("---\n") f.write("title: Emoji Variants in %s\n" % args.name) f.write("tab: variant\n") f.write("---\n") f.write("{% include tabs.html %}\n") +f.write("

") for key in emojidata: if "_200d" not in key: continue + if emojidata[key]["status"] == "component-only": + continue if key in files: text = emojidata[key]["text"] if "text" in emojidata[key] else key - f.write("\"%s\"\n" % (key, text)) + f.write("\"%s\"\n" % (key, text, key)) + count = count + 1 +f.write("

") +f.write("

Total emoji variants: %d

" % count) +f.close() +count = 0 +f = open(os.path.join(srcdir, "component.html"), mode='w', encoding='utf-8') +f.write("---\n") +f.write("title: Emoji components in %s\n" % args.name) +f.write("tab: component\n") +f.write("---\n") +f.write("{% include tabs.html %}\n") +f.write("

") +for key in emojidata: + if "_200d" in key: + continue + if emojidata[key]["status"] != "component-only": + continue + if key in files: + text = emojidata[key]["text"] if "text" in emojidata[key] else key + f.write("\"%s\"\n" % (key, text, key)) + count = count + 1 +f.write("

") +f.write("

Total emoji components: %d

" % count) f.close() +count = 0 f = open(os.path.join(srcdir, "custom.html"), mode='w', encoding='utf-8') f.write("---\n") f.write("title: Non-standard Emoji in %s\n" % args.name) @@ -76,7 +110,8 @@ for fn in files: if fn not in emojidata: f.write("

%s: \"%s\"

\n" % (fn, fn, fn)) - + count = count + 1 +f.write("

Total custom emojis: %d

" % count) f.close() count = 0 diff --git a/bin/update-noto.py b/bin/update-noto.py index 5524b50..4d25db7 100755 --- a/bin/update-noto.py +++ b/bin/update-noto.py @@ -17,7 +17,7 @@ default_branch = "master" default_output = os.path.join(os.getcwd(), "noto") default_subdirectory = "svg" -default_mapping = "../docs/normalize.json" +default_mapping = "../docs/data/normalize.json" parser = argparse.ArgumentParser() parser.add_argument("-q", "--quiet", help="hide status messages", default=True, dest='verbose', action="store_false") diff --git a/docs/_config.yml b/docs/_config.yml index 9f3fa94..aeae244 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -7,7 +7,7 @@ permalink: /blog/:year/:month/:day/:title/index.html production_url: https://emoji.fileformat.info title: FileFormat.Info Emoji SVGs markdown: kramdown -gems: +plugins: - jekyll-redirect-from defaults: - diff --git a/docs/_includes/navbar.html b/docs/_includes/navbar.html index 629b12a..8b39742 100644 --- a/docs/_includes/navbar.html +++ b/docs/_includes/navbar.html @@ -1,13 +1,14 @@ +{% assign curnav = page.url | remove_first:"/" | split:"/" | first %}