mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-22 22:59:41 +02:00
Feature/group based notifications (#918)
* fix group page * setup group notification for backend * update type generators * script to auto-generate schema exports * setup frontend CRUD interface * remove old notifications UI * drop old events api * add test functionality * update naming for fields * add event dispatcher functionality * bump to python 3.10 * bump python version * purge old event code * use-async apprise * set mealie logo as image * unify styles for buttons rows * add links to banners
This commit is contained in:
parent
50a341ed3f
commit
190773c5d7
74 changed files with 1992 additions and 1229 deletions
35
dev/code-generation/gen_schema_exports.py
Normal file
35
dev/code-generation/gen_schema_exports.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
from _gen_utils import render_python_template
|
||||
from _static import PROJECT_DIR
|
||||
|
||||
template = """# GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
{% for file in data.files %}from .{{ file }} import *
|
||||
{% endfor %}
|
||||
"""
|
||||
|
||||
SCHEMA_PATH = PROJECT_DIR / "mealie" / "schema"
|
||||
|
||||
|
||||
def generate_init_files() -> None:
|
||||
|
||||
for schema in SCHEMA_PATH.iterdir():
|
||||
if not schema.is_dir():
|
||||
print(f"Skipping {schema}")
|
||||
continue
|
||||
|
||||
print(f"Generating {schema}")
|
||||
init_file = schema.joinpath("__init__.py")
|
||||
|
||||
module_files = [
|
||||
f.stem for f in schema.iterdir() if f.is_file() and f.suffix == ".py" and not f.stem.startswith("_")
|
||||
]
|
||||
render_python_template(template, init_file, {"files": module_files})
|
||||
|
||||
|
||||
def main():
|
||||
print("Starting...")
|
||||
generate_init_files()
|
||||
print("Finished...")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue