Use ExifTool's Geolocation API if supported.#481
Closed
jmathai wants to merge 1 commit into
Closed
Conversation
Owner
jmathai
commented
Jun 18, 2025
- ExifTool geolocation as MapQuest alternative when no API key is configured
- Comprehensive unit tests
- Proper fallback behavior
- Priority order: MapQuest (if key exists) → ExifTool → Unknown Location
- ExifTool geolocation as MapQuest alternative when no API key is configured - Comprehensive unit tests - Proper fallback behavior - Priority order: MapQuest (if key exists) → ExifTool → Unknown Location
3 tasks
vesaias
added a commit
to vesaias/elodie
that referenced
this pull request
Apr 25, 2026
Two related fixes for the new ExifTool reverse-geolocation flow added in PR jmathai#481/jmathai#505 so paths like `%date %country` resolve correctly end-to-end: 1. geolocation.py: accept both prefixed and bare exiftool keys. `is_exiftool_available`, `exiftool_coordinates_by_name`, and `exiftool_place_name` only matched `ExifTool:GeolocationCity`/etc., missing the bare `GeolocationCity` form that exiftool returns when the `-G` group flag is not in effect. A new helper `_geolocation_field` transparently tries both forms. 2. filesystem.py: expand sub-key aliases inside `%custom` templates. `get_dynamic_path` for `custom` recursively dispatched each `%foo` token but passed the literal `%foo` as the mask, ignoring the `[Directory]` config alias. As a result, configurations like location=%country custom=%date %location full_path=%custom resolved `%location` to `place_name['default']` (the city, since exiftool_place_name sets default to the most-specific field) instead of expanding via the `location=%country` alias. The custom resolver now substitutes the alias value before recursing, mirroring the top-level path resolver. Tests: - 4 new geolocation tests cover both bare and prefixed key forms in is_exiftool_available, exiftool_coordinates_by_name, and exiftool_place_name. - 1 new filesystem test exercises the `%custom` -> `%location` -> `%country` expansion chain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.