make.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:aws_emojipacks 作者: Surgo 项目源码 文件源码
def download_and_save_icons(dist_dir):
    saved_icons = dict()

    temp_dir = tempfile.gettempdir()
    temp_path = download_icons(AWS_ICON_DOWNLOAD_URL, os.path.join(temp_dir, 'icons.zip'))

    for image, friendly_name in get_images_from_archive_file(temp_path):
        emoji_icon = emojinize_image(image)
        dist_path = os.path.join(
            dist_dir,
            '{name}.{ext}'.format(name=friendly_name, ext='png'),
        )
        emoji_icon.save(dist_path, 'PNG', optimize=True)
        logging.info("Save emoji: %s", dist_path)
        saved_icons[friendly_name] = dist_path
    return saved_icons
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号