summaryrefslogtreecommitdiff
path: root/main.py
blob: 35080828e03a2e531abad89c7e234af1913d1f6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# 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)