From 93426490c4345028b36105ca5d8eae98ba46b762 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 7 Feb 2026 15:32:23 +0100 Subject: [PATCH] Consolidate all Anki deck generators into python_pkg/anki_decks/ Move warsaw_bridges, warsaw_districts, warsaw_landmarks, warsaw_metro, warsaw_osiedla, warsaw_streets, and car_brand_logos into the existing python_pkg/anki_decks/ directory alongside the polish_* generators. Also move preview_all.html into anki_decks/. Update all import paths, filesystem references in geo_data.py, docstrings, READMEs, test imports, and .gitignore accordingly. --- .gitignore | 4 +- linux_configuration/scripts/fixes/stremio | 1 - python_pkg/anki_decks/__init__.py | 1 + .../polish_coastal_features/__init__.py | 0 .../polish_coastal_features_anki.py | 0 .../polish_coastal_features/run.sh | 0 .../polish_forests/__init__.py | 0 .../polish_forests/polish_forests_anki.py | 0 .../{ => anki_decks}/polish_forests/run.sh | 0 .../{ => anki_decks}/polish_gminy/__init__.py | 0 .../polish_gminy/polish_gminy_anki.py | 0 .../{ => anki_decks}/polish_gminy/run.sh | 0 .../polish_islands/__init__.py | 0 .../polish_islands/polish_islands_anki.py | 0 .../{ => anki_decks}/polish_islands/run.sh | 0 .../{ => anki_decks}/polish_lakes/__init__.py | 0 .../polish_lakes/polish_lakes_anki.py | 0 .../{ => anki_decks}/polish_lakes/run.sh | 0 .../polish_landscape_parks/__init__.py | 0 .../polish_landscape_parks_anki.py | 0 .../polish_landscape_parks/run.sh | 0 .../polish_license_plates/README.md | 12 +- .../polish_license_plates/__init__.py | 4 +- .../fetch_license_plates.py | 14 +- .../license_plate_data.py | 2 +- .../polish_license_plates_anki.py | 8 +- .../polish_license_plates/tests/__init__.py | 0 .../tests/test_polish_license_plates_anki.py | 10 +- .../polish_mountain_peaks/__init__.py | 0 .../polish_mountain_peaks_anki.py | 0 .../polish_mountain_peaks/run.sh | 0 .../polish_mountain_ranges/__init__.py | 0 .../polish_mountain_ranges_anki.py | 0 .../polish_mountain_ranges/run.sh | 0 .../polish_national_parks/__init__.py | 0 .../polish_national_parks_anki.py | 0 .../polish_national_parks/run.sh | 0 .../polish_nature_reserves/__init__.py | 0 .../polish_nature_reserves_anki.py | 0 .../polish_nature_reserves/run.sh | 0 .../polish_powiaty/__init__.py | 0 .../polish_powiaty/polish_powiaty_anki.py | 0 .../{ => anki_decks}/polish_powiaty/run.sh | 0 .../polish_rivers/__init__.py | 0 .../polish_rivers/polish_rivers_anki.py | 0 .../{ => anki_decks}/polish_rivers/run.sh | 0 .../polish_unesco_sites/__init__.py | 0 .../polish_unesco_sites_anki.py | 0 .../polish_unesco_sites/run.sh | 0 python_pkg/{ => anki_decks}/preview_all.html | 0 .../warsaw_bridges/__init__.py | 0 .../{ => anki_decks}/warsaw_bridges/run.sh | 0 .../warsaw_bridges/warsaw_bridges_anki.py | 0 .../warsaw_districts/README.md | 6 +- .../warsaw_districts/__init__.py | 0 .../{ => anki_decks}/warsaw_districts/run.sh | 0 .../warsaw_districts/tests/__init__.py | 0 .../tests/test_warsaw_districts_anki.py | 6 +- .../warsaw_districts/warsaw_districts.apkg | Bin .../warsaw_districts/warsaw_districts_anki.py | 5 +- .../warszawa-dzielnice.geojson | 0 .../warsaw_landmarks/__init__.py | 0 .../{ => anki_decks}/warsaw_landmarks/run.sh | 0 .../warsaw_landmarks/warsaw_landmarks_anki.py | 0 .../{ => anki_decks}/warsaw_metro/__init__.py | 0 .../warsaw_metro/cache/warsaw_metro.geojson | 287 ++++++++++++++++++ .../{ => anki_decks}/warsaw_metro/run.sh | 0 .../warsaw_metro/warsaw_metro_anki.py | 0 .../warsaw_osiedla/__init__.py | 0 .../{ => anki_decks}/warsaw_osiedla/run.sh | 0 .../warsaw_osiedla/warsaw_osiedla_anki.py | 0 .../{ => anki_decks}/warsaw_streets/README.md | 0 .../warsaw_streets/__init__.py | 0 .../{ => anki_decks}/warsaw_streets/run.sh | 0 .../warsaw_streets/warsaw_streets_anki.py | 2 +- python_pkg/geo_data.py | 10 +- 76 files changed, 337 insertions(+), 35 deletions(-) delete mode 160000 linux_configuration/scripts/fixes/stremio create mode 100644 python_pkg/anki_decks/__init__.py rename python_pkg/{ => anki_decks}/polish_coastal_features/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_coastal_features/polish_coastal_features_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_coastal_features/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_forests/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_forests/polish_forests_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_forests/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_gminy/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_gminy/polish_gminy_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_gminy/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_islands/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_islands/polish_islands_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_islands/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_lakes/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_lakes/polish_lakes_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_lakes/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_landscape_parks/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_landscape_parks/polish_landscape_parks_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_landscape_parks/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_license_plates/README.md (90%) rename python_pkg/{ => anki_decks}/polish_license_plates/__init__.py (54%) rename python_pkg/{ => anki_decks}/polish_license_plates/fetch_license_plates.py (95%) rename python_pkg/{ => anki_decks}/polish_license_plates/license_plate_data.py (99%) rename python_pkg/{ => anki_decks}/polish_license_plates/polish_license_plates_anki.py (96%) rename python_pkg/{ => anki_decks}/polish_license_plates/tests/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_license_plates/tests/test_polish_license_plates_anki.py (94%) rename python_pkg/{ => anki_decks}/polish_mountain_peaks/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_mountain_peaks/polish_mountain_peaks_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_mountain_peaks/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_mountain_ranges/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_mountain_ranges/polish_mountain_ranges_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_mountain_ranges/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_national_parks/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_national_parks/polish_national_parks_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_national_parks/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_nature_reserves/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_nature_reserves/polish_nature_reserves_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_nature_reserves/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_powiaty/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_powiaty/polish_powiaty_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_powiaty/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_rivers/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_rivers/polish_rivers_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_rivers/run.sh (100%) rename python_pkg/{ => anki_decks}/polish_unesco_sites/__init__.py (100%) rename python_pkg/{ => anki_decks}/polish_unesco_sites/polish_unesco_sites_anki.py (100%) rename python_pkg/{ => anki_decks}/polish_unesco_sites/run.sh (100%) rename python_pkg/{ => anki_decks}/preview_all.html (100%) rename python_pkg/{ => anki_decks}/warsaw_bridges/__init__.py (100%) rename python_pkg/{ => anki_decks}/warsaw_bridges/run.sh (100%) rename python_pkg/{ => anki_decks}/warsaw_bridges/warsaw_bridges_anki.py (100%) rename python_pkg/{ => anki_decks}/warsaw_districts/README.md (88%) rename python_pkg/{ => anki_decks}/warsaw_districts/__init__.py (100%) rename python_pkg/{ => anki_decks}/warsaw_districts/run.sh (100%) rename python_pkg/{ => anki_decks}/warsaw_districts/tests/__init__.py (100%) rename python_pkg/{ => anki_decks}/warsaw_districts/tests/test_warsaw_districts_anki.py (96%) rename python_pkg/{ => anki_decks}/warsaw_districts/warsaw_districts.apkg (100%) rename python_pkg/{ => anki_decks}/warsaw_districts/warsaw_districts_anki.py (98%) rename python_pkg/{ => anki_decks}/warsaw_districts/warszawa-dzielnice.geojson (100%) rename python_pkg/{ => anki_decks}/warsaw_landmarks/__init__.py (100%) rename python_pkg/{ => anki_decks}/warsaw_landmarks/run.sh (100%) rename python_pkg/{ => anki_decks}/warsaw_landmarks/warsaw_landmarks_anki.py (100%) rename python_pkg/{ => anki_decks}/warsaw_metro/__init__.py (100%) create mode 100644 python_pkg/anki_decks/warsaw_metro/cache/warsaw_metro.geojson rename python_pkg/{ => anki_decks}/warsaw_metro/run.sh (100%) rename python_pkg/{ => anki_decks}/warsaw_metro/warsaw_metro_anki.py (100%) rename python_pkg/{ => anki_decks}/warsaw_osiedla/__init__.py (100%) rename python_pkg/{ => anki_decks}/warsaw_osiedla/run.sh (100%) rename python_pkg/{ => anki_decks}/warsaw_osiedla/warsaw_osiedla_anki.py (100%) rename python_pkg/{ => anki_decks}/warsaw_streets/README.md (100%) rename python_pkg/{ => anki_decks}/warsaw_streets/__init__.py (100%) rename python_pkg/{ => anki_decks}/warsaw_streets/run.sh (100%) rename python_pkg/{ => anki_decks}/warsaw_streets/warsaw_streets_anki.py (99%) diff --git a/.gitignore b/.gitignore index a499bb4..7b299c6 100644 --- a/.gitignore +++ b/.gitignore @@ -272,8 +272,8 @@ python_pkg/*/cache/ python_pkg/download_cats/http_cat_cache/ # Large geojson files that can be downloaded -python_pkg/warsaw_districts/warszawa-dzielnice.geojson +python_pkg/anki_decks/warsaw_districts/warszawa-dzielnice.geojson # Wikipedia cache (can be refreshed) -python_pkg/polish_license_plates/.wikipedia_cache/ +python_pkg/anki_decks/polish_license_plates/.wikipedia_cache/ python_pkg/cinema_planner/pasted_content.txt diff --git a/linux_configuration/scripts/fixes/stremio b/linux_configuration/scripts/fixes/stremio deleted file mode 160000 index 4c3c999..0000000 --- a/linux_configuration/scripts/fixes/stremio +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4c3c9996956221f0cae49f69e0597e33aee33ee1 diff --git a/python_pkg/anki_decks/__init__.py b/python_pkg/anki_decks/__init__.py new file mode 100644 index 0000000..62a27d6 --- /dev/null +++ b/python_pkg/anki_decks/__init__.py @@ -0,0 +1 @@ +"""Anki flashcard deck generators.""" diff --git a/python_pkg/polish_coastal_features/__init__.py b/python_pkg/anki_decks/polish_coastal_features/__init__.py similarity index 100% rename from python_pkg/polish_coastal_features/__init__.py rename to python_pkg/anki_decks/polish_coastal_features/__init__.py diff --git a/python_pkg/polish_coastal_features/polish_coastal_features_anki.py b/python_pkg/anki_decks/polish_coastal_features/polish_coastal_features_anki.py similarity index 100% rename from python_pkg/polish_coastal_features/polish_coastal_features_anki.py rename to python_pkg/anki_decks/polish_coastal_features/polish_coastal_features_anki.py diff --git a/python_pkg/polish_coastal_features/run.sh b/python_pkg/anki_decks/polish_coastal_features/run.sh similarity index 100% rename from python_pkg/polish_coastal_features/run.sh rename to python_pkg/anki_decks/polish_coastal_features/run.sh diff --git a/python_pkg/polish_forests/__init__.py b/python_pkg/anki_decks/polish_forests/__init__.py similarity index 100% rename from python_pkg/polish_forests/__init__.py rename to python_pkg/anki_decks/polish_forests/__init__.py diff --git a/python_pkg/polish_forests/polish_forests_anki.py b/python_pkg/anki_decks/polish_forests/polish_forests_anki.py similarity index 100% rename from python_pkg/polish_forests/polish_forests_anki.py rename to python_pkg/anki_decks/polish_forests/polish_forests_anki.py diff --git a/python_pkg/polish_forests/run.sh b/python_pkg/anki_decks/polish_forests/run.sh similarity index 100% rename from python_pkg/polish_forests/run.sh rename to python_pkg/anki_decks/polish_forests/run.sh diff --git a/python_pkg/polish_gminy/__init__.py b/python_pkg/anki_decks/polish_gminy/__init__.py similarity index 100% rename from python_pkg/polish_gminy/__init__.py rename to python_pkg/anki_decks/polish_gminy/__init__.py diff --git a/python_pkg/polish_gminy/polish_gminy_anki.py b/python_pkg/anki_decks/polish_gminy/polish_gminy_anki.py similarity index 100% rename from python_pkg/polish_gminy/polish_gminy_anki.py rename to python_pkg/anki_decks/polish_gminy/polish_gminy_anki.py diff --git a/python_pkg/polish_gminy/run.sh b/python_pkg/anki_decks/polish_gminy/run.sh similarity index 100% rename from python_pkg/polish_gminy/run.sh rename to python_pkg/anki_decks/polish_gminy/run.sh diff --git a/python_pkg/polish_islands/__init__.py b/python_pkg/anki_decks/polish_islands/__init__.py similarity index 100% rename from python_pkg/polish_islands/__init__.py rename to python_pkg/anki_decks/polish_islands/__init__.py diff --git a/python_pkg/polish_islands/polish_islands_anki.py b/python_pkg/anki_decks/polish_islands/polish_islands_anki.py similarity index 100% rename from python_pkg/polish_islands/polish_islands_anki.py rename to python_pkg/anki_decks/polish_islands/polish_islands_anki.py diff --git a/python_pkg/polish_islands/run.sh b/python_pkg/anki_decks/polish_islands/run.sh similarity index 100% rename from python_pkg/polish_islands/run.sh rename to python_pkg/anki_decks/polish_islands/run.sh diff --git a/python_pkg/polish_lakes/__init__.py b/python_pkg/anki_decks/polish_lakes/__init__.py similarity index 100% rename from python_pkg/polish_lakes/__init__.py rename to python_pkg/anki_decks/polish_lakes/__init__.py diff --git a/python_pkg/polish_lakes/polish_lakes_anki.py b/python_pkg/anki_decks/polish_lakes/polish_lakes_anki.py similarity index 100% rename from python_pkg/polish_lakes/polish_lakes_anki.py rename to python_pkg/anki_decks/polish_lakes/polish_lakes_anki.py diff --git a/python_pkg/polish_lakes/run.sh b/python_pkg/anki_decks/polish_lakes/run.sh similarity index 100% rename from python_pkg/polish_lakes/run.sh rename to python_pkg/anki_decks/polish_lakes/run.sh diff --git a/python_pkg/polish_landscape_parks/__init__.py b/python_pkg/anki_decks/polish_landscape_parks/__init__.py similarity index 100% rename from python_pkg/polish_landscape_parks/__init__.py rename to python_pkg/anki_decks/polish_landscape_parks/__init__.py diff --git a/python_pkg/polish_landscape_parks/polish_landscape_parks_anki.py b/python_pkg/anki_decks/polish_landscape_parks/polish_landscape_parks_anki.py similarity index 100% rename from python_pkg/polish_landscape_parks/polish_landscape_parks_anki.py rename to python_pkg/anki_decks/polish_landscape_parks/polish_landscape_parks_anki.py diff --git a/python_pkg/polish_landscape_parks/run.sh b/python_pkg/anki_decks/polish_landscape_parks/run.sh similarity index 100% rename from python_pkg/polish_landscape_parks/run.sh rename to python_pkg/anki_decks/polish_landscape_parks/run.sh diff --git a/python_pkg/polish_license_plates/README.md b/python_pkg/anki_decks/polish_license_plates/README.md similarity index 90% rename from python_pkg/polish_license_plates/README.md rename to python_pkg/anki_decks/polish_license_plates/README.md index 5caf4be..e8cd271 100644 --- a/python_pkg/polish_license_plates/README.md +++ b/python_pkg/anki_decks/polish_license_plates/README.md @@ -27,7 +27,7 @@ Polish license plates use a system where: License plate data is automatically extracted from Wikipedia's authoritative table: - **Source**: [Vehicle registration plates of Poland](https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Poland) -- **Update**: Run `python -m python_pkg.polish_license_plates.fetch_license_plates` to refresh data +- **Update**: Run `python -m python_pkg.anki_decks.polish_license_plates.fetch_license_plates` to refresh data This ensures the codes are always based on the most current public information. @@ -37,14 +37,14 @@ This ensures the codes are always based on the most current public information. ```bash # Generate with default settings -python -m python_pkg.polish_license_plates.polish_license_plates_anki +python -m python_pkg.anki_decks.polish_license_plates.polish_license_plates_anki # Specify custom output file -python -m python_pkg.polish_license_plates.polish_license_plates_anki \ +python -m python_pkg.anki_decks.polish_license_plates.polish_license_plates_anki \ --output my_plates.apkg # Use custom deck name -python -m python_pkg.polish_license_plates.polish_license_plates_anki \ +python -m python_pkg.anki_decks.polish_license_plates.polish_license_plates_anki \ --deck-name "My Polish Plates" ``` @@ -54,10 +54,10 @@ To fetch the latest data from Wikipedia: ```bash # Use cached data if available (default) -python -m python_pkg.polish_license_plates.fetch_license_plates +python -m python_pkg.anki_decks.polish_license_plates.fetch_license_plates # Force refresh from Wikipedia (ignore cache) -python -m python_pkg.polish_license_plates.fetch_license_plates --force +python -m python_pkg.anki_decks.polish_license_plates.fetch_license_plates --force ``` **Caching**: Downloaded Wikipedia data is cached for 7 days in `.wikipedia_cache/` to avoid unnecessary requests. Use `--force` to bypass the cache. diff --git a/python_pkg/polish_license_plates/__init__.py b/python_pkg/anki_decks/polish_license_plates/__init__.py similarity index 54% rename from python_pkg/polish_license_plates/__init__.py rename to python_pkg/anki_decks/polish_license_plates/__init__.py index 796216f..91b0043 100644 --- a/python_pkg/polish_license_plates/__init__.py +++ b/python_pkg/anki_decks/polish_license_plates/__init__.py @@ -4,4 +4,6 @@ from __future__ import annotations __all__ = ["LICENSE_PLATE_CODES"] -from python_pkg.polish_license_plates.license_plate_data import LICENSE_PLATE_CODES +from python_pkg.anki_decks.polish_license_plates.license_plate_data import ( + LICENSE_PLATE_CODES, +) diff --git a/python_pkg/polish_license_plates/fetch_license_plates.py b/python_pkg/anki_decks/polish_license_plates/fetch_license_plates.py similarity index 95% rename from python_pkg/polish_license_plates/fetch_license_plates.py rename to python_pkg/anki_decks/polish_license_plates/fetch_license_plates.py index eb46de3..7f8fccb 100755 --- a/python_pkg/polish_license_plates/fetch_license_plates.py +++ b/python_pkg/anki_decks/polish_license_plates/fetch_license_plates.py @@ -12,10 +12,10 @@ Caching: Cache expires after 7 days by default. Usage: - python -m python_pkg.polish_license_plates.fetch_license_plates + python -m python_pkg.anki_decks.polish_license_plates.fetch_license_plates # Force refresh (ignore cache) - python -m python_pkg.polish_license_plates.fetch_license_plates --force + python -m python_pkg.anki_decks.polish_license_plates.fetch_license_plates --force Source: https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Poland @@ -286,7 +286,7 @@ Data source: https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Poland Auto-generated by: - python -m python_pkg.polish_license_plates.fetch_license_plates + python -m python_pkg.anki_decks.polish_license_plates.fetch_license_plates Examples: WA = Warszawa (Warsaw) @@ -369,11 +369,15 @@ def main() -> int: sys.stdout.write("Next steps:\n") sys.stdout.write(" 1. Review the generated file\n") sys.stdout.write( - " 2. Run tests: " "pytest python_pkg/polish_license_plates/tests/\n" + " 2. Run tests: " + "pytest python_pkg/anki_decks/" + "polish_license_plates/tests/\n" ) sys.stdout.write( " 3. Regenerate Anki package: " - "python -m python_pkg.polish_license_plates.polish_license_plates_anki\n" + "python -m python_pkg.anki_decks." + "polish_license_plates." + "polish_license_plates_anki\n" ) except RuntimeError as e: diff --git a/python_pkg/polish_license_plates/license_plate_data.py b/python_pkg/anki_decks/polish_license_plates/license_plate_data.py similarity index 99% rename from python_pkg/polish_license_plates/license_plate_data.py rename to python_pkg/anki_decks/polish_license_plates/license_plate_data.py index ce40f0b..bee7157 100644 --- a/python_pkg/polish_license_plates/license_plate_data.py +++ b/python_pkg/anki_decks/polish_license_plates/license_plate_data.py @@ -31,7 +31,7 @@ Data source: Note: This data can be automatically updated by running: - python -m python_pkg.polish_license_plates.fetch_license_plates + python -m python_pkg.anki_decks.polish_license_plates.fetch_license_plates Examples: WA = Warszawa (Warsaw) diff --git a/python_pkg/polish_license_plates/polish_license_plates_anki.py b/python_pkg/anki_decks/polish_license_plates/polish_license_plates_anki.py similarity index 96% rename from python_pkg/polish_license_plates/polish_license_plates_anki.py rename to python_pkg/anki_decks/polish_license_plates/polish_license_plates_anki.py index d120d00..60752f0 100644 --- a/python_pkg/polish_license_plates/polish_license_plates_anki.py +++ b/python_pkg/anki_decks/polish_license_plates/polish_license_plates_anki.py @@ -9,10 +9,10 @@ Creates two types of cards: Usage: # Generate Anki cards for all Polish license plates - python -m python_pkg.polish_license_plates.polish_license_plates_anki + python -m python_pkg.anki_decks.polish_license_plates.polish_license_plates_anki # Specify custom output file - python -m python_pkg.polish_license_plates.polish_license_plates_anki \ + python -m python_pkg.anki_decks.polish_license_plates.polish_license_plates_anki \ --output plates.apkg Output: @@ -30,7 +30,9 @@ from typing import TYPE_CHECKING import genanki -from python_pkg.polish_license_plates.license_plate_data import LICENSE_PLATE_CODES +from python_pkg.anki_decks.polish_license_plates.license_plate_data import ( + LICENSE_PLATE_CODES, +) if TYPE_CHECKING: from collections.abc import Sequence diff --git a/python_pkg/polish_license_plates/tests/__init__.py b/python_pkg/anki_decks/polish_license_plates/tests/__init__.py similarity index 100% rename from python_pkg/polish_license_plates/tests/__init__.py rename to python_pkg/anki_decks/polish_license_plates/tests/__init__.py diff --git a/python_pkg/polish_license_plates/tests/test_polish_license_plates_anki.py b/python_pkg/anki_decks/polish_license_plates/tests/test_polish_license_plates_anki.py similarity index 94% rename from python_pkg/polish_license_plates/tests/test_polish_license_plates_anki.py rename to python_pkg/anki_decks/polish_license_plates/tests/test_polish_license_plates_anki.py index 81fa094..0742325 100644 --- a/python_pkg/polish_license_plates/tests/test_polish_license_plates_anki.py +++ b/python_pkg/anki_decks/polish_license_plates/tests/test_polish_license_plates_anki.py @@ -7,21 +7,21 @@ from pathlib import Path import pytest try: - from python_pkg.polish_license_plates.license_plate_data import ( + from python_pkg.anki_decks.polish_license_plates.license_plate_data import ( LICENSE_PLATE_CODES, ) - from python_pkg.polish_license_plates.polish_license_plates_anki import ( + from python_pkg.anki_decks.polish_license_plates.polish_license_plates_anki import ( generate_anki_package, main, ) except ImportError: import sys - sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent)) - from python_pkg.polish_license_plates.license_plate_data import ( + sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent.parent)) + from python_pkg.anki_decks.polish_license_plates.license_plate_data import ( LICENSE_PLATE_CODES, ) - from python_pkg.polish_license_plates.polish_license_plates_anki import ( + from python_pkg.anki_decks.polish_license_plates.polish_license_plates_anki import ( generate_anki_package, main, ) diff --git a/python_pkg/polish_mountain_peaks/__init__.py b/python_pkg/anki_decks/polish_mountain_peaks/__init__.py similarity index 100% rename from python_pkg/polish_mountain_peaks/__init__.py rename to python_pkg/anki_decks/polish_mountain_peaks/__init__.py diff --git a/python_pkg/polish_mountain_peaks/polish_mountain_peaks_anki.py b/python_pkg/anki_decks/polish_mountain_peaks/polish_mountain_peaks_anki.py similarity index 100% rename from python_pkg/polish_mountain_peaks/polish_mountain_peaks_anki.py rename to python_pkg/anki_decks/polish_mountain_peaks/polish_mountain_peaks_anki.py diff --git a/python_pkg/polish_mountain_peaks/run.sh b/python_pkg/anki_decks/polish_mountain_peaks/run.sh similarity index 100% rename from python_pkg/polish_mountain_peaks/run.sh rename to python_pkg/anki_decks/polish_mountain_peaks/run.sh diff --git a/python_pkg/polish_mountain_ranges/__init__.py b/python_pkg/anki_decks/polish_mountain_ranges/__init__.py similarity index 100% rename from python_pkg/polish_mountain_ranges/__init__.py rename to python_pkg/anki_decks/polish_mountain_ranges/__init__.py diff --git a/python_pkg/polish_mountain_ranges/polish_mountain_ranges_anki.py b/python_pkg/anki_decks/polish_mountain_ranges/polish_mountain_ranges_anki.py similarity index 100% rename from python_pkg/polish_mountain_ranges/polish_mountain_ranges_anki.py rename to python_pkg/anki_decks/polish_mountain_ranges/polish_mountain_ranges_anki.py diff --git a/python_pkg/polish_mountain_ranges/run.sh b/python_pkg/anki_decks/polish_mountain_ranges/run.sh similarity index 100% rename from python_pkg/polish_mountain_ranges/run.sh rename to python_pkg/anki_decks/polish_mountain_ranges/run.sh diff --git a/python_pkg/polish_national_parks/__init__.py b/python_pkg/anki_decks/polish_national_parks/__init__.py similarity index 100% rename from python_pkg/polish_national_parks/__init__.py rename to python_pkg/anki_decks/polish_national_parks/__init__.py diff --git a/python_pkg/polish_national_parks/polish_national_parks_anki.py b/python_pkg/anki_decks/polish_national_parks/polish_national_parks_anki.py similarity index 100% rename from python_pkg/polish_national_parks/polish_national_parks_anki.py rename to python_pkg/anki_decks/polish_national_parks/polish_national_parks_anki.py diff --git a/python_pkg/polish_national_parks/run.sh b/python_pkg/anki_decks/polish_national_parks/run.sh similarity index 100% rename from python_pkg/polish_national_parks/run.sh rename to python_pkg/anki_decks/polish_national_parks/run.sh diff --git a/python_pkg/polish_nature_reserves/__init__.py b/python_pkg/anki_decks/polish_nature_reserves/__init__.py similarity index 100% rename from python_pkg/polish_nature_reserves/__init__.py rename to python_pkg/anki_decks/polish_nature_reserves/__init__.py diff --git a/python_pkg/polish_nature_reserves/polish_nature_reserves_anki.py b/python_pkg/anki_decks/polish_nature_reserves/polish_nature_reserves_anki.py similarity index 100% rename from python_pkg/polish_nature_reserves/polish_nature_reserves_anki.py rename to python_pkg/anki_decks/polish_nature_reserves/polish_nature_reserves_anki.py diff --git a/python_pkg/polish_nature_reserves/run.sh b/python_pkg/anki_decks/polish_nature_reserves/run.sh similarity index 100% rename from python_pkg/polish_nature_reserves/run.sh rename to python_pkg/anki_decks/polish_nature_reserves/run.sh diff --git a/python_pkg/polish_powiaty/__init__.py b/python_pkg/anki_decks/polish_powiaty/__init__.py similarity index 100% rename from python_pkg/polish_powiaty/__init__.py rename to python_pkg/anki_decks/polish_powiaty/__init__.py diff --git a/python_pkg/polish_powiaty/polish_powiaty_anki.py b/python_pkg/anki_decks/polish_powiaty/polish_powiaty_anki.py similarity index 100% rename from python_pkg/polish_powiaty/polish_powiaty_anki.py rename to python_pkg/anki_decks/polish_powiaty/polish_powiaty_anki.py diff --git a/python_pkg/polish_powiaty/run.sh b/python_pkg/anki_decks/polish_powiaty/run.sh similarity index 100% rename from python_pkg/polish_powiaty/run.sh rename to python_pkg/anki_decks/polish_powiaty/run.sh diff --git a/python_pkg/polish_rivers/__init__.py b/python_pkg/anki_decks/polish_rivers/__init__.py similarity index 100% rename from python_pkg/polish_rivers/__init__.py rename to python_pkg/anki_decks/polish_rivers/__init__.py diff --git a/python_pkg/polish_rivers/polish_rivers_anki.py b/python_pkg/anki_decks/polish_rivers/polish_rivers_anki.py similarity index 100% rename from python_pkg/polish_rivers/polish_rivers_anki.py rename to python_pkg/anki_decks/polish_rivers/polish_rivers_anki.py diff --git a/python_pkg/polish_rivers/run.sh b/python_pkg/anki_decks/polish_rivers/run.sh similarity index 100% rename from python_pkg/polish_rivers/run.sh rename to python_pkg/anki_decks/polish_rivers/run.sh diff --git a/python_pkg/polish_unesco_sites/__init__.py b/python_pkg/anki_decks/polish_unesco_sites/__init__.py similarity index 100% rename from python_pkg/polish_unesco_sites/__init__.py rename to python_pkg/anki_decks/polish_unesco_sites/__init__.py diff --git a/python_pkg/polish_unesco_sites/polish_unesco_sites_anki.py b/python_pkg/anki_decks/polish_unesco_sites/polish_unesco_sites_anki.py similarity index 100% rename from python_pkg/polish_unesco_sites/polish_unesco_sites_anki.py rename to python_pkg/anki_decks/polish_unesco_sites/polish_unesco_sites_anki.py diff --git a/python_pkg/polish_unesco_sites/run.sh b/python_pkg/anki_decks/polish_unesco_sites/run.sh similarity index 100% rename from python_pkg/polish_unesco_sites/run.sh rename to python_pkg/anki_decks/polish_unesco_sites/run.sh diff --git a/python_pkg/preview_all.html b/python_pkg/anki_decks/preview_all.html similarity index 100% rename from python_pkg/preview_all.html rename to python_pkg/anki_decks/preview_all.html diff --git a/python_pkg/warsaw_bridges/__init__.py b/python_pkg/anki_decks/warsaw_bridges/__init__.py similarity index 100% rename from python_pkg/warsaw_bridges/__init__.py rename to python_pkg/anki_decks/warsaw_bridges/__init__.py diff --git a/python_pkg/warsaw_bridges/run.sh b/python_pkg/anki_decks/warsaw_bridges/run.sh similarity index 100% rename from python_pkg/warsaw_bridges/run.sh rename to python_pkg/anki_decks/warsaw_bridges/run.sh diff --git a/python_pkg/warsaw_bridges/warsaw_bridges_anki.py b/python_pkg/anki_decks/warsaw_bridges/warsaw_bridges_anki.py similarity index 100% rename from python_pkg/warsaw_bridges/warsaw_bridges_anki.py rename to python_pkg/anki_decks/warsaw_bridges/warsaw_bridges_anki.py diff --git a/python_pkg/warsaw_districts/README.md b/python_pkg/anki_decks/warsaw_districts/README.md similarity index 88% rename from python_pkg/warsaw_districts/README.md rename to python_pkg/anki_decks/warsaw_districts/README.md index 2d29ab4..a16dd6b 100644 --- a/python_pkg/warsaw_districts/README.md +++ b/python_pkg/anki_decks/warsaw_districts/README.md @@ -52,7 +52,7 @@ pip install matplotlib genanki geopandas ```bash # From the repository root -python -m python_pkg.warsaw_districts.warsaw_districts_anki +python -m python_pkg.anki_decks.warsaw_districts.warsaw_districts_anki ``` This creates: @@ -63,10 +63,10 @@ This creates: ```bash # Custom output file -python -m python_pkg.warsaw_districts.warsaw_districts_anki --output my_cards.apkg +python -m python_pkg.anki_decks.warsaw_districts.warsaw_districts_anki --output my_cards.apkg # Custom deck name -python -m python_pkg.warsaw_districts.warsaw_districts_anki --deck-name "Warszawa - Dzielnice" +python -m python_pkg.anki_decks.warsaw_districts.warsaw_districts_anki --deck-name "Warszawa - Dzielnice" ``` ## Importing into Anki diff --git a/python_pkg/warsaw_districts/__init__.py b/python_pkg/anki_decks/warsaw_districts/__init__.py similarity index 100% rename from python_pkg/warsaw_districts/__init__.py rename to python_pkg/anki_decks/warsaw_districts/__init__.py diff --git a/python_pkg/warsaw_districts/run.sh b/python_pkg/anki_decks/warsaw_districts/run.sh similarity index 100% rename from python_pkg/warsaw_districts/run.sh rename to python_pkg/anki_decks/warsaw_districts/run.sh diff --git a/python_pkg/warsaw_districts/tests/__init__.py b/python_pkg/anki_decks/warsaw_districts/tests/__init__.py similarity index 100% rename from python_pkg/warsaw_districts/tests/__init__.py rename to python_pkg/anki_decks/warsaw_districts/tests/__init__.py diff --git a/python_pkg/warsaw_districts/tests/test_warsaw_districts_anki.py b/python_pkg/anki_decks/warsaw_districts/tests/test_warsaw_districts_anki.py similarity index 96% rename from python_pkg/warsaw_districts/tests/test_warsaw_districts_anki.py rename to python_pkg/anki_decks/warsaw_districts/tests/test_warsaw_districts_anki.py index 965a7d4..c1592e5 100644 --- a/python_pkg/warsaw_districts/tests/test_warsaw_districts_anki.py +++ b/python_pkg/anki_decks/warsaw_districts/tests/test_warsaw_districts_anki.py @@ -8,7 +8,7 @@ import matplotlib.pyplot as plt import pytest try: - from python_pkg.warsaw_districts.warsaw_districts_anki import ( + from python_pkg.anki_decks.warsaw_districts.warsaw_districts_anki import ( WARSAW_DISTRICTS, create_district_map, generate_anki_package, @@ -18,8 +18,8 @@ try: except ImportError: import sys - sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent)) - from python_pkg.warsaw_districts.warsaw_districts_anki import ( + sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent.parent)) + from python_pkg.anki_decks.warsaw_districts.warsaw_districts_anki import ( WARSAW_DISTRICTS, create_district_map, generate_anki_package, diff --git a/python_pkg/warsaw_districts/warsaw_districts.apkg b/python_pkg/anki_decks/warsaw_districts/warsaw_districts.apkg similarity index 100% rename from python_pkg/warsaw_districts/warsaw_districts.apkg rename to python_pkg/anki_decks/warsaw_districts/warsaw_districts.apkg diff --git a/python_pkg/warsaw_districts/warsaw_districts_anki.py b/python_pkg/anki_decks/warsaw_districts/warsaw_districts_anki.py similarity index 98% rename from python_pkg/warsaw_districts/warsaw_districts_anki.py rename to python_pkg/anki_decks/warsaw_districts/warsaw_districts_anki.py index ef1f07f..2289f2d 100755 --- a/python_pkg/warsaw_districts/warsaw_districts_anki.py +++ b/python_pkg/anki_decks/warsaw_districts/warsaw_districts_anki.py @@ -7,10 +7,11 @@ from OpenStreetMap. Usage: # Generate Anki cards for all Warsaw districts - python -m python_pkg.warsaw_districts.warsaw_districts_anki + python -m python_pkg.anki_decks.warsaw_districts.warsaw_districts_anki # Specify custom output file - python -m python_pkg.warsaw_districts.warsaw_districts_anki --output warsaw.apkg + python -m python_pkg.anki_decks.warsaw_districts.warsaw_districts_anki \ + --output warsaw.apkg Output: Creates a self-contained .apkg file that can be directly imported into Anki. diff --git a/python_pkg/warsaw_districts/warszawa-dzielnice.geojson b/python_pkg/anki_decks/warsaw_districts/warszawa-dzielnice.geojson similarity index 100% rename from python_pkg/warsaw_districts/warszawa-dzielnice.geojson rename to python_pkg/anki_decks/warsaw_districts/warszawa-dzielnice.geojson diff --git a/python_pkg/warsaw_landmarks/__init__.py b/python_pkg/anki_decks/warsaw_landmarks/__init__.py similarity index 100% rename from python_pkg/warsaw_landmarks/__init__.py rename to python_pkg/anki_decks/warsaw_landmarks/__init__.py diff --git a/python_pkg/warsaw_landmarks/run.sh b/python_pkg/anki_decks/warsaw_landmarks/run.sh similarity index 100% rename from python_pkg/warsaw_landmarks/run.sh rename to python_pkg/anki_decks/warsaw_landmarks/run.sh diff --git a/python_pkg/warsaw_landmarks/warsaw_landmarks_anki.py b/python_pkg/anki_decks/warsaw_landmarks/warsaw_landmarks_anki.py similarity index 100% rename from python_pkg/warsaw_landmarks/warsaw_landmarks_anki.py rename to python_pkg/anki_decks/warsaw_landmarks/warsaw_landmarks_anki.py diff --git a/python_pkg/warsaw_metro/__init__.py b/python_pkg/anki_decks/warsaw_metro/__init__.py similarity index 100% rename from python_pkg/warsaw_metro/__init__.py rename to python_pkg/anki_decks/warsaw_metro/__init__.py diff --git a/python_pkg/anki_decks/warsaw_metro/cache/warsaw_metro.geojson b/python_pkg/anki_decks/warsaw_metro/cache/warsaw_metro.geojson new file mode 100644 index 0000000..3952809 --- /dev/null +++ b/python_pkg/anki_decks/warsaw_metro/cache/warsaw_metro.geojson @@ -0,0 +1,287 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "Ratusz-Arsena\u0142", + "line": "", + "osm_id": 35121250 + }, + "geometry": { "type": "Point", "coordinates": [21.0008823, 52.2452163] } + }, + { + "type": "Feature", + "properties": { "name": "Marymont", "line": "", "osm_id": 291414851 }, + "geometry": { "type": "Point", "coordinates": [20.9719399, 52.2715768] } + }, + { + "type": "Feature", + "properties": { + "name": "Stare Bielany", + "line": "", + "osm_id": 307389114 + }, + "geometry": { "type": "Point", "coordinates": [20.9493511, 52.2818277] } + }, + { + "type": "Feature", + "properties": { "name": "Wawrzyszew", "line": "", "osm_id": 307389115 }, + "geometry": { "type": "Point", "coordinates": [20.939515, 52.2863474] } + }, + { + "type": "Feature", + "properties": { "name": "M\u0142ociny", "line": "", "osm_id": 307389116 }, + "geometry": { "type": "Point", "coordinates": [20.9298678, 52.2907703] } + }, + { + "type": "Feature", + "properties": { + "name": "S\u0142odowiec", + "line": "", + "osm_id": 1958108834 + }, + "geometry": { "type": "Point", "coordinates": [20.9601259, 52.2768261] } + }, + { + "type": "Feature", + "properties": { + "name": "Dworzec Wile\u0144ski", + "line": "", + "osm_id": 3390187815 + }, + "geometry": { "type": "Point", "coordinates": [21.0357972, 52.2537771] } + }, + { + "type": "Feature", + "properties": { + "name": "Stadion Narodowy", + "line": "", + "osm_id": 3390197100 + }, + "geometry": { "type": "Point", "coordinates": [21.042847, 52.2468346] } + }, + { + "type": "Feature", + "properties": { + "name": "Centrum Nauki Kopernik", + "line": "", + "osm_id": 3390230685 + }, + "geometry": { "type": "Point", "coordinates": [21.0317878, 52.2399148] } + }, + { + "type": "Feature", + "properties": { + "name": "Nowy \u015awiat-Uniwersytet", + "line": "", + "osm_id": 3390237898 + }, + "geometry": { "type": "Point", "coordinates": [21.0168168, 52.2368196] } + }, + { + "type": "Feature", + "properties": { "name": "Rondo ONZ", "line": "", "osm_id": 3390266492 }, + "geometry": { "type": "Point", "coordinates": [20.9981024, 52.2330735] } + }, + { + "type": "Feature", + "properties": { + "name": "Rondo Daszy\u0144skiego", + "line": "", + "osm_id": 3390267294 + }, + "geometry": { "type": "Point", "coordinates": [20.9828946, 52.2300827] } + }, + { + "type": "Feature", + "properties": { "name": "Kabaty", "line": "", "osm_id": 3390283399 }, + "geometry": { "type": "Point", "coordinates": [21.0650711, 52.1320765] } + }, + { + "type": "Feature", + "properties": { + "name": "Stok\u0142osy", + "line": "", + "osm_id": 3390289961 + }, + "geometry": { "type": "Point", "coordinates": [21.0347233, 52.1560759] } + }, + { + "type": "Feature", + "properties": { "name": "Natolin", "line": "", "osm_id": 3390290324 }, + "geometry": { "type": "Point", "coordinates": [21.0564351, 52.1411007] } + }, + { + "type": "Feature", + "properties": { "name": "Imielin", "line": "", "osm_id": 3390290598 }, + "geometry": { "type": "Point", "coordinates": [21.0461062, 52.1493] } + }, + { + "type": "Feature", + "properties": { + "name": "Ursyn\u00f3w", + "line": "", + "osm_id": 3390304927 + }, + "geometry": { "type": "Point", "coordinates": [21.0276283, 52.1620456] } + }, + { + "type": "Feature", + "properties": { + "name": "S\u0142u\u017cew", + "line": "", + "osm_id": 3390306374 + }, + "geometry": { "type": "Point", "coordinates": [21.0262866, 52.1727624] } + }, + { + "type": "Feature", + "properties": { + "name": "Rac\u0142awicka", + "line": "", + "osm_id": 3390327068 + }, + "geometry": { "type": "Point", "coordinates": [21.0122349, 52.1988637] } + }, + { + "type": "Feature", + "properties": { "name": "Wierzbno", "line": "", "osm_id": 3390333313 }, + "geometry": { "type": "Point", "coordinates": [21.0167966, 52.1898719] } + }, + { + "type": "Feature", + "properties": { "name": "Wilanowska", "line": "", "osm_id": 3390336021 }, + "geometry": { "type": "Point", "coordinates": [21.0231452, 52.1818168] } + }, + { + "type": "Feature", + "properties": { + "name": "Pole Mokotowskie", + "line": "", + "osm_id": 3390342469 + }, + "geometry": { "type": "Point", "coordinates": [21.0079298, 52.2087775] } + }, + { + "type": "Feature", + "properties": { + "name": "Politechnika", + "line": "", + "osm_id": 3390361095 + }, + "geometry": { "type": "Point", "coordinates": [21.0153031, 52.2186581] } + }, + { + "type": "Feature", + "properties": { "name": "Centrum", "line": "", "osm_id": 3390365405 }, + "geometry": { "type": "Point", "coordinates": [21.010186, 52.2310069] } + }, + { + "type": "Feature", + "properties": { + "name": "Dworzec Gda\u0144ski", + "line": "", + "osm_id": 3416840991 + }, + "geometry": { "type": "Point", "coordinates": [20.9941857, 52.2580586] } + }, + { + "type": "Feature", + "properties": { + "name": "Plac Wilsona", + "line": "", + "osm_id": 3615569910 + }, + "geometry": { "type": "Point", "coordinates": [20.9844973, 52.2692619] } + }, + { + "type": "Feature", + "properties": { "name": "P\u0142ocka", "line": "", "osm_id": 4930657482 }, + "geometry": { "type": "Point", "coordinates": [20.9663847, 52.2324542] } + }, + { + "type": "Feature", + "properties": { "name": "Trocka", "line": "", "osm_id": 4930657487 }, + "geometry": { "type": "Point", "coordinates": [21.0550586, 52.2751021] } + }, + { + "type": "Feature", + "properties": { + "name": "\u015awi\u0119tokrzyska", + "line": "", + "osm_id": 5117464830 + }, + "geometry": { "type": "Point", "coordinates": [21.0078988, 52.2350954] } + }, + { + "type": "Feature", + "properties": { + "name": "Ksi\u0119cia Janusza", + "line": "", + "osm_id": 5907821373 + }, + "geometry": { "type": "Point", "coordinates": [20.9443771, 52.2391822] } + }, + { + "type": "Feature", + "properties": { + "name": "M\u0142yn\u00f3w", + "line": "", + "osm_id": 5907821374 + }, + "geometry": { "type": "Point", "coordinates": [20.9601048, 52.2376624] } + }, + { + "type": "Feature", + "properties": { "name": "Szwedzka", "line": "", "osm_id": 6053348692 }, + "geometry": { "type": "Point", "coordinates": [21.0455232, 52.2634709] } + }, + { + "type": "Feature", + "properties": { + "name": "Targ\u00f3wek Mieszkaniowy", + "line": "", + "osm_id": 6564265270 + }, + "geometry": { "type": "Point", "coordinates": [21.0513658, 52.2692518] } + }, + { + "type": "Feature", + "properties": { "name": "Bemowo", "line": "", "osm_id": 7362922676 }, + "geometry": { "type": "Point", "coordinates": [20.9154991, 52.2392071] } + }, + { + "type": "Feature", + "properties": { + "name": "Ulrych\u00f3w", + "line": "", + "osm_id": 7362922677 + }, + "geometry": { "type": "Point", "coordinates": [20.9298652, 52.2403314] } + }, + { + "type": "Feature", + "properties": { + "name": "Br\u00f3dno", + "line": "", + "osm_id": 10058224345 + }, + "geometry": { "type": "Point", "coordinates": [21.0289387, 52.293585] } + }, + { + "type": "Feature", + "properties": { + "name": "Kondratowicza", + "line": "", + "osm_id": 10058224348 + }, + "geometry": { "type": "Point", "coordinates": [21.0486889, 52.2920848] } + }, + { + "type": "Feature", + "properties": { "name": "Zacisze", "line": "", "osm_id": 10058224349 }, + "geometry": { "type": "Point", "coordinates": [21.062148, 52.2837496] } + } + ] +} diff --git a/python_pkg/warsaw_metro/run.sh b/python_pkg/anki_decks/warsaw_metro/run.sh similarity index 100% rename from python_pkg/warsaw_metro/run.sh rename to python_pkg/anki_decks/warsaw_metro/run.sh diff --git a/python_pkg/warsaw_metro/warsaw_metro_anki.py b/python_pkg/anki_decks/warsaw_metro/warsaw_metro_anki.py similarity index 100% rename from python_pkg/warsaw_metro/warsaw_metro_anki.py rename to python_pkg/anki_decks/warsaw_metro/warsaw_metro_anki.py diff --git a/python_pkg/warsaw_osiedla/__init__.py b/python_pkg/anki_decks/warsaw_osiedla/__init__.py similarity index 100% rename from python_pkg/warsaw_osiedla/__init__.py rename to python_pkg/anki_decks/warsaw_osiedla/__init__.py diff --git a/python_pkg/warsaw_osiedla/run.sh b/python_pkg/anki_decks/warsaw_osiedla/run.sh similarity index 100% rename from python_pkg/warsaw_osiedla/run.sh rename to python_pkg/anki_decks/warsaw_osiedla/run.sh diff --git a/python_pkg/warsaw_osiedla/warsaw_osiedla_anki.py b/python_pkg/anki_decks/warsaw_osiedla/warsaw_osiedla_anki.py similarity index 100% rename from python_pkg/warsaw_osiedla/warsaw_osiedla_anki.py rename to python_pkg/anki_decks/warsaw_osiedla/warsaw_osiedla_anki.py diff --git a/python_pkg/warsaw_streets/README.md b/python_pkg/anki_decks/warsaw_streets/README.md similarity index 100% rename from python_pkg/warsaw_streets/README.md rename to python_pkg/anki_decks/warsaw_streets/README.md diff --git a/python_pkg/warsaw_streets/__init__.py b/python_pkg/anki_decks/warsaw_streets/__init__.py similarity index 100% rename from python_pkg/warsaw_streets/__init__.py rename to python_pkg/anki_decks/warsaw_streets/__init__.py diff --git a/python_pkg/warsaw_streets/run.sh b/python_pkg/anki_decks/warsaw_streets/run.sh similarity index 100% rename from python_pkg/warsaw_streets/run.sh rename to python_pkg/anki_decks/warsaw_streets/run.sh diff --git a/python_pkg/warsaw_streets/warsaw_streets_anki.py b/python_pkg/anki_decks/warsaw_streets/warsaw_streets_anki.py similarity index 99% rename from python_pkg/warsaw_streets/warsaw_streets_anki.py rename to python_pkg/anki_decks/warsaw_streets/warsaw_streets_anki.py index 1ddd61a..2eb304c 100755 --- a/python_pkg/warsaw_streets/warsaw_streets_anki.py +++ b/python_pkg/anki_decks/warsaw_streets/warsaw_streets_anki.py @@ -5,7 +5,7 @@ Generates Anki-compatible flashcard decks with maps showing individual Warsaw streets highlighted on a city map. Usage: - python -m python_pkg.warsaw_streets.warsaw_streets_anki + python -m python_pkg.anki_decks.warsaw_streets.warsaw_streets_anki Output: Creates a self-contained .apkg file that can be directly imported into Anki. diff --git a/python_pkg/geo_data.py b/python_pkg/geo_data.py index 825d7e1..6298dc6 100644 --- a/python_pkg/geo_data.py +++ b/python_pkg/geo_data.py @@ -262,7 +262,10 @@ def get_warsaw_boundary() -> gpd.GeoDataFrame: # Try to use districts file first districts_path = ( - Path(__file__).parent / "warsaw_districts" / "warszawa-dzielnice.geojson" + Path(__file__).parent + / "anki_decks" + / "warsaw_districts" + / "warszawa-dzielnice.geojson" ) if districts_path.exists(): warsaw_gdf = gpd.read_file(districts_path) @@ -315,7 +318,10 @@ def get_warsaw_districts() -> gpd.GeoDataFrame: GeoDataFrame with district boundaries. """ districts_path = ( - Path(__file__).parent / "warsaw_districts" / "warszawa-dzielnice.geojson" + Path(__file__).parent + / "anki_decks" + / "warsaw_districts" + / "warszawa-dzielnice.geojson" ) if districts_path.exists(): gdf = gpd.read_file(districts_path)