commit 9e261da70c8da3bc014994ad0cc07a8c008a34d9 Author: Violet Millie Date: Sun Feb 4 00:01:06 2024 +0000 First commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d3b9fe1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,163 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + + +out/ \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..060d2c5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..2118250 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/violet-emojis.iml b/.idea/violet-emojis.iml new file mode 100644 index 0000000..5b0860a --- /dev/null +++ b/.idea/violet-emojis.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..562de69 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# violet-emojis + +Recoloured emojis to fit Violet Millie's preferred palette. diff --git a/src/build.py b/src/build.py new file mode 100755 index 0000000..47f82b3 --- /dev/null +++ b/src/build.py @@ -0,0 +1,51 @@ +#!/bin/python +import json +import os +import shutil +import subprocess + +# Configuration +emoji_data_json = "src/emoji-data.json" +out_dir = "out" +# TODO: Support multiple paths +emoji_source_dir = "src/twemoji" + + +with open(emoji_data_json, "r") as f: + emoji_data = json.load(f) + + +def get_emoji_data(emoji_id: str): + for emoji_entry in emoji_data["emojiData"]: + if emoji_id == emoji_entry["emojiId"]: + return emoji_entry + + +def build(): + # lazy "clear contents" by re-creating + if os.path.isdir(out_dir): + shutil.rmtree(out_dir, ignore_errors=True) + + os.mkdir(out_dir) + + contents = os.listdir(emoji_source_dir) + + for content in contents: + file_name = content.split(".")[0] + + current_emoji_data = get_emoji_data(file_name) + + build_name: str + + if current_emoji_data is None: + # Convert to SVG and keep default name + print("uh oh") + build_name = file_name + pass + else: + build_name = current_emoji_data["buildName"] + + subprocess.run(["rsvg-convert", os.path.join(emoji_source_dir, content), "--output", "%s/%s.png" % (out_dir, build_name)]) + + +build() diff --git a/src/emoji-data.json b/src/emoji-data.json new file mode 100644 index 0000000..eda54de --- /dev/null +++ b/src/emoji-data.json @@ -0,0 +1,53 @@ +{ + "emojiData": [ + { + "emojiId": "2b50", + "buildName": "v_star" + }, + { + "emojiId": "1f495", + "buildName": "v_two_hearts" + }, + { + "emojiId": "2728", + "buildName": "v_sparkles" + }, + { + "emojiId": "1f494", + "buildName": "v_broken_heart" + }, + { + "emojiId": "2763", + "buildName": "v_heart_exclamation" + }, + { + "emojiId": "2764", + "buildName": "v_heart" + }, + { + "emojiId": "1f4ab", + "buildName": "v_dizzy" + }, + { + "emojiId": "2757", + "buildName": "v_exclamation_mark" + }, + { + "emojiId": "2753", + "buildName": "v_question_mark" + }, + { + "emojiId": "1f496", + "buildName": "v_sparkling_heart" + }, + { + "emojiId": "1f49e", + "buildName": "v_two_hearts" + }, + { + "emojiId": "1f49d", + "buildName": "v_gift_heart" + } + + ] +} diff --git a/src/twemoji/1f494.svg b/src/twemoji/1f494.svg new file mode 100644 index 0000000..ec29672 --- /dev/null +++ b/src/twemoji/1f494.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/twemoji/1f495.svg b/src/twemoji/1f495.svg new file mode 100644 index 0000000..d46c9d8 --- /dev/null +++ b/src/twemoji/1f495.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/twemoji/1f496.svg b/src/twemoji/1f496.svg new file mode 100644 index 0000000..1b35715 --- /dev/null +++ b/src/twemoji/1f496.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/twemoji/1f49d.svg b/src/twemoji/1f49d.svg new file mode 100644 index 0000000..3b8aaf6 --- /dev/null +++ b/src/twemoji/1f49d.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/twemoji/1f49e.svg b/src/twemoji/1f49e.svg new file mode 100644 index 0000000..461ed72 --- /dev/null +++ b/src/twemoji/1f49e.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/twemoji/1f4ab.svg b/src/twemoji/1f4ab.svg new file mode 100644 index 0000000..be1bc73 --- /dev/null +++ b/src/twemoji/1f4ab.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/twemoji/2728.svg b/src/twemoji/2728.svg new file mode 100644 index 0000000..04c025b --- /dev/null +++ b/src/twemoji/2728.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/twemoji/2753.svg b/src/twemoji/2753.svg new file mode 100644 index 0000000..63b42d9 --- /dev/null +++ b/src/twemoji/2753.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/twemoji/2757.svg b/src/twemoji/2757.svg new file mode 100644 index 0000000..64fa607 --- /dev/null +++ b/src/twemoji/2757.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/twemoji/2763.svg b/src/twemoji/2763.svg new file mode 100644 index 0000000..41ec274 --- /dev/null +++ b/src/twemoji/2763.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/twemoji/2764.svg b/src/twemoji/2764.svg new file mode 100644 index 0000000..311d8a0 --- /dev/null +++ b/src/twemoji/2764.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/twemoji/2b50.svg b/src/twemoji/2b50.svg new file mode 100644 index 0000000..6264000 --- /dev/null +++ b/src/twemoji/2b50.svg @@ -0,0 +1,4 @@ + + + +