From 7ef4073f08acc5e6d373574ee141377b0c500340 Mon Sep 17 00:00:00 2001 From: "benjamincrom@gmail.com" Date: Sat, 25 May 2024 14:57:40 -0400 Subject: [PATCH] Delay feature --- setup.py | 2 +- wrapper.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index b461399..352378a 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='baseball', - version='16.65', + version='16.66', description='Library to download, anaylyze, and visualize events in Major League Baseball games.', url='https://github.com/benjamincrom/baseball', author='Benjamin B. Crom', diff --git a/wrapper.py b/wrapper.py index b192383..af33bbb 100755 --- a/wrapper.py +++ b/wrapper.py @@ -6,8 +6,8 @@ @tracer.wrap(service="get_todays_games", resource="wrapper") def get_todays_games(): - shutil.rmtree(f'/mnt/delay_volume/3600') - os.mkdir(f'/mnt/delay_volume/3600') + shutil.rmtree('/mnt/delay_volume/3600') + os.mkdir('/mnt/delay_volume/3600') for i in range(3595, -5, -5): files = os.listdir(f'/mnt/delay_volume/{str(i)}') for this_file in files: @@ -25,10 +25,10 @@ def get_todays_games(): baseball.generate_today_game_svgs("/mnt/delay_volume/0", True, True, True) - files = os.listdir(f'/mnt/delay_volume/0') + files = os.listdir('/mnt/delay_volume/0') for this_file in files: source_path = f'/mnt/delay_volume/0/{this_file}' - dest_path = f'/var/www/html/' + dest_path = '/var/www/html/' with open(source_path, 'r') as filehandle: try: with open(f'{dest_path}{this_file}', 'r') as filehandle_2: @@ -38,8 +38,7 @@ def get_todays_games(): shutil.copy("/mnt/delay_volume/0/" + this_file, "/var/www/html") except: shutil.copy("/mnt/delay_volume/0/" + this_file, "/var/www/html") - + if __name__ == '__main__': get_todays_games() -