Skip to content

Commit

Permalink
Checks for EXAMPLE_ZoomData.csv and renames after Y/N prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
MNThomson committed Feb 10, 2021
1 parent 6091df8 commit 232f595
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions ZoomBuddy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import webbrowser, requests, json, csv, sys

from os import system, name
from os import system, name, path, rename
from datetime import datetime
from time import sleep

Expand Down Expand Up @@ -73,12 +73,20 @@ def open_data():
next(csvfile)
return file, csvfile
except FileNotFoundError:
print("ZoomData.csv Does Not Exist!!!")
print("Please read the setup instructions for ZoomData.csv")
Choice = input('Would you like to be redirected to the instructions page? (Y/N)')
if Choice.lower() == 'yes' or Choice.lower() == 'y':
print('Redircting...')
webbrowser.open(URL)
if path.isfile('EXAMPLE_ZoomData.csv'):
print("Found file named: EXAMPLE_ZoomData.csv")
Choice = input('Would you like to rename it to ZoomData.csv? (Y/N)')
if Choice.lower() == 'yes' or Choice.lower() == 'y':
print('Renaming...')
rename("EXAMPLE_ZoomData.csv", "ZoomData.csv")
print("Finished renaming. Please rerun ZoomBuddy!")
else:
print("ZoomData.csv Does Not Exist!")
print("Please read the setup instructions for ZoomData.csv")
Choice = input('Would you like to be redirected to the instructions page? (Y/N)')
if Choice.lower() == 'yes' or Choice.lower() == 'y':
print('Redircting...')
webbrowser.open(URL)
sleep(1)
sys.exit(0)

Expand Down

0 comments on commit 232f595

Please sign in to comment.