Metadata-Version: 2.4
Name: wikipicture
Version: 0.2.0
Summary: Scan geotagged photos and find Wikipedia articles that need images at those locations
License: MIT License
        
        Copyright (c) 2026 WikiPicture Contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow>=10.0
Requires-Dist: pillow-heif>=0.13
Requires-Dist: requests>=2.31
Requires-Dist: opencv-python-headless>=4.8
Requires-Dist: click>=8.1
Requires-Dist: Jinja2>=3.1
Requires-Dist: tqdm>=4.66
Provides-Extra: dev
Requires-Dist: pytest>=7.4; extra == "dev"
Requires-Dist: pytest-cov>=4.1; extra == "dev"
Requires-Dist: responses>=0.23; extra == "dev"
Dynamic: license-file

# WikiPicture

Scan your geotagged travel photos and discover which Wikipedia articles need images at those locations.

## Features

- **EXIF GPS extraction** from JPEG and HEIC/HEIF photos
- **Reverse geocoding** via OpenStreetMap Nominatim
- **Wikipedia analysis** — finds articles missing images or tagged "needs photo"
- **Wikimedia Commons saturation check** — see how many photos already exist nearby
- **Photo quality screening** — resolution and blur detection
- **Opportunity scoring** — prioritizes your best upload candidates
- **HTML report** — sortable table with thumbnails, links, and color-coded priority

## Installation

```bash
pip install -e .
```

## Usage

```bash
# Scan a folder of photos and generate a report
wikipicture /path/to/photos --output report.html

# Limit to a specific number of photos
wikipicture /path/to/photos --output report.html --limit 50

# Skip quality filtering
wikipicture /path/to/photos --output report.html --skip-quality-check
```

## How It Works

1. Scans your photo folder for JPEG and HEIC/HEIF files with GPS data
2. Clusters nearby photos to reduce API calls
3. Reverse-geocodes each unique location via Nominatim
4. Searches Wikipedia for articles about each location
5. Checks if those articles need images (few/no photos, "needs photo" tags)
6. Searches Wikimedia Commons to see how saturated each location is
7. Scores each photo by upload opportunity and generates an HTML report

## API Usage

This tool uses **public, unauthenticated** Wikimedia and OpenStreetMap APIs.
Rate limits are respected automatically (1 request/second for Nominatim).
Results are cached in a local SQLite database so re-runs are fast.

## License

MIT
