Fix output directory

hightide
Dan Howe 5 years ago
parent aa58f3932b
commit a417c3f7d5

@ -26,7 +26,7 @@ URL = 'https://camera.uwatchit.com.au/UWatchitWebV2/User/LiveView#'
OUTPUT_DIR = 'images' OUTPUT_DIR = 'images'
TIMEZONE = 'Australia/Sydney' TIMEZONE = 'Australia/Sydney'
WAIT_TIME = 0.1 WAIT_TIME = 0.1
RECORDING_DURATION = 20 RECORDING_DURATION = 120
SILENT = True SILENT = True
IMAGE_MASK = 'mask/overtopping-mask.png' IMAGE_MASK = 'mask/overtopping-mask.png'
username = '' username = ''
@ -41,7 +41,7 @@ height = next_high_tide.rsplit('_', 1)[-1]
now = datetime.now() now = datetime.now()
year = now.strftime('%Y') year = now.strftime('%Y')
timestamp = now.strftime('%Y-%m-%d_%H-%M') timestamp = now.strftime('%Y-%m-%d_%H-%M')
current_hightide_dir = os.path.join(OUTPUT_DIR, year, f'{timestamp}_{height}') current_hightide_dir = os.path.join(pwd, OUTPUT_DIR, year, f'{timestamp}_{height}')
def start_session(): def start_session():
@ -53,7 +53,7 @@ def start_session():
# Start webdriver # Start webdriver
options = Options() options = Options()
options.headless = True options.headless = True
executable_path = os.path.join(pwd, 'geockdriver') executable_path = os.path.join(pwd, 'geckodriver')
driver = webdriver.Firefox(executable_path=executable_path, options=options) driver = webdriver.Firefox(executable_path=executable_path, options=options)
return driver return driver
@ -257,6 +257,7 @@ def get_brightness(jpg_name, mask):
# Create counter # Create counter
t = [] t = []
# Open browser # Open browser
get_images() get_images()

Loading…
Cancel
Save