Skip to content
Snippets Groups Projects
Commit 161e0c53 authored by Maximilian Loch's avatar Maximilian Loch
Browse files

fixed print messages

parent db74bb58
Branches
Tags 1.8.0-info
No related merge requests found
......@@ -4,3 +4,4 @@ port=port
dbname=database name
user=username
pwd=password
url=API url
\ No newline at end of file
......@@ -16,7 +16,7 @@ if __name__ == '__main__':
user={conn_config['connection']['user']}
password={conn_config['connection']['pwd']}"""
url = r"https://chat.gdi-sh.de/aregapi/"
url = conn_config['connection']['url']
# logfile = r"geocoder.log"
my_db = DBTools(conn_str)
......@@ -50,12 +50,12 @@ if __name__ == '__main__':
if areg_response_key[0] == "ERROR":
errorfeatures += 1
print(
areg_response_key[0] + ": " +
areg_response[areg_response_key[0]] +
f""" | betroffene schule: [{item[0]}]\t{adresse['hnr']};
{adresse['stn']}; {adresse['plz']}; {adresse['ort']}"""
)
progress_msg = f"""\
{areg_response_key[0]} : {areg_response[areg_response_key[0]]} | betroffene \
schule: [{item[0]}]\t{adresse['hnr']}; {adresse['stn']};{adresse['plz']}; \
{adresse['ort']}"""
print(progress_msg)
my_db.closecursor()
......@@ -65,7 +65,9 @@ if __name__ == '__main__':
# out.write(item)
percentage = round((numfeatures * 100) / maxfeatures, 2)
print(f"""\nstatistics:\n {numfeatures} from {maxfeatures} geocoded >>
{percentage}%\n {missinfeatures} features with missing attributes\n
{errorfeatures} features with errors\n""")
statistics = f"""
statistics:\n {numfeatures} from {maxfeatures} geocoded >> \
{percentage}%\n {missinfeatures} features with missing attributes\n \
{errorfeatures} features with errors\n"""
print(statistics)
print("geocoding dataset finished, closing programm")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment