Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import datetime
- from pathlib import Path
- parentfolder = os.path.join(r'C:\Users',os.getlogin(),'Documents','Journal')
- date = str(datetime.datetime.now())
- def foldercheck():
- try:
- os.mkdir(parentfolder)
- except OSError as error:
- breakpoint
- def menu():
- print('Hello\nHow are you?')
- print('1. People I admire\n2. Goals\n3. Habits\n4. Thought Redirection\n5. Journal')
- usrchoice = str(input('What would you like to do?\n'))
- while True:
- if usrchoice == '1':
- admire()
- if usrchoice == '2':
- goals()
- if usrchoice == '3':
- habits()
- if usrchoice == '4':
- thoughtredirection()
- if usrchoice == '5':
- journal()
- else:
- usrchoice = str(input('1, 2, 3, 4, 5\n'))
- def admiretextcheck():
- admiretext = parentfolder + '\People I Admire.txt'
- path = Path(admiretext)
- if path.is_file():
- breakpoint
- else:
- file = open(admiretext, 'w')
- def journaltextcheck():
- journaltext = parentfolder + '\Journal.txt'
- path = Path(journaltext)
- if path.is_file():
- breakpoint
- else:
- file = open(journaltext, 'w')
- def goalstextcheck():
- goalstext = parentfolder + '\Goals.txt'
- path = Path(goalstext)
- if path.is_file():
- breakpoint
- else:
- file = open(goalstext, 'w')
- def habitstextcheck():
- habitstext = parentfolder + '\Habits.txt'
- path = Path(habitstext)
- if path.is_file():
- breakpoint
- else:
- file = open(habitstext, 'w')
- def thoughtredirecttextcheck():
- thoughtredirecttext = parentfolder + '\Thought Redirection.txt'
- path = Path(thoughtredirecttext)
- if path.is_file():
- breakpoint
- else:
- file = open(thoughtredirecttext, 'w')
- def dailyroutinetextcheck():
- dailyroutinetext = parentfolder + '\Daily Routine.txt'
- path = Path(dailyroutinetext)
- if path.is_file():
- breakpoint
- else:
- file = open(dailyroutinetext, 'w')
- def admire():
- admiretextcheck()
- admiretext = parentfolder + '\People I Admire.txt'
- clearConsole()
- print('Hello! \nthis can be a list of anyone that has a trait(s) you admire')
- print('You do not hav to admire everything about these people, and please be')
- print('as specific as possible when describing what you admire about these people')
- print('*Avoid should and would statements')
- print('*Avoid Abbreviation' + '\n')
- entryname = str(input('Name of this person: \n'))
- entrytext = str(input('What do you admire about this person? \nRemember be specific as possible. \n'))
- file = open(admiretext, 'a')
- file.write(date + '\n')
- file.write(entryname + '\n')
- file.write(entrytext + '\n')
- file.close()
- y = str(input('Would you like to add another person?[y|n]' + '\n'))
- while True:
- if y == 'y':
- admire()
- if y == 'n':
- print('Thanks! \nGoodbye :)')
- Main()
- else:
- print('y or n\n')
- y = str(input('Would you like to add another person?[y|n]' + '\n'))
- def journal():
- journaltextcheck()
- journaltext = parentfolder + '\Journal.txt'
- clearConsole()
- print('Hello! \nHow are you?')
- entry = str(input('Tell me everything! :) \n'))
- file = open(journaltext, 'a')
- file.write(date + '\n')
- file.write(entry + '\n')
- file.close()
- y = str(input('Would you like to write more?[y|n] \n'))
- while True:
- if y == 'y':
- journal()
- if y == 'n':
- print('Thanks! \nGoodbye :)')
- Main()
- else:
- print('y or n\n')
- y = str(input('Would you like to write more?[y|n]\n'))
- def goals():
- goalstextcheck()
- goalstext = parentfolder + '\Goals.txt'
- clearConsole()
- print('We have "end" goals and sub goals, goals that serve our end goals.')
- print('We need to take into consideration of our drive, desires, and values in order to set\nhealthy attainable goals')
- print('It is good to have many sub goals in case one of our goals fails or becomes unattainable')
- print('then we will have another goal to fall back on and still be working toward the same end goal\n')
- entrytext = str(input('What is your goal?' + '\n'))
- file = open(goalstext, 'a')
- file.write(date + '\n')
- file.write(entrytext + '\n')
- file.close()
- y = str(input('Would you like to add another goal?[y|n]\n'))
- while True:
- if y == 'y':
- goals()
- if y == 'n':
- print('Thanks! \nGoodbye :)')
- Main()
- else:
- print('y or n\n')
- y = str(input('Would you like to add another goal?[y|n]\n'))
- def habits():
- habitstextcheck()
- habitstext = parentfolder + '\Habits.txt'
- clearConsole()
- print('Habits, both good and bad we all have them. The best way to know what habits are good or')
- print('bad is to write them down. Be specific when describing your habits.')
- print('*Avoid should and would statements')
- print('*Avoid Abbreviation')
- entrytype = str(input('Is this a good or bad habit? Just tell me if it is good or bad right now you can describe it next. \n'))
- while True:
- if entrytype == 'good':
- break
- if entrytype == 'Good':
- break
- if entrytype == 'bad':
- break
- if entrytype == 'Bad':
- break
- else:
- print('Sorry, Just let me know if its a good or bad habit. You will be describing it next\n')
- entrytype = str(input('is this a good or bad habit? Just tell me if it is good or bad right now you can describe it next \n'))
- entrydescr = str(input('Describe your habit \n'))
- entrybenefit = str(input('Does this habit benifit you? [y|n]\n'))
- while True:
- if entrybenefit == 'y':
- break
- if entrybenefit == 'n':
- break
- if entrybenefit == 'Y':
- break
- if entrybenefit == 'N':
- break
- else:
- print('Sorry, Just tell me [y|n].\n')
- entrybenefit = str(input('Does this habit benifit you? [y|n]\n'))
- file = open(habitstext, 'a')
- file.write(date + '\n')
- file.write(entrytype + '\n')
- file.write(entrydescr + '\n')
- file.write(entrybenefit + '\n')
- file.close()
- y = str(input('Would you like to add another habit?[y|n]'))
- while True:
- if y == 'y':
- habits()
- if y == 'n':
- print('Thanks! \nGoodbye :)')
- Main()
- else:
- print('y or n\n')
- y = str(input('Would you like to add another habit?[y|n]'))
- def thoughtredirection():
- thoughtredirecttextcheck()
- thoughtrtext = parentfolder + '\Thought Redirection.txt'
- clearConsole()
- print('Thought Redirection is a great tool to use in hindsight.')
- print('It helps you evaluate your negative thoughts and behaviors by looking at what happened')
- print('Event/Thought ---> Behavior/Action ---> Redirection/Reason/What you should have done in')
- print('place of your action')
- print('This list should be updated often so you can evaluate yourself and make better decisions in the future')
- entryevent = str(input('Describe the event/thought that caused the behavior/action \nBe specific \n*Avoid should and would statements \n*Avoid Abbreviation\n'))
- entryaction = str(input('Describe the behavior/action\n'))
- entryredirection = str(input('Describe what thought process could have been done in place of the negative behavior\n'))
- file = open(thoughtrtext, 'a')
- file.write(date + '\n')
- file.write(entryevent + '\n' + entryaction + '\n' + entryredirection)
- file.close()
- y = str(input('Do you have another thought you would like to evaluate?[y|n]\n'))
- while True:
- if y == 'y':
- thoughtredirection()
- if y == 'n':
- print('Thanks! \nGoodbye :)')
- Main()
- else:
- print('y or n\n')
- y = str(input('Do you have another thought you would like to evaluate?[y|n]'))
- def clearConsole():
- command = 'clear'
- if os.name in ('nt', 'dos'):
- command = 'cls'
- os.system(command)
- def Main():
- clearConsole()
- foldercheck()
- menu()
- Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement