Commit 87823e0d authored by Jadyn Jäger's avatar Jadyn Jäger 🦄

added the overview option

parent 6cce8661
......@@ -19,6 +19,7 @@ def help():
print('--accounts \t\t returns a list of your accounts (IBAN)')
print('--balance \t\t returns the current balance (-a reqired)')
print('--transactions [days] \t returns a list of the last n transactions (max. 90 days)(-a reqired)')
print('--overview \t shows the current balance and the last transactions(-a reqired)')
print('--setup \t\t runs the setup process (interactive)')
print('--help \t\t\t shows this')
......@@ -104,11 +105,13 @@ def print_loud(str):
def main(argv):
try:
opts, args = getopt.getopt(argv,"h?a:p:",["balance","transactions=","setup","help","accounts","account=", "silent", "password="])
opts, args = getopt.getopt(argv,"h?a:p:",["balance","transactions=","setup","help","accounts","account=", "silent", "password=", "overview"])
except getopt.GetoptError:
help()
sys.exit(2)
account = ""
if len(opts) == 0:
help()
for opt, arg in opts:
if opt in ("-?","-h","--help"):
help()
......@@ -129,6 +132,9 @@ def main(argv):
silent = True
elif opt in ("--password" , "-p"):
connectFinTS(arg)
elif opt == "--overview":
showBalance(account)
showTransactions(account, 30)
exit()
if __name__ == "__main__":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment