From d17b87c3105f9da8aa6e2f10acd8c3108f815a84 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Fri, 5 May 2023 14:21:55 +0900 Subject: [PATCH] Clean up import code part Fix reverse_geolocate module import loaders Remove not used modules from main python script Add the __pycache__ folder to ignore list --- .gitignore | 1 + bin/reverse_geolocate.py | 4 +--- bin/utils/reverse_geolocate.py | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 21d0b89..cc94e52 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .venv/ +bin/utils/__pycache__/* diff --git a/bin/reverse_geolocate.py b/bin/reverse_geolocate.py index d793238..c8f27e4 100755 --- a/bin/reverse_geolocate.py +++ b/bin/reverse_geolocate.py @@ -14,7 +14,6 @@ MUST HAVE: Python XMP Toolkit (http://python-xmp-toolkit.readthedocs.io/) """ import configparser -import unicodedata # import textwrap import glob import os @@ -23,8 +22,7 @@ import re import argparse import sqlite3 from shutil import copyfile, get_terminal_size -from math import ceil, radians, sin, cos, atan2, sqrt -import requests +from math import ceil # Note XMPFiles does not work with sidecar files, need to read via XMPMeta from libxmp import XMPMeta, consts # user modules below diff --git a/bin/utils/reverse_geolocate.py b/bin/utils/reverse_geolocate.py index 06af211..dd7c8f8 100644 --- a/bin/utils/reverse_geolocate.py +++ b/bin/utils/reverse_geolocate.py @@ -4,8 +4,8 @@ reverse geolacte functions import requests import re -from long_lat import long_lat_reg -from string_helpers import only_latin_chars +from utils.long_lat import long_lat_reg +from utils.string_helpers import only_latin_chars def reverse_geolocate(longitude, latitude, map_type, args): """