Compare commits
4 Commits
34f5ce14bc
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 9191f0e16b | |||
| 8e2414f2fd | |||
| ffedc9d9cf | |||
| 2e2e58a0df |
@@ -6,15 +6,10 @@ This script will update any of the Country Code, Country, State, City and Locati
|
||||
|
||||
## Installing and setting up
|
||||
|
||||
The script uses the following external non defauly python libraries
|
||||
|
||||
* xmp toolkit
|
||||
* requests
|
||||
|
||||
install both with the pip3 command
|
||||
Everything is setup with uv, to install the tool itself
|
||||
|
||||
```sh
|
||||
uv sync
|
||||
uv tool install reverse-geolocate
|
||||
```
|
||||
|
||||
XMP Toolkit also needs the [Exempi Library](http://libopenraw.freedesktop.org/wiki/Exempi). This one can be install via brew or macports directly.
|
||||
@@ -23,7 +18,7 @@ See more information for [Python XMP Tool kit](http://python-xmp-toolkit.readthe
|
||||
## Command line arguments
|
||||
|
||||
```sh
|
||||
uv run reverse-geolocate [-h] -i
|
||||
reverse-geolocate [-h] -i
|
||||
[XMP SOURCE FOLDER [XMP SOURCE FOLDER ...]]
|
||||
[-x [EXCLUDE XMP SOURCE FOLDER [EXCLUDE XMP SOURCE FOLDER ...]]]
|
||||
[-l LIGHTROOM FOLDER] [-s]
|
||||
@@ -33,12 +28,6 @@ uv run reverse-geolocate [-h] -i
|
||||
[-v] [--debug] [--test]
|
||||
```
|
||||
|
||||
or if outside of the project dir
|
||||
|
||||
```sh
|
||||
uv run --project <path to project> reverse-geolocate
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
Argument | Argument Value | Description
|
||||
@@ -69,19 +58,19 @@ If the Lightroom lookup is used without the --strict argument and several files
|
||||
#### Example
|
||||
|
||||
```sh
|
||||
uv run reverse-geolocate -i Photos/2017/01 -i Photos/2017/02 -l LightRoom/MyCatalogue -f overwrite -g <API KEY>
|
||||
reverse-geolocate -i Photos/2017/01 -i Photos/2017/02 -l LightRoom/MyCatalogue -f overwrite -g <API KEY>
|
||||
```
|
||||
|
||||
Will find all XMP sidecar files in both folders *Photos/2017/01* and *Photos/2017/02* and all folder below it. Uses the Lightroom database at *LightRoom/MyCatalogue*. The script will overwrite all data, even if it is already set
|
||||
|
||||
```sh
|
||||
uv run reverse-geolocate -i Photos/2017/01 -i Photos/2017/02 -x Photos/2017/02/Folder\ A -x Photos/2017/01/Folder\ B/some_file.xmp -l LightRoom/MyCatalogue
|
||||
reverse-geolocate -i Photos/2017/01 -i Photos/2017/02 -x Photos/2017/02/Folder\ A -x Photos/2017/01/Folder\ B/some_file.xmp -l LightRoom/MyCatalogue
|
||||
```
|
||||
|
||||
Will exlucde "Photos/2017/02/Folder A" from processing. For -x also a file (including the .xmp extension) can be given.
|
||||
|
||||
```sh
|
||||
uv run reverse-geolocate -i Photos/2017/01/Event-01/some_photo.xmp -f location
|
||||
reverse-geolocate -i Photos/2017/01/Event-01/some_photo.xmp -f location
|
||||
```
|
||||
|
||||
Only works on *some_photo.xmp* file and will only set the *location* field if it is not yet set.
|
||||
|
||||
+20
-3
@@ -1,17 +1,34 @@
|
||||
[project]
|
||||
name = "reverse-geolocate"
|
||||
version = "1.1.2"
|
||||
version = "1.1.2.2"
|
||||
description = "Reverse Geolocate from Lat/Long information and write location information into sidecard files"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.14"
|
||||
dependencies = [
|
||||
"python-xmp-toolkit>=2.1.0",
|
||||
"requests>=2.32.5",
|
||||
"requests>=2.32.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
reverse-geolocate = "reverse_geolocate.reverse_geolocate:main"
|
||||
|
||||
# MARK: build system
|
||||
[build-system]
|
||||
requires = ["uv_build>=0.9.7,<0.10.0"]
|
||||
requires = ["uv_build>=0.12.0,<0.13.0"]
|
||||
build-backend = "uv_build"
|
||||
|
||||
# MARK: build target
|
||||
[[tool.uv.index]]
|
||||
name = "private-pypi"
|
||||
url = "https://git.gullevek.org/api/packages/PyPI/pypi/simple/"
|
||||
publish-url = "https://git.gullevek.org/api/packages/PyPI/pypi/"
|
||||
[[tool.uv.index]]
|
||||
name = "test-pypi"
|
||||
url = "https://test.pypi.org/simple/"
|
||||
publish-url = "https://test.pypi.org/legacy/"
|
||||
[[tool.uv.index]]
|
||||
name = "pypi"
|
||||
url = "https://pypi.org/simple/"
|
||||
publish-url = "https://pypi.org/legacy/"
|
||||
|
||||
# __END__
|
||||
|
||||
@@ -1402,7 +1402,7 @@ def main():
|
||||
if len(failed_files) > 0:
|
||||
print("{}".format('-' * 40))
|
||||
print("Files that failed to update:")
|
||||
print("{}".format(', '.join(failed_files)))
|
||||
print("{}".format("\n".join(failed_files)))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user