Day 24 of 100 Days coding Challenge: Python
Growing up, I was that kid who scribbled thoughts into any notebook I could findโeven the back of my math homework. Writing was my thing. But journaling? That felt too… reflective. It took a few years (and a few existential crises) before I warmed up to the idea.
Now, I journal every dayโusually with pen and paper, in my own cryptic shorthand. No oneโs supposed to read it (and frankly, no one could). But writing helps me think about how I think.
What motivates me, what annoys me, what I pretend not to care about but actually do. Today, I decided to take that analog habit and try building a digital versionโmy own daily Python journal app. Less ink smudging, more save buttons.
Todayโs Motivation / Challenge
Thereโs something meditative about journalingโuntil you forget where you left your notebook… again. I wanted to create a simple desktop app that captures those thoughts without needing a physical page. The goal? Combine my love for writing with my desire to build something functional, cozy, and just retro enough to feel like a Windows 95 flashback.
Purpose of the Code (Object)
This little project creates a journal app with a user-friendly window where you can type your thoughts and click “Save” to store them. Each entry is saved in a file named by date, organized neatly in a folder. It even includes a menu barโjust like those old-school appsโwith options to save or exit the program.
AI Prompt:
“Create a GUI journal app in Python using tkinter. Include a menu with Save and Exit options. Journal entries should be saved to a dated text file in a folder.”
Functions & Features
- Opens a clean text window for writing your journal entry
- Saves entries to a daily .txt file with a timestamp
- Automatically organizes files in a journals/ folder
- Includes a classic File menu with โSave Entryโ and โExitโ options
Requirements / Setup
- Python 3.x
- No external libraries neededโjust good olโ tkinter (which comes with Python)
Minimal Code Sample
def save_entry():
text = text_area.get(“1.0”, tk.END).strip()
if text:
with open(get_journal_filename(), “a”, encoding=”utf-8″) as file:
file.write(f”\n[{datetime.now().strftime(‘%H:%M’)}]\n{text}\n”)
This function grabs the typed text and saves it with a timestamp to a dated file.
Notes / Lessons Learned
I started with a no-frills version that ran in the terminal. It was basicโyou hit “Enter” twice to save, which felt like submitting your soul to the void with no takebacks. Naturally, I couldnโt resist making a GUI. But my first try was a mystery: the โSave Entryโ button vanished like my motivation on a Monday. Turns out, Iโd set the window height too short (root.geometry(“500×400”)), hiding the button like a shy turtle. Bumping it up to 500×600 fixed it.
Then I got boldโscrapped the button and added a File menu like a proper ’90s app. “File > Save Entry” and “File > Exit” made it feel almost professional. While I still prefer scribbling on paper, this app could easily be adapted as a task logger or even a minimalist idea tracker. Plus, it was fun building something that looked like software from a time when dial-up internet still screamed.
Optional Ideas for Expansion
- Add keyboard shortcuts (Ctrl+S to save, Ctrl+Q to quit)
- Include a date-picker to view or edit past entries
