52 Commits

Author SHA1 Message Date
65e352e8a4 Merge branch 'master' of github.com:gullevek/reverse_geolocate 2022-11-11 22:36:30 +09:00
38083d8a46 Add .venv folder to gitignore 2022-11-11 22:34:48 +09:00
ce676dea72 Changed indent level for parser arguments
They are all now on the same level indented by one step
2022-11-11 22:32:55 +09:00
8548cc1f0f Add simpe debug print, add 'r' for all regex calls 2022-08-13 15:50:24 +09:00
63202b53f1 add -p for only list unset GPS long/lat entries 2020-10-20 23:59:32 +09:00
2836a40616 Add another City location lookup for google API 2020-10-20 22:33:46 +09:00
19a8c2b997 Fix for [Bug with exempi 2.5.0 #1]
With exempi 2.5.0 when the get_property was called on an unset one, it
crashed with "unkown error".

Fix with checking if property exists before actually getting the
property
v1.1.1
2019-04-01 20:58:45 +09:00
217cd87feb Update output info if update is from cache
on write change the output message from only "UPDATED" to also show if
it was read from cache by "UPDATED FROM CACHE"
2018-06-11 23:50:32 +09:00
a0a023859a README update with new fuzzy option info
Also fix footer seperator width
v1.1.0
2018-05-18 15:43:48 +09:00
87f8ad4dae Fuzzy cache lookup flow added
Besides the exact GPS coordinate match and optional fuzzy match can be
used via the -d/--fuzzy-cache argument.

The default value is set to to 10m and can be set in the format number
and m/km. Eg 100m, 1km

During the run it calculates the distance from all previous cached
entries and if one falls inside the given fuzzy distance this lookup
data will be used and also stored in the direct GPS cache for further
direct GPS matches
2018-05-18 15:36:08 +09:00
2b1f9352ff Do double byte special format for all fields where possible
Not only for path, but also for filename, country, state, city and
location.

There is a possibility that double byte characters are inside, so this
needs to be special formatted too
v1.0
2018-05-08 10:10:58 +09:00
74f9cfa29b Write non Latin geolocation data if only non latin one is found
In case only non Latin geo location data is found, the first match will
be used to replace the not found Latin entry
2018-05-07 15:35:07 +09:00
3fd6282907 Fix non Latin based character return in google reverse geo lookup
In some occasions Google might return non Latin based character strings
for reverse lookups.
Fixed with:
* add language=en to force english as primary return
* check each return set and only use entries that have Latin based
characters
2018-05-07 12:37:36 +09:00
db4298b141 Merge branch 'master' of github.com:gullevek/reverse_geolocate 2018-05-06 23:17:29 +09:00
6655f4164f Pre info fix for non Ascii data read check 2018-05-06 23:17:13 +09:00
4e4f5631ab Create CONTRIBUTING.md 2018-03-27 18:08:20 +09:00
508da722af Fix string length calculate for double byte characters 2018-03-16 18:38:41 +09:00
e5bf0914c6 Code clean up
move some code into functions for better readability.
combine some code that can be in one set.
move LR read into post read only part.
2018-03-14 18:19:09 +09:00
4f4a0db7aa Fix double byte path format issues
When the path has double byte characters the length format does not work
and the path output will be too long for the space available.
We now use special double byte double count detection methods to adjust
the path length and output format
2018-03-14 14:55:35 +09:00
b3ac5051d0 Make script flake8 compabile
Fix almost all flake8 warnings for coding style
- long lines are currently ignored
- the Google lookup has been simplified
- the if and for loop are not yet simplified
2018-03-12 17:08:48 +09:00
c7491c0b31 Add route to allowed google return values, fix debug output 2018-03-12 00:18:24 +09:00
cecb944671 Method documentation update 2018-03-09 14:04:32 +09:00
e4e52927da New option to only list unset data
With the -u flag only XMP data that has unset or missing data will be
listed
2018-03-08 14:12:32 +09:00
134aff004a Better auto adjust width, bug fix for empty exclude list
If no exclude folders were given the list was not set so the initial
read failed.

Auto adjust to terminal size now works identical for smaller and larger
2018-03-08 10:06:57 +09:00
a396bcb838 Add one spacer to auto adjust size minimize 2018-03-07 18:58:18 +09:00
a4f694f5d6 Add auto adjust for columns based on terminal width
With flags -a to override any auto adjust and just keep default column
width. And flag -c for automatic compact view (40% column size
reduction)

The auto adjust on terminal size larger than needed is only for path
column at the moment.

For smaller it will auto adjust each column slowly in 10% steps until
the width is smaller than the terminal width.

Side note: CJK characters can still be reason for a skewed layout.
2018-03-07 18:32:21 +09:00
a3496279a9 Update README file with correct stats output 2018-03-07 10:58:41 +09:00
56c8b20447 Merge branch 'master' of https://github.com/gullevek/reverse_geolocate
FIX PULL
2018-03-07 10:53:12 +09:00
677b2a05fb Exclude folders from processing, add Page number to list view
The include folders argument changed from -x to -i
-x is used for excluding folder or files form processing

In the list view the page number and max pages is also printed out
(cosmetic)
2018-03-07 10:24:00 +09:00
c8c85d356b One } too much in backup file creation 2018-03-06 23:49:23 +09:00
869a2a647e Sort files on reading 2018-03-06 17:45:35 +09:00
4ef2e15aec Split File + Path for listing output
I do not surpress the path, but move it to the end of the listing output
2018-03-06 12:27:21 +09:00
c312290a8d Update backup file flow, strip out path for listing data
When we list data I strip out the path because if there are any CJK
files inside it will break the layout [TODO: fix this better]

The backup file creates a new backup file each time the file gets
written with ".BK.n." where n is a number starting from 1
2018-03-06 12:04:46 +09:00
0f66e19310 Bug fixes for overwrite, google data search
Data was not written if some data was found in LR and then a Maps
lookup was done. This was because the overwrite check was done on set
data not original data
Add debug URL output to google (requests)
Add more valid types to look for an address in the returned data for
Google Maps API
Removed spaces from some lines
Skip XMP files with .BK. inside, they are backup files
Look into double-byte characters and print layout issues -> open
2018-03-05 23:54:42 +09:00
500a3cb91c Simplify the header string write
Instead of writing each line separate, build the full header string in
one set
2018-03-05 16:55:31 +09:00
9e59f81b9d read only line format change
Instead of complex string building, use the standard format() call to
set lengths before we use it to replace it with actual data
2018-03-05 16:00:04 +09:00
41bae7eb5d Add list data only flag
With the -r flag data will only be read from the XMP files and printed
out and no other action (LR lookup, Maps lookup) is performed
2018-03-05 15:52:07 +09:00
a4bd574e48 Debug output better format with description 2018-03-01 14:51:32 +09:00
c99962ad0d Wording fix for LR read more than one row error 2018-03-01 11:50:31 +09:00
9ff2ec6c9c Argument debug output update 2018-03-01 10:52:59 +09:00
e28659fd88 Config file settings
Google API key and OpenStreetMap Email can be written to a config file
2018-03-01 10:10:47 +09:00
cf06ef35eb Change the python3 shebang to env to find python3 automatically 2018-02-27 14:34:40 +09:00
ef7e071a7d Update OpenStreetMap query with email, fix requests parameters
OpenStreetMap has optional parameter email to add an email address for
large requests amount.
Also check google and open street map options do not overlap.

All requests are now built with the parameters option when queries so
any parameter given is automatically correctly encoded.
2018-02-26 14:32:28 +09:00
05bc66e57d Add OpenStreetMaps to reverse geo lookup
Location data can be checked from OpenStreetMaps too
2018-02-26 13:51:45 +09:00
8bc346f28c Debug output for google maps search long/lat data 2018-02-26 10:09:18 +09:00
9088995ff9 Update documentation about install 2018-02-26 09:14:59 +09:00
cf38bd34fb Remove old debug messages and update google geo data flow comment 2018-02-23 18:57:26 +09:00
58d9f4ebde Add strict Lightroom check, various bug fixes for overwrite and check
If -s (--strict) argument is given it will check the path too and not
only the file basename.

The following bug fixes have been done:
- if verbose was not given it was unset and so google lookup debug
output crashed. Is set to 0 on unset
- if data is found multiple times in the Lightroom DB we print out a
different warning and not put it into the not found group
- after a google lookup write the data back into the base set for debug
output purposes
- if Lightroom data is used for overwrite data was never written because
the unset check was done on the already set data and not the original
unset data
2018-02-23 16:27:10 +09:00
3e68351e8f Align stats numbers to the right 2018-02-23 14:30:19 +09:00
4b282c3d13 README file update, Script update to first release 2018-02-23 11:15:50 +09:00