tools/build_emoji: Generate `name_to_codepoint.json` file.

Generate the `name_to_codepoint.json` file in build_emoji which will be
used by bugdown/ to map emoji names to codepoints directly.
This commit is contained in:
Harshit Bansal 2017-02-04 21:44:32 +00:00 committed by Tim Abbott
parent bc4aef0bc7
commit 1b0d3cbb39
1 changed files with 6 additions and 0 deletions

View File

@ -252,5 +252,11 @@ def dump_emojis(cache_path):
})
emoji_codes_file.close()
NAME_TO_CODEPOINT_PATH = os.path.join(cache_path, 'name_to_codepoint.json')
name_to_codepoint_file = open(NAME_TO_CODEPOINT_PATH, 'w')
name_to_codepoint_file.write(json.dumps(emoji_map))
name_to_codepoint_file.close()
if __name__ == "__main__":
main()