mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-07-04 15:03:04 +02:00
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.
35 lines
859 B
Bash
Executable File
35 lines
859 B
Bash
Executable File
#!/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
|
|
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_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"
|