emoji: Move logic for hard-coding octopus emoji.

This logic was incorrectly placed in `setup_old_emoji_farm()` while
it should have been placed in `setup_emoji_farm()`.
This commit is contained in:
Harshit Bansal 2018-08-09 19:41:56 +00:00 committed by Tim Abbott
parent 1eb3825048
commit 67bbbbb007
1 changed files with 6 additions and 7 deletions

View File

@ -163,6 +163,12 @@ def setup_emoji_farm(cache_path: str, emoji_data: List[Dict[str, Any]]) -> None:
output_sprite_sheet = os.path.join(cache_path, 'sheet_%s_64.png' % (emojiset,))
run(['cp', input_sprite_sheet, output_sprite_sheet])
# We hardcode octopus emoji image to Google emojiset's old
# "cute octopus" image. Copy it to the emoji farms.
input_img_file = os.path.join(EMOJI_SCRIPT_DIR_PATH, '1f419.png')
output_img_file = os.path.join(cache_path, 'images-' + emojiset + '-64', '1f419.png')
run(['cp', input_img_file, output_img_file])
generate_sprite_css_files(cache_path, emoji_data)
def setup_old_emoji_farm(cache_path: str,
@ -197,13 +203,6 @@ def setup_old_emoji_farm(cache_path: str,
except FileExistsError:
pass
# We hardcode octopus emoji image to Google emojiset's old
# "cute octopus" image. Copy it to the emoji farms.
for emojiset in EMOJISETS:
input_img_file = os.path.join(EMOJI_SCRIPT_DIR_PATH, '1f419.png')
output_img_file = os.path.join(cache_path, 'images-' + emojiset + '-64', '1f419.png')
run(['cp', input_img_file, output_img_file])
def generate_map_files(cache_path: str, emoji_catalog: Dict[str, List[str]]) -> None:
# This function generates the various data files consumed by webapp, mobile apps, bugdown etc.
names = emoji_names_for_picker(EMOJI_NAME_MAPS)