-
-
Save nitinthewiz/4478125 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import webbrowser | |
import urllib | |
dayone_url = "dayone://post?entry=" | |
feeling_question = "How do you feel today?" | |
achievement_question = "What are you trying to achieve today?" | |
thought_question = "Is there a negative thought or positive on your mind you want to get out?" | |
tag = "#diary" | |
# input | |
feeling = raw_input(feeling_question + "\n") | |
achievement = raw_input(achievement_question + "\n") | |
thought = raw_input(thought_question + "\n") | |
# concatenate | |
feeling_heading = "## " + feeling_question + " ##\n\n" | |
feeling = feeling + "\n\n" | |
achievement_heading = "## " + achievement_question + " ##\n\n" | |
achievement = achievement + "\n\n" | |
thought_heading = "## " + thought_question + " ##\n\n" | |
thought = thought + "\n\n" | |
diary_entry = feeling_heading + feeling + achievement_heading + achievement + thought_heading + thought + tag | |
# print out the result | |
print(diary_entry) | |
# url encode | |
diary_entry = urllib.quote(diary_entry) | |
# open in day one | |
webbrowser.open(dayone_url + diary_entry) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment