Skip to content

Commit

Permalink
Delay feature
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincrom committed May 25, 2024
1 parent f2338a6 commit 7ef4073
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
11 changes: 5 additions & 6 deletions wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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()

0 comments on commit 7ef4073

Please sign in to comment.