From 91c4938968ecb9b838a9d8dc7689df0e612a7afd Mon Sep 17 00:00:00 2001 From: frarol96 Date: Mon, 9 Oct 2023 23:17:43 +0000 Subject: [PATCH] Add v2cmodules/common.py --- v2cmodules/common.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 v2cmodules/common.py diff --git a/v2cmodules/common.py b/v2cmodules/common.py new file mode 100644 index 0000000..825284e --- /dev/null +++ b/v2cmodules/common.py @@ -0,0 +1,26 @@ +import configparser + +CONFIG_FILE = "config.ini" +INVALID_INI = False +STARTING = True +V2CV = [1, 2, 0] +V2CVERSION = f"{V2CV[0]}.{V2CV[1]}.{V2CV[2]}" +RSS_FEED_URL = "https://git.rolfsvaag.no/frarol96/Video2Crops/releases.rss" +WIKI_URL = "https://git.rolfsvaag.no/frarol96/Video2Crops/wiki" + +processing = False + +# Setup config file +config = configparser.ConfigParser() +config.read(CONFIG_FILE) + +processing_button_state = "start" +# Load ini settings +frame_step = int(config.get('settings', 'frame_step')) +contrast_threshold = float(config.get('settings', 'contrast_threshold')) +duplicate_threshold = float(config.get('settings', 'duplicate_threshold')) +SAVE = config.get('settings', 'save_output') +SHOW = config.get('settings', 'show_playback') +roi_size = int(config.get('settings', 'roi_size')) +tksize = config.get('settings', 'window_size') +DEBUG = config.get('debug', 'debug_output') \ No newline at end of file