generated from Code-Institute-Org/p3-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.py
34 lines (26 loc) · 963 Bytes
/
run.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
from gspread.exceptions import SpreadsheetNotFound
from Module.template import template
from Module.options import options
def main():
"""
This is the main function that runs the entire program
:return:
"""
# Program descriptions
print("This is a simple program to keep track of my day-to-day financials")
print("This program is a simple terminal emulator in order to automate the process")
print(
"When a new year begins it creates a new Spreadsheet from a template spreadsheet"
)
print("It uses the current year of your computer as its title")
# check to see if the spreadsheet with current_year is created
try:
template.open_spreadsheet()
options.start()
except SpreadsheetNotFound:
# creates the spreadsheet using a template
# renaming file with current_year
template.create_spreadsheet()
options.start()
if __name__ == "__main__":
main()