testsAndMisc-archive/python_pkg/anki_decks/warsaw_streets/run.sh
Krzysztof kuhy Rudnicki fe2c6628e2 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

35 lines
860 B
Bash
Executable File

#!/bin/bash
# Script to generate Warsaw Streets 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 Streets Anki Generator ==="
echo
if [ ! -d "$VENV_DIR" ]; then
echo "Creating virtual environment..."
python3 -m venv "$VENV_DIR"
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_streets_anki --output warsaw_streets.apkg --preview "$PREVIEW_DIR" --preview-count 5
echo
echo "Done! The Anki deck is at: $SCRIPT_DIR/warsaw_streets.apkg"
echo "Preview images are in: $PREVIEW_DIR"