2026-01-07 18:03:00 +01:00
# Warsaw Districts Anki Generator
Generate Anki flashcards for learning the 18 districts (dzielnice) of Warsaw, Poland.
## Features
- Generates flashcards for all 18 Warsaw districts
2026-01-07 22:42:29 +01:00
- **Uses real district boundaries from OpenStreetMap data**
- Front of card: Map showing the full city with only the target district's border highlighted in bold
2026-01-07 18:03:00 +01:00
- Back of card: District name in Polish
2026-01-07 22:24:59 +01:00
- Self-contained .apkg file with embedded images
2026-01-07 18:03:00 +01:00
- Compatible with AnkiWeb and AnkiDroid
2026-01-07 22:42:29 +01:00
## Data Source
District boundaries are sourced from [andilabs/warszawa-dzielnice-geojson ](https://github.com/andilabs/warszawa-dzielnice-geojson ), which provides accurate OpenStreetMap-based GeoJSON data for all Warsaw districts.
2026-01-07 18:03:00 +01:00
## Installation
2026-01-07 22:24:59 +01:00
Install dependencies using your preferred method:
### Using pyenv (recommended)
```bash
pyenv install 3.10 # or later
pyenv shell 3.10
2026-01-07 22:42:29 +01:00
pip install matplotlib genanki geopandas
2026-01-07 22:24:59 +01:00
```
### Using pipx
```bash
2026-01-07 22:42:29 +01:00
pipx install --python python3.10 matplotlib genanki geopandas
2026-01-07 22:24:59 +01:00
```
### Using system package manager (Arch Linux)
```bash
2026-01-07 22:42:29 +01:00
sudo pacman -S python-matplotlib python-geopandas
2026-01-07 22:24:59 +01:00
pip install genanki
```
### Using pip directly
2026-01-07 18:03:00 +01:00
```bash
2026-01-07 22:42:29 +01:00
pip install matplotlib genanki geopandas
2026-01-07 18:03:00 +01:00
```
## Usage
### Generate flashcards
```bash
# From the repository root
python -m python_pkg.warsaw_districts.warsaw_districts_anki
```
This creates:
2026-01-07 22:24:59 +01:00
- `warsaw_districts.apkg` - Self-contained Anki package with all images embedded
2026-01-07 18:03:00 +01:00
### Custom options
```bash
2026-01-07 22:24:59 +01:00
# Custom output file
python -m python_pkg.warsaw_districts.warsaw_districts_anki --output my_cards.apkg
2026-01-07 18:03:00 +01:00
# Custom deck name
2026-01-07 22:24:59 +01:00
python -m python_pkg.warsaw_districts.warsaw_districts_anki --deck-name "Warszawa - Dzielnice"
2026-01-07 18:03:00 +01:00
```
## Importing into Anki
1. Open Anki
2. File → Import
2026-01-07 22:24:59 +01:00
3. Select the generated `warsaw_districts.apkg` file
4. Click Import
That's it! All images are already embedded in the .apkg file.
2026-01-07 18:03:00 +01:00
## Warsaw Districts
The generator includes all 18 official districts of Warsaw:
1. Bemowo
2. Białołęka
3. Bielany
4. Mokotów
5. Ochota
6. Praga-Południe
7. Praga-Północ
8. Rembertów
9. Śródmieście
10. Targówek
11. Ursus
12. Ursynów
13. Wawer
14. Wesoła
15. Wilanów
16. Włochy
17. Wola
18. Żoliborz
## Development
### Running tests
```bash
pytest python_pkg/warsaw_districts/tests/
```
### Code quality
```bash
ruff check python_pkg/warsaw_districts/
```
## License
Same as the parent repository.