From 6471cce3b1a0cb15603c931e3aee26650e6500bf Mon Sep 17 00:00:00 2001 From: Billy Date: Mon, 2 Dec 2024 18:54:04 +0530 Subject: [PATCH] ci: Package notifier app (nightly builds) --- notifier/.gitignore | 162 +++++++++++++++++++++++++++++ notifier/AoC.spec | 2 +- notifier/README.md | 4 + notifier/aoc_notifier/__init__.py | 0 notifier/aoc_notifier/__main__.py | 4 + notifier/{ => aoc_notifier}/app.py | 4 - notifier/poetry.lock | 72 +++++++++++++ notifier/pyproject.toml | 2 +- 8 files changed, 244 insertions(+), 6 deletions(-) create mode 100644 notifier/.gitignore create mode 100644 notifier/aoc_notifier/__init__.py create mode 100644 notifier/aoc_notifier/__main__.py rename notifier/{ => aoc_notifier}/app.py (97%) create mode 100644 notifier/poetry.lock diff --git a/notifier/.gitignore b/notifier/.gitignore new file mode 100644 index 0000000..efa407c --- /dev/null +++ b/notifier/.gitignore @@ -0,0 +1,162 @@ +# 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/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# 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/ \ No newline at end of file diff --git a/notifier/AoC.spec b/notifier/AoC.spec index 785f5a6..3124bd9 100644 --- a/notifier/AoC.spec +++ b/notifier/AoC.spec @@ -2,7 +2,7 @@ a = Analysis( - ['app.py'], + ['aoc_notifier\\__main__.py'], pathex=[], binaries=[], datas=[('aoc.ico', '.'), ('aoc.png', '.')], diff --git a/notifier/README.md b/notifier/README.md index e2d0c6d..c0d8363 100644 --- a/notifier/README.md +++ b/notifier/README.md @@ -1,3 +1,7 @@ Minimal cross-platform daemon that will notify you at `00:00:00` EST everyday during Dec (0-25) ![notifier](https://github.com/user-attachments/assets/5f74d9b9-4b13-438e-812e-e717df6e802d) + +``` +python -m aoc_notifier +``` diff --git a/notifier/aoc_notifier/__init__.py b/notifier/aoc_notifier/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/notifier/aoc_notifier/__main__.py b/notifier/aoc_notifier/__main__.py new file mode 100644 index 0000000..ddf49a1 --- /dev/null +++ b/notifier/aoc_notifier/__main__.py @@ -0,0 +1,4 @@ +from aoc_notifier.app import main + +if __name__ == "__main__": + main() diff --git a/notifier/app.py b/notifier/aoc_notifier/app.py similarity index 97% rename from notifier/app.py rename to notifier/aoc_notifier/app.py index d3a60bd..bc7b558 100644 --- a/notifier/app.py +++ b/notifier/aoc_notifier/app.py @@ -62,8 +62,4 @@ def main(): time.sleep(30 * 60) # 30 minutes -if __name__ == "__main__": - main() - - # pyinstaller -F -w -i "aoc.ico" --clean -n "AoC" --add-data "aoc.ico;." --add-data "aoc.png;." app.py diff --git a/notifier/poetry.lock b/notifier/poetry.lock new file mode 100644 index 0000000..47b3a7a --- /dev/null +++ b/notifier/poetry.lock @@ -0,0 +1,72 @@ +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. + +[[package]] +name = "plyer" +version = "2.1.0" +description = "Platform-independent wrapper for platform-dependent APIs" +optional = false +python-versions = "*" +files = [ + {file = "plyer-2.1.0-py2.py3-none-any.whl", hash = "sha256:1b1772060df8b3045ed4f08231690ec8f7de30f5a004aa1724665a9074eed113"}, + {file = "plyer-2.1.0.tar.gz", hash = "sha256:65b7dfb7e11e07af37a8487eb2aa69524276ef70dad500b07228ce64736baa61"}, +] + +[package.extras] +android = ["pyjnius"] +dev = ["flake8", "mock"] +ios = ["pyobjus"] +macosx = ["pyobjus"] + +[[package]] +name = "pytz" +version = "2024.2" +description = "World timezone definitions, modern and historical" +optional = false +python-versions = "*" +files = [ + {file = "pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725"}, + {file = "pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a"}, +] + +[[package]] +name = "win11toast" +version = "0.35" +description = "Toast notifications for Windows 10 and 11" +optional = false +python-versions = "*" +files = [ + {file = "win11toast-0.35-py3-none-any.whl", hash = "sha256:1e101516c283884b987969d0b8f27dc79d4b19273243899070c2cd0d6b86cbb4"}, + {file = "win11toast-0.35.tar.gz", hash = "sha256:59215bee9bd14e5651603fca791f05ac5932e6b864cb515c8bdfdb2da97b8376"}, +] + +[package.dependencies] +winsdk = "*" + +[[package]] +name = "winsdk" +version = "1.0.0b10" +description = "Python bindings for the Windows SDK" +optional = false +python-versions = ">=3.8" +files = [ + {file = "winsdk-1.0.0b10-cp310-cp310-win32.whl", hash = "sha256:90f75c67e166d588a045bcde0117a4631c705904f7af4ac42644479dcf0d8c52"}, + {file = "winsdk-1.0.0b10-cp310-cp310-win_amd64.whl", hash = "sha256:c3be3fbf692b8888bac8c0712c490c080ab8976649ef01f9f6365947f4e5a8b1"}, + {file = "winsdk-1.0.0b10-cp310-cp310-win_arm64.whl", hash = "sha256:6ab69dd65d959d94939c21974a33f4f1dfa625106c8784435ecacbd8ff0bf74d"}, + {file = "winsdk-1.0.0b10-cp311-cp311-win32.whl", hash = "sha256:9ea4fdad9ca8a542198aee3c753ac164b8e2f550d760bb88815095d64750e0f5"}, + {file = "winsdk-1.0.0b10-cp311-cp311-win_amd64.whl", hash = "sha256:f12e25bbf0a658270203615677520b8170edf500fba11e0f80359c5dbf090676"}, + {file = "winsdk-1.0.0b10-cp311-cp311-win_arm64.whl", hash = "sha256:e77bce44a9ff151562bd261b2a1a8255e258bb10696d0d31ef63267a27628af1"}, + {file = "winsdk-1.0.0b10-cp312-cp312-win32.whl", hash = "sha256:775a55a71e05ec2aa262c1fd67d80f270d4186bbdbbee2f43c9c412cf76f0761"}, + {file = "winsdk-1.0.0b10-cp312-cp312-win_amd64.whl", hash = "sha256:8231ce5f16e1fc88bb7dda0adf35633b5b26101eae3b0799083ca2177f03e4e5"}, + {file = "winsdk-1.0.0b10-cp312-cp312-win_arm64.whl", hash = "sha256:f4ab469ada19b34ccfc69a148090f98b40a1da1da797b50b9cbba0c090c365a5"}, + {file = "winsdk-1.0.0b10-cp38-cp38-win32.whl", hash = "sha256:786d6b50e4fcb8af2d701d7400c74e1c3f3ab7766ed1dfd516cdd6688072ea87"}, + {file = "winsdk-1.0.0b10-cp38-cp38-win_amd64.whl", hash = "sha256:1d4fdd1f79b41b64fedfbc478a29112edf2076e1a61001eccb536c0568510e74"}, + {file = "winsdk-1.0.0b10-cp39-cp39-win32.whl", hash = "sha256:4f04d3e50eeb8ca5fe4eb2e39785f3fa594199819acdfb23a10aaef4b97699ad"}, + {file = "winsdk-1.0.0b10-cp39-cp39-win_amd64.whl", hash = "sha256:7948bc5d8a02d73b1db043788d32b2988b8e7e29a25e503c21d34478e630eaf1"}, + {file = "winsdk-1.0.0b10-cp39-cp39-win_arm64.whl", hash = "sha256:342b1095cbd937865cee962676e279a1fd28896a0680724fcf9c65157e7ebdb7"}, + {file = "winsdk-1.0.0b10.tar.gz", hash = "sha256:8f39ea759626797449371f857c9085b84bb9f3b6d493dc6525e2cedcb3d15ea2"}, +] + +[metadata] +lock-version = "2.0" +python-versions = "^3.12" +content-hash = "247985ea9f5378f6ff4e3018cae2d3266781c9ae443f8b9e8ee2bd75c0230f7c" diff --git a/notifier/pyproject.toml b/notifier/pyproject.toml index c4a9ff7..b4d685f 100644 --- a/notifier/pyproject.toml +++ b/notifier/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "aoc-notifier" +name = "aoc_notifier" version = "0.1.0" description = "" authors = ["Billy "]