# SlipStream Import/ Export Log # Written 03/16/2020 # Modified 03/16/2020 import time, datetime import os, sys, ctypes ctypes.windll.kernel32.SetConsoleTitleW("Sin's SS Logger") #f = open("ss_log.txt", "w+") cDate = (time.strftime("%Y/%m/%d")) cTime = (time.strftime("%H:%M")) def fClear(): return os.system('cls') # Title fClear() print(" _____ _ _ _____ _____ _ ") print("/ ___(_) ( ) / ___/ ___| | | ") print("\ `--. _ _ __ |/ ___ \ `--.\ `--. | | ___ __ _ __ _ ___ _ __ ") print(" `--. \ | '_ \ / __| `--. \`--. \ | | / _ \ / _` |/ _` |/ _ \ '__|") print("/\__/ / | | | | \__ \ /\__/ /\__/ / | |___| (_) | (_| | (_| | __/ | ") print("\____/|_|_| |_| |___/ \____/\____/ \_____/\___/ \__, |\__, |\___|_| ") print(" __/ | __/ | ") print(" Version 1.1 |___/ |___/ ") #print(" _____ _ _____ _____ _ ") #print("/ __ \ ( ) / ___/ ___| | | ") #print("| / \/_ _____|/ ___ \ `--.\ `--. | | ___ __ _ __ _ ___ _ __ ") #print("| | \ \/ / _ \ / __| `--. \`--. \ | | / _ \ / _` |/ _` |/ _ \ '__|") #print("| \__/\> < __/ \__ \ /\__/ /\__/ / | |___| (_) | (_| | (_| | __/ | ") #print(" \____/_/\_\___| |___/ \____/\____/ \_____/\___/ \__, |\__, |\___|_| ") #print(" __/ | __/ | ") #print(" Version 1.1 |___/ |___/ ") # Buy/ Sell/ Trade print() cOpenFile = input("Buy, Sell or Trade? ") while True: if cOpenFile in ("Buy", "buy", "Bought", "bought"): f = open("ss_log_buy.txt", "a+") cOpenFile = "Bought" break elif cOpenFile in ("Sell", "sell", "Sold", "sell"): f = open("ss_log_sell.txt", "a+") cOpenFile = "Sold" break elif cOpenFile in ("Trade", "trade", "Traded", "traded"): f = open("ss_log_trade.txt", "a+") cOpenFile = "Traded" break else: "Invalid Response" # Not even working lol # Car model cModel = input("Car Model? ") # Trade for/ price if cOpenFile == "Traded": cPriceInit = input(cOpenFile + " what for? ") cPrice = "a " + cPriceInit cPriceCar = cPriceInit elif cOpenFile == "Sold": cPriceCar = input("How much did you sell it for? ") else: cPriceCar = input("How much did you buy it for? " ) # Seller? if cOpenFile == "Traded": cSeller = input("Who did you trade it from? ") elif cOpenFile == "Bought": cSeller = input("Who did you buy it from? ") else: cSeller = input("Who did you sell it to? ") # Attributes/ comments cAttributes = input("Would you like to leave a comment? Y/N ") if cAttributes in ("No", "no", "N", "n"): cAttributes = "NULL" elif cAttributes in ("Yes", "yes", "Y", "y"): cAttributes = input("What comment? ") # Check if correct information if cAttributes == "NULL": i = ("You " + cOpenFile + " a " + cModel + " for " + cPriceCar + " from " + cSeller + ", is this correct? Y/N ") cDetails = cDate, cTime, cOpenFile, cModel, cPriceCar, cAttributes, cSeller else: i = ("You " + cOpenFile + " a " + cModel + " for " + cPrice + " from " + cSeller + " with a comment saying; " + cAttributes + ", is this correct? Y/N ") cDetails = cDate, cTime, cOpenFile, cModel, cPriceCar, cAttributes, cSeller cCheck = input(i) # Log if cCheck in ("Yes", "yes", "Y", "y"): for i in range(1): f.write(str(cDetails) + "\n") elif cCheck in ("No", "no", "N", "n"): fClear() os.execl(sys.executable, sys.executable, *sys.argv)