From 7f927470b3f2c0c8e3ad37d411fd9cdc1c036f49 Mon Sep 17 00:00:00 2001 From: AD Date: Wed, 19 Dec 2018 13:59:08 +0100 Subject: [PATCH] Several implementation & installation updates - Removed tkinter from setup.py, since it is installed by default - updated cx_setup - corrected cx_setup readme --- 00_generateClusters_OnlyEmoji.cmd | 2 +- 00_generateClusters_OnlyPhotoLocations.cmd | 2 +- 00_generateClusters_OnlyTags.cmd | 2 +- README.md | 2 +- cx_setup.py | 2 +- setup.py | 1 - tagmaps/__main__.py | 8 ++++++-- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/00_generateClusters_OnlyEmoji.cmd b/00_generateClusters_OnlyEmoji.cmd index f6b3282..7ff3058 100644 --- a/00_generateClusters_OnlyEmoji.cmd +++ b/00_generateClusters_OnlyEmoji.cmd @@ -13,5 +13,5 @@ #-f shapefilePath #-stat statisticsOnly #-lmuc limitBottomUserCount, default = 5 -%~dp0__main__.exe -p "False" -o "True" -t "False" +%~dp0tagmaps.exe -p "False" -o "True" -t "False" exit \ No newline at end of file diff --git a/00_generateClusters_OnlyPhotoLocations.cmd b/00_generateClusters_OnlyPhotoLocations.cmd index 9cdfaf3..aa82bc2 100644 --- a/00_generateClusters_OnlyPhotoLocations.cmd +++ b/00_generateClusters_OnlyPhotoLocations.cmd @@ -13,5 +13,5 @@ #-f shapefilePath #-stat statisticsOnly #-lmuc limitBottomUserCount, default = 5 -%~dp0__main__.exe -p "True" -o "False" -t "False" +%~dp0tagmaps.exe -p "True" -o "False" -t "False" exit \ No newline at end of file diff --git a/00_generateClusters_OnlyTags.cmd b/00_generateClusters_OnlyTags.cmd index 0c5b55e..0b013cb 100644 --- a/00_generateClusters_OnlyTags.cmd +++ b/00_generateClusters_OnlyTags.cmd @@ -13,5 +13,5 @@ #-f shapefilePath #-stat statisticsOnly #-lmuc limitBottomUserCount, default = 5 -%~dp0__main__.exe -p "False" -o "False" -t "True" +%~dp0tagmaps.exe -p "False" -o "False" -t "True" exit \ No newline at end of file diff --git a/README.md b/README.md index b42f1c5..5cfac1b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Afterwards, Alpha Shapes are generated as a means to 'soft' placement of tags on ## Installation 1. The easiest way for Windows users is to download the Pre-compiled build that is available [here](https://cloudstore.zih.tu-dresden.de/index.php/s/8EFfeJcpNCStQ9X/download) (315MB!) and run `generateTagClusters.exe` - - you can also compile the program yourself using the `setup.py` with [cx_Freeze](https://anthony-tuininga.github.io/cx_Freeze/): run `python setup.py build` + - you can also compile the program yourself using the `setup.py` with [cx_Freeze](https://anthony-tuininga.github.io/cx_Freeze/): run `python cx_setup.py build` - or simple run `generateTagClusters.py` if you have Python and all dependencies installed 2. Place geotagged photo data in `/01_Input` subfolder - example files/format are available in the Pre-compiled build zip-file above diff --git a/cx_setup.py b/cx_setup.py index 6d53d7e..1db746a 100644 --- a/cx_setup.py +++ b/cx_setup.py @@ -47,7 +47,7 @@ # base = "Win32GUI" executables = [ - Executable('tagmaps/__main__.py', base=base) + Executable('tagmaps/__main__.py', base=base, targetName="tagmaps.exe") ] setup( name = "tagmaps", diff --git a/setup.py b/setup.py index 60417e0..b05ea61 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,6 @@ install_requires=[ 'shapely', 'emoji', - 'tkinter', 'hdbscan' ], entry_points={ diff --git a/tagmaps/__main__.py b/tagmaps/__main__.py index 7ad4682..6bcdb51 100644 --- a/tagmaps/__main__.py +++ b/tagmaps/__main__.py @@ -113,8 +113,8 @@ cleanedPhotoList = [] def main(): - from .classes.utils import Utils - from .config.config import BaseConfig + from tagmaps.classes.utils import Utils + from tagmaps.config.config import BaseConfig ###################### ####config section#### ###################### @@ -1621,6 +1621,7 @@ def delete(listbox): # break #plt.savefig('foo.png') #sys.exit() + sys.stdout.flush() log.info("########## STEP 4 of 6: Generating Alpha Shapes ##########") #if (tnum % 50 == 0):#modulo: if division has no remainder, force update cmd output #sys.stdout.flush() @@ -1887,6 +1888,9 @@ def delete(listbox): def set_logger(): """ Set logging handler manually, so we can also print to console while logging to file """ + + if not os.path.exists("02_Output/"): + os.makedirs("02_Output/") __log_file = "02_Output/log.txt" # Set Output to Replace in case of encoding issues (console/windows)