8 Commits

Author SHA1 Message Date
1c432a251e Reorganize to match skills directory structure
- Move cpc_direct_stations.py to scripts/
- Rename CLAUDE.md to SKILL.md
- Add .gitignore for Python cache files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 09:54:50 +08:00
3ddbf259ae Remove coordinate feature due to poor UX
- Revert to initial clean version without coordinates
- Nominatim rate limiting makes the feature unusable
- Keep core functionality: fetching CPC station data

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 09:47:10 +08:00
876b7483ba Add offline OSM fuel station database
- Add fuel_coords_db.py to download OSM fuel station data
- 1299 CPC/related stations with coordinates
- Query order: cache -> OSM database -> Nominatim API
- Build database with: python3 fuel_coords_db.py --download

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 09:42:03 +08:00
2a4252aa1d Simplify coordinate lookup: remove proxy support
Free proxies from proxifly/free-proxy-list don't support HTTPS well
and are unreliable. Stick with cache + concurrent approach.

- Remove proxy fetching and handling code
- Default workers reduced to 2 to be more conservative
- Rely on persistent cache for efficiency

Usage: Run in small batches to avoid Nominatim rate limits.
Once cached, results are instant.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 09:04:07 +08:00
1d08779941 Add concurrent geocoding with ThreadPoolExecutor
- Use --workers to set concurrent thread count (default 3)
- Speed up coordinate lookup by ~3x with 3 workers
- Maintain Nominatim rate limiting per thread

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 08:52:36 +08:00
be7f919675 Add coordinate cache to avoid redundant API calls
- Cache stored in ~/.cache/cpc_stations_coords.json
- Cache key based on station name + city + district + address
- Shows cache hit/miss statistics on stderr
- Subsequent runs are instant for cached stations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 08:24:20 +08:00
ee396828ab Add coordinate lookup via Nominatim OSM API
- Add --coords flag to enable geocoding
- Add --delay option for rate limiting (default 1.0s)
- Try multiple query formats: full address, station+city, district
- Include latitude/longitude in JSON and CSV output

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 08:18:26 +08:00
36b12dbe81 Initial commit: Add CPC direct-operated stations scraper
Script for scraping Taiwan CPC (中油) official direct-operated gas station information from vipmbr.cpc.com.tw

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 08:15:17 +08:00