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.
2026-02-07 15:32:23 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Script to generate Warsaw Metro Anki deck
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
VENV_DIR="$SCRIPT_DIR/.venv"
|
|
|
|
|
PREVIEW_DIR="$SCRIPT_DIR/preview_images"
|
|
|
|
|
|
|
|
|
|
echo "=== Warsaw Metro Stations Anki Generator ==="
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
if [ ! -d "$VENV_DIR" ]; then
|
2026-02-20 00:21:41 +01:00
|
|
|
echo "Creating virtual environment..."
|
|
|
|
|
python3 -m venv "$VENV_DIR"
|
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.
2026-02-07 15:32:23 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Activating virtual environment..."
|
|
|
|
|
source "$VENV_DIR/bin/activate"
|
|
|
|
|
|
|
|
|
|
echo "Installing dependencies..."
|
|
|
|
|
pip install --quiet --upgrade pip
|
|
|
|
|
pip install --quiet matplotlib genanki geopandas requests shapely
|
|
|
|
|
|
|
|
|
|
cd "$SCRIPT_DIR"
|
|
|
|
|
|
|
|
|
|
# Create preview images directory
|
|
|
|
|
mkdir -p "$PREVIEW_DIR"
|
|
|
|
|
|
|
|
|
|
python -m warsaw_metro_anki --output warsaw_metro.apkg --preview "$PREVIEW_DIR" --preview-count 5
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
echo "Done! The Anki deck is at: $SCRIPT_DIR/warsaw_metro.apkg"
|
|
|
|
|
echo "Preview images are in: $PREVIEW_DIR"
|