-
Notifications
You must be signed in to change notification settings - Fork 0
/
tracker.py
executable file
·69 lines (46 loc) · 1.96 KB
/
tracker.py
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
#
# Personal Finance Tracker project working with both Google Spreadsheet API and Mint API to keep an accurate list of accounts, expenses, and investments.
# Plan to be run daily on Google Cloud services to familiarize myself with running code on a cloud environment.
#
# @Author: Will Drenta
# @Version 0.2 8/31/2022
# Changelog:
# - Full uploading of accounts, organization of expenses as well as creating pie charts for data viewing.
# To run on Linux: /miniconda3/envs/mint-tracker/bin/python tracker.py default.conf
#Gameplan:
# Every time you start the program it refreshes the list of transactions (Maybe just append to list when list hits 100, pop off 50 or so), giving each transtion an id, and
# depending on transation label from Mint, sort in google sheets
#
#
# - Split up all monthly charges and depict monthly graphs on other pages of sheets?
#
# - Method to list back money across accounts
#
# TODO LIST:
# - Uploading of plots to imgur to put into google sheet
# - Map out investment sheet
# - May want to move all of the dict creation to mint backend so that the functionality is more seperated
import argparse
import configparser
#Local imports
from mintbackend import MintBackend
# from gsheet import GSheet
# from plot import Plot
def main():
args = setupArgparser().parse_args()
config = configparser.ConfigParser()
config.read(args.config)
# #mint = ""
mint = MintBackend(config)
# GSheet(MintBackend(config), config)
#Test upload
# testDict = {"Total" : 1234.23333, "Groceries" : 555.05, "Electronics": 1.0000000000000000000000000000000000000006}
# asd = Plot(testDict, config['Imgur'], "2022")
# asd.createExpenseChart("Yearly Expenses")
# print(asd.uploadToImgur())
def setupArgparser():
parser = argparse.ArgumentParser()
parser.add_argument("config", help="Config file containing necessary info for Mint and Google Sheets.")
return parser
if __name__ == "__main__":
main()