from datetime import datetime as dt import re def get_login() -> str: """ Logs get's login info """ print("NOTE: This program requires the user to have read access to: LPP-SQL01.Onbase") un = input("What is your LEAF login name? ") pw = input("What is your LEAF password? ") loginStr = f"{un.lower()}:{pw}" return loginStr def get_timeframe(startDate: str = "09/27/2022", endDate: str = dt.now().strftime("%m/%d/%y")): print(f"""\nCurrent report timeframe: Start Date: {startDate}\nEnd Date: {endDate}""") edit = input("Would you like to edit this? (y/n): ").lower() while (edit != 'y' and edit != 'n'): print(edit) edit = input("Please enter y or n: ") if edit == 'y': startDate = input("Start Date (mm/dd/yyyy): ") while re.search("\d{2}/\d{2}/\d{4}", startDate) == None: startDate = input("Please enter a start date with the following format: mm/dd/yyyy\n") endDate = input("End Date (mm/dd/yyyy): ") while re.search("\d{2}/\d{2}/\d{4}", endDate) == None: endDate = input("Please enter a end date with the following format: mm/dd/yyyy\n") get_timeframe(startDate, endDate) return startDate, endDate