Thought Keeper: A GUI Journal App for Your Inner Monologue

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.

Python Encrypted Diary

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

Sore Quads, Smart Squats, and Rethinking My Training

Brian’s fitness journal after a brain stroke

I’ve been running for nearly a decade. A few years ago, I added resistance training. And yet—brace yourself—there’s one thing I somehow never did: leg strength training.

Yes, I run. A lot. I convinced myself that running was leg day. Turns out, that logic only works until it doesn’t—usually in the form of injury. Somewhere along the way, it finally clicked: runners also need resistance training for their legs.

My wife has known this all along.

She does resistance training six days a week, and she works her legs especially hard. Her reasoning is simple: cardio doesn’t fully train leg strength. Recently, she’s taken it even more seriously, and the results are obvious. Her legs are noticeably stronger than before.

So I made a decision.
I would join leg day—late, but sincere.

I introduced squats into my routine, and my quadriceps responded immediately by filing soreness reports. That’s how I know something new is happening. I do have to be careful, though. Once a week, I already run 10 kilometers, and our neighborhood is aggressively hilly. My legs aren’t exactly underworked.

Still, the soreness tells me something important: I’m using muscle fibers that running alone doesn’t reach. Whether increasing strength first will eventually improve my speed is still an open question—but early signs suggest I’m on the right path.

As with everything else, I’m introducing this change slowly. My kidney condition limits how much protein I can consume, so I can’t afford to destroy too many muscle fibers at once. At the same time, muscle growth requires some breakdown. Balancing those two realities is the real workout.

To stay honest, I track my biometrics using our scale—water percentage, protein, bone mass, muscle mass, weight—and I cross-check all of that with quarterly blood work. Numbers don’t lie, even when motivation does.

For now, the goal isn’t speed.
The goal is durability.

I’ll continue monitoring, adjusting, and easing leg exercises into my routine over the next few months. After nearly ten years of running, it seems only fair to finally give my legs the attention they deserve—outside of just asking them to carry me uphill.

How to Build a Python Email Validator (That Actually Catches Your Typos)

Day 23 of 100 Days Coding Challenge: Python

Today, I built a Python Email Validator, and this is why I got my inspiration.

A long time ago—back when dinosaurs roamed the earth and PDF forms were considered cutting-edge—I managed to sabotage my own job application by giving them the wrong email address. Not wrong like a typo. Wrong like “here’s someone else’s inbox, enjoy!” The form was printable, fillable, but still very much analog when it came to submitting. I only realized my blunder when I sat waiting for a reply that never came. Cue a long, awkward phone call to the admissions office where I had to prove I was me—without sounding like a scammer. They had to resend the link. I had to verify my identity. It was a whole saga. So today, I’ve decided to write a simple email validator. Nothing too fancy—no AI, no spam filters, just the basic “Is this an actual email address or did your cat walk across your keyboard?” kind of check.

Today’s Motivation / Challenge

Let’s be real: checking whether an email is valid feels like it should be automatic—and these days, it often is. But behind that little red warning that says “please enter a valid email” is a small, mighty piece of logic. Today’s project is about building that logic yourself, understanding how to spot a bad address before it sneaks into your system and causes a customer service meltdown. It’s a nod to every web form you’ve ever cursed at.

Purpose of the Code (Object)

This program checks whether the email address someone typed in looks like a real email. That’s it. No email is actually sent—just a quick format check to catch things like missing “@” symbols or suspiciously dot-less domains. It’s like a bouncer for your inbox: if you don’t look the part, you’re not getting in.

AI Prompt:

Write a simple email validation program in Python using regular expressions. The program should have a function that takes an email address and returns whether it is valid. Include a basic GUI using Tkinter where users can input their email and get immediate feedback.

Functions & Features

  • Accepts user input via a graphical interface
  • Validates email format using a regular expression
  • Provides instant feedback: “Valid” or “Invalid”
  • Friendly UI with no command line needed

Requirements / Setup

Python 3.x (Tkinter is included by default)

No pip installs needed!

Minimal Code Sample

import re

def is_valid_email(email):

    return re.match(r’^[\w\.-]+@[\w\.-]+\.\w+$’, email)

This function checks if the email follows the basic format: name@domain.extension

Python Email Validator GUI

Notes / Lessons Learned

I thought this code would be a tangled mess of symbols, but it’s surprisingly short and sweet. Here’s the kicker: when I typed xxxxx@mail.com instead of xxxxx@gmail.com, it still counted as valid. So did hello@whatever.io. But hello@gmail? Nope—no dot, no go. It turns out, this kind of validation only cares about structure. It doesn’t know or care whether the domain actually exists—it just wants to see an “@” followed by some dots in the right places. It’s like someone who judges whether a movie is good based only on the poster.

Optional Ideas for Expansion

  • Add a domain blacklist to reject shady or disposable email providers
  • Highlight formatting errors as you type (e.g., missing “@” or extra spaces)
  • Connect to an email verification API for real-time existence checks

Punkt Happens: A Throwback to Pre-AI Summarizing

Day 22 of 100 Days Coding Challenges: Python

I woke up today with a peculiar mission: build a text summarizer without relying on AI. Yes, I willingly traveled back in time—back to the days before ChatGPT could just nod and condense a thousand words into ten. Why? Curiosity, mostly. I wanted to know how the old-school extractive methods worked. Spoiler alert: they’re kind of charming in their own clunky way.

Did it work on the first try? Of course not. I wrestled with broken libraries, mysterious errors, and one particularly judgmental error message about “punkt_tab” that seemed to imply I should know what that is. I wrote one version, then another. Tried a different library. Threw a mini tantrum. Eventually, I ditched NLTK entirely, kicked open the spaCy door, and got a summarizer working. Is it perfect? Nope. Is it lovable in its quirky way? Absolutely.

Today’s Motivation / Challenge

You ever read something and think, “Wow, that could’ve been a tweet”? That’s the spirit behind today’s project. Summarizing text is a superpower—whether it’s for condensing long articles, making notes from journal entries, or just helping your brain cope with too much information. While AI can do it effortlessly now, building one from scratch is like learning to cook pasta before using a microwave: humbling but worthwhile.

Purpose of the Code (Object)

This code takes a chunk of text and extracts the most important sentences. Instead of “understanding” like AI, it just finds which words show up the most and grabs the sentences that use them. It’s a bit like highlighting the loudest parts of a conversation and calling it a summary—but hey, it kind of works.

AI Prompt:


“Write a Python program that summarizes text using classical NLP techniques. Do not use deep learning. Use word frequency and sentence scoring instead.”

Functions & Features

  • Tokenizes text into words and sentences
  • Removes common words like “the” and “is” (stopwords)
  • Scores sentences based on word importance
  • Extracts and returns the top N sentences as a summary

Requirements / Setup

pip install spacy  

python -m spacy download en_core_web_sm

Minimal Code Sample

python

CopyEdit

doc = nlp(text)

sentences = list(doc.sents)

word_freq = {word.text.lower(): word_freq.get(word.text.lower(), 0) + 1 for word in doc if not word.is_stop and not word.is_punct}

summary = ‘ ‘.join([sent.text for sent in heapq.nlargest(3, sentences, key=lambda s: sum(word_freq.get(w.text.lower(), 0) for w in s))])

This grabs the top 3 most important sentences using word frequency as a guide.

Spacy Text Summarizer GUI

Notes / Lessons Learned

Oh, the joys of punkt_tab. Today’s real adventure was less about Python logic and more about survival. The original plan was to use NLTK—but it had other ideas. It kept yelling at me about a missing “punkt_tab” resource, which sounded more like a 90s German punk band than a tokenizer. I redownloaded, wiped caches, and whispered sweet nothings to the command prompt. Nothing.

Eventually, I gave up and pulled in spaCy instead—and guess what? It just worked. Sometimes, letting go of the buggy route is the bravest choice. Along the way, I learned how to uninstall libraries cleanly, delete hidden cache folders, and even navigate the Windows file system like a seasoned hacker. It didn’t summarize exactly like a human or an LLM, but it got the job done. And now, I’m much more confident using Python from the command line. NotebookLM still wins at summarizing, but my little app gets a gold star for effort.

Optional Ideas for Expansion

  • Let the user choose how many sentences they want in the summary
  • Add a “read from file” button so you can summarize documents directly
  • Highlight the summary sentences in the original text to show what was picked

When I Optimized for Temperature and Forgot About Time

Brian’s fitness journal after a brain stroke

This morning, I made what felt like a perfectly reasonable decision: stay in bed a little longer because it was cold. Very cold. Also, there was no immediate pressure to run—it wasn’t even close to the warmest part of the day yet.

This logic was flawless.
Unfortunately, it was also dangerous.

I waited too long.

By the time I finally started my day, my carefully imagined schedule had already begun to unravel. Saturdays are chore-heavy for me. I do a lot around the house and fit in a 10-kilometer run on top of it. Delaying the start meant everything else slid later… and later… and later.

When I returned from my run, dinner was already behind schedule. I could tell immediately—my wife was not thrilled.

My wife runs life on a timeline. She schedules days and weeks in advance. Cold days and hot days do not interfere with her morning exercise routine. Her internal clock does not negotiate. Sometimes I think she wishes I were more like her. Today, I wished that too.

I felt bad knowing I’d disrupted her carefully structured day.

Normally, when things go wrong because of me, my wife quietly adjusts her tasks so she doesn’t waste time waiting. Today, though, the ripple effects were harder to contain.

Saturday evening is grocery time—specifically a very precise window when the store is less crowded. She also meal-preps for the following week, packing ingredients with recipes so cooking is easy for me. Any delay pushes everything later, including bedtime. She doesn’t like food sitting around unorganized. Neither does her conscience.

By the time I started washing dishes, we were already 45 minutes past our usual grocery time. I panicked, stopped mid-dish, and suggested finishing later—without realizing that this decision now blocked her from organizing groceries afterward.

Efficiency, I had learned, was optional today.

While I was scrambling, my wife quietly rearranged some of her Sunday tasks just to keep the day moving. Then she tackled grocery sorting anyway, because that’s what she does. Later, she gently reminded me of a lesson I apparently needed to relearn: schedule backward.

Start with the fixed commitments.
Work back to the run.
Then decide when sleeping in is actually allowed.

So yes, next time I’m tempted to wait for optimal running temperatures, I’ll also remember this: time waits for no one—and neither does the grocery schedule.Warm legs are nice.
An undisturbed household system is nicer.

Why Didn’t I Think of This in 2005?

Day 21 of 100 Days Coding Challenge: Python

When I saw “audio-to-text converter” on the list, my brain did a dramatic slow turn and whispered, “Where were you twenty years ago?” I mean, really—this could’ve saved me hours of repeating the word “vegetable” into a cassette recorder, trying to sound less like an anime character doing karaoke. Back then, I was on a one-woman mission to master English pronunciation, and a tool like this would’ve felt like cheating—but the good kind. Now, with AI and a little Python magic, I have made a program that converts my voice into readable text. Only catch? It plays favorites with WAV files. No love for MP3s. So naturally, I whipped up an MP3-to-WAV converter on the side, because why not? I recorded my voice straight from my laptop, half-expecting it to transcribe me saying something profound. Instead, I got back “this is a test.” Which is fair. It was.

Today’s Motivation / Challenge

Today’s project is the kind of tool you don’t know you need until you really need it—like when you’re trying to capture a brilliant idea mid-shower, but this time, it’s your voice memos from a walk, an interview, or that rambling TED Talk you gave to your cat. Audio-to-text isn’t just practical—it’s empowering, especially for learners, note-takers, and people who speak faster than they type.

Purpose of the Code (Object)

This simple program listens to your audio file and writes down what you said. That’s it. You talk, it types. It works best with clear speech and doesn’t judge your accent (too much). You can even record yourself with a laptop mic and see your words appear as text. It’s like magic—but with WAV files.

AI Prompt:

Create a Python script using the SpeechRecognition library that takes an audio file (preferably WAV), converts it to text, and prints the result. Add basic error handling. Bonus: include a simple MP3-to-WAV converter using pydub.

Functions & Features

  • Load an audio file (WAV preferred)
  • Convert speech in the file to text
  • Display transcription
  • Convert MP3 to WAV if needed

Requirements / Setup

bash

CopyEdit

pip install SpeechRecognition

pip install pydub

You’ll also need ffmpeg installed and added to PATH for MP3 support.

Minimal Code Sample

import speech_recognition as sr

recognizer = sr.Recognizer()

with sr.AudioFile(r”C:\path\to\your.wav”) as source:

    audio = recognizer.record(source)

    text = recognizer.recognize_google(audio)

    print(text)  # This prints your spoken words

Audio to Text GUI

Notes / Lessons Learned


So here’s the thing: I wrote audio_file = “C:\Users\tinyt\OneDrive\Desktop\Test\Recording.wav” and, well… Python had a meltdown. Apparently, \t is not just a cute path separator—it’s a tab. Classic Windows-path betrayal. Once I added a humble little r in front like this—r”C:\Users\tinyt\…”—the program stopped being dramatic and worked like a charm. But let’s be real: rewriting the file path in code every time?

That’s a cry for a GUI. So, I made one. And it was glorious. Click, select, transcribe—done. Also, a fun fact: if you skip articles in your speech, the program skips them in your text too. No article, no mercy. And if your grammar is questionable? The output will happily reflect that. It’s an honest mirror, not a grammar teacher.

Optional Ideas for Expansion

  • Add a “Save as TXT” button for transcribed text
  • Let users choose between multiple languages for transcription
  • Record audio directly in the app, no file needed

You Had One Job, Resume!

Day 20 of 100 Days Coding Challenge: Python

Do you know what an ATS resume keyword checker is? About 15 years ago, I had a chat with a friend in HR who casually dropped the term “Applicant Tracking System,” or ATS, as if it were common knowledge. I nodded like I totally knew what she meant, but inside I was thinking, “Ah, yes, the mythical software that eats resumes for breakfast.” She explained that ATS was used to sort through the avalanche of job applications—often over a thousand per listing. But here’s the kicker: the system also had a habit of rejecting the best candidates because they didn’t use the “right” words. The irony stuck with me.

So today, I decided to take matters into my own hands and see if I could make a mini version of this digital gatekeeper, ATS resume keyword checker. Because if robots are going to judge us, we may as well peek under their hood.

Today’s Motivation / Challenge


We’ve all seen those job listings with 50 “required” skills. And let’s be honest—some of them are just buzzword soup. Today’s challenge was about building a tool to fight back. The goal: create a little program that reads your resume and checks it against keywords from a job description. It’s like prepping for a job interview with a cheat sheet—except you built the cheat sheet yourself.

Purpose of the Code (Object)


This code scans your resume and tells you how well it matches a job posting based on keywords. It’s not reading your experience like a recruiter—it’s just playing word bingo. If you mention “Excel,” and the job wants “Excel,” that’s a point for you. The higher the match score, the more likely you are to pass the digital bouncer at the job club door.

AI Prompt: 

 Build a Streamlit app that uploads a resume (.txt or .pdf), compares it against comma-separated keywords, shows which ones are matched and which are missing, and calculates a match score.

Functions & Features

  • Uploads resume in .txt or .pdf format
  • Accepts comma-separated job keywords
  • Checks which keywords are present in the resume
  • Calculates a match score (%)
  • Displays found and missing keywords in separate lists

Requirements / Setup


Install these before running:

bash

CopyEdit

pip install streamlit PyPDF2

Then run the app using:

bash

CopyEdit

streamlit run your_script.py

Minimal Code Sample

python

CopyEdit

def check_keywords(text, keywords):

    found = [kw for kw in keywords if kw.lower() in text.lower()]

    missing = [kw for kw in keywords if kw.lower() not in text.lower()]

    return found, missing

This function splits your keywords into found and missing by checking if they show up in the resume text.

Resume Checker App_GUI

Notes / Lessons Learned


The programming part was smooth. Honestly, I was feeling confident—until I tried to run my Streamlit app like a normal Python script. That’s when Streamlit wagged its finger at me: “Session state does not function when running a script without streamlit run.” Touché, Streamlit. Once I launched it the proper way, everything clicked. I tested the app with a job listing from Indeed and my own five-year-old resume. The result? A humble 50% match. Moral of the story: your resume may be a masterpiece, but if it doesn’t speak ATS language, it’s not getting past the door. Tailoring your resume for each job isn’t just good advice—it’s algorithmic survival.

Optional Ideas for Expansion

  • Add an option to upload a job description file and auto-extract keywords
  • Highlight matched keywords directly in the resume text
  • Export the results as a PDF or CSV for review

One Push-Up a Week and a Year of Quiet Progress

Brian’s fitness journal after a brain stroke

Today marks a small but meaningful milestone for me—one that took an entire year to earn.

About a year ago, I started doing push-ups once a week. I began at 20 and made myself a very modest promise: add one more rep each week. No heroics. No sudden transformations. Just one extra push-up. Today, that number reached 72.

When you have compromised kidneys, muscle-building looks a little different. I can’t eat as much protein as a healthy adult male, so progress doesn’t arrive quickly—or loudly. I started running about a decade ago, but it was only in the last few years that I began adding other forms of exercise. Even then, I did it cautiously.

Summers are already physically demanding thanks to lawn mowing and general activity, and my body doesn’t recover the way it used to. So instead of piling workouts on top of each other, I started doing something less exciting but far more effective: adding things slowly.

I also tweaked how often—and how much—I train. Rather than working everything in one session, I focus on a few selected muscle groups each time. The goal isn’t exhaustion. The goal is regeneration. Training your body not to recover is not a win.

Since switching to this approach, something unexpected happened: it worked.

My wife mentioned that I look noticeably leaner than I did a few years ago, back when running was my only form of exercise. I’ve noticed it too—mostly because my pants are tighter. And no, it’s not because my legs suddenly bulked up. Progress shows up in mysterious ways.

The push-up plan itself has been almost comically simple. One rep per week. That’s it. Occasionally, I misremember what number I hit the week before, which means I may have skipped a number or repeated one. But honestly? I don’t care. What matters is that I showed up every week for a full year.

That alone feels worth celebrating.

I’d like to reach 100 push-ups someday, but that will take most of another year—and I’m perfectly fine with that. I’m not in a rush. Each week, I’ll try the new number. If I succeed, I’ll add one more for next time. Thanks to a spreadsheet, I can now be reasonably sure I’m not accidentally cheating or sabotaging myself.

A fitness journey doesn’t need to be dramatic to be real. It just needs to be yours. I’ve accepted my kidney disease and built my workouts around what my body can actually handle.

And one push-up at a time, it turns out, is more than enough.

Ctrl + M: Merging PDFs Like a Boss With Python PDF Merger GUI

Day 19 of 100 Days Coding Challenge: Python

Have you ever stood at your flatbed scanner, flipping page after page like a 90s office clerk in a movie montage, only to realize—“Oh great, now I have five separate PDFs that should have been one”? Welcome to my world. We’ve got one of those dinosaurs of a scanner that spits out a new file for every single page, and while it’s good at being stubborn, it’s not great at convenience. Sure, there are free websites that claim they’ll merge your files in a flash.

But when those PDFs contain personal, sensitive, or just plain embarrassing content (say, your creative attempts at calligraphy), uploading them to a mystery website isn’t exactly comforting. So I did what any slightly paranoid, slightly annoyed person would do—I made my own PDF merger. Because sometimes, security means building your own tools with a splash of Python and a sprinkle of stubbornness.

Today’s Motivation / Challenge


Today was about practicality. Merging PDFs sounds boring until you actually need to do it—and then you realize it’s oddly satisfying, like organizing your bookshelf by color or alphabetizing your spice rack. Also, there’s something empowering about replacing a clunky online tool with your own sleek script. This challenge hit that sweet spot between “annoyed enough to act” and “curious enough to build.”

Purpose of the Code (Object)


This little Python program takes all the PDF files in a folder and smooshes—yes, smooshes—them together into one tidy document. No need to click through a bunch of file pickers. No typing long file paths. Just point it to a folder, and poof! One big, shiny PDF.

AI Prompt:


“Rewrite the script so that it automatically merges all .pdf files in a folder, no typing required. Also, make it a GUI version.”

Functions & Features

  • Select a folder via a simple GUI window
  • Automatically find and merge all .pdf files in that folder
  • Save the merged file with a custom filename

Requirements / Setup


To run the program, you need:

bash

CopyEdit

pip install PyPDF2

Python 3.x is recommended (Tkinter is usually pre-installed)

Minimal Code Sample

from tkinter import filedialog

import os, PyPDF2

folder = filedialog.askdirectory()

pdfs = sorted([f for f in os.listdir(folder) if f.endswith(“.pdf”)])

merger = PyPDF2.PdfMerger()

for pdf in pdfs:

    merger.append(os.path.join(folder, pdf))

merger.write(“merged_output.pdf”)

This merges all PDFs in the selected folder in alphabetical order.

PDF Merger

Notes / Lessons Learned


This was my first Python GUI script that I actually plan to use often—and honestly, that’s the best kind. My first version worked, but it asked me to type full file paths like some kind of unpaid intern. One typo, and it all crashed. Then I remembered that I am, in fact, very lazy. So I upgraded to a GUI. One click to select the folder. No paths, no quotes, no drama. It’s exactly the kind of script that “future me” will thank “past me” for—like finding frozen soup in the back of the freezer when you’re starving. Am I proud? Absolutely. Will I use this over and over? Also yes.

Optional Ideas for Expansion

  • Add drag-and-drop support for merging selected files
  • Let the user reorder files before merging
  • Show a preview of filenames and file sizes before final merge

Python, Clean Up Your Room!

Day 18 of 100 Days Coding Challenge: Python

Let’s get one thing straight: I am not a digital Marie Kondo. My desktop often looks like a digital garage sale, and every few weeks, I muster the courage to face it—dragging files around like I’m playing a very boring version of Tetris. I usually go the old-fashioned route: click, drag, sort, sigh. Then, one day, while sorting my pictures, I thought… Wait a minute. I know Python. Why am I doing this with my human hands? So, I decided to create a Python file organizer script to organize my pictures.

Today’s Motivation / Challenge

Today’s project tackles a common monster: messy folders. Whether it’s your Downloads folder, your project archive, or that strange desktop abyss, the pain is universal. The challenge? Build a simple, no-fuss tool that does the sorting for you—like a digital butler who doesn’t judge your file-naming habits.

Purpose of the Code (Object)

This little script organizes all the files in a selected folder by their file extensions. That means all your .jpg files go to the “jpg” folder, .pdf files go to the “pdf” folder, and your .who-knows files? They get a home too. It’s your personal assistant for decluttering—minus the hourly rate.

AI Prompt:

Python code to organize files in a folder by their file extension. Include a GUI for folder selection and an undo function to reverse the operation.

Functions & Features

  • Sorts files by extension into neat subfolders
  • Ignores folders and only targets loose files
  • GUI-based folder selection (no need to type paths)
  • Undo function to restore files to original locations

Requirements / Setup

  • Python 3.6+
    No pip installs required—just your standard library.

Minimal Code Sample

python

CopyEdit

ext = ext[1:].lower() or “no_extension”

dest = os.path.join(folder_path, ext)

shutil.move(file_path, os.path.join(dest, filename))

This sorts each file into a folder named after its extension.

File Organizer

Notes / Lessons Learned

This time, I couldn’t resist poking the code like a cat with a suspicious shoelace. I renamed ChatGPT to “Mrs. Cat” just to see if she’d organize with more sass (she didn’t). Then I fed the script a folder full of chaos—downloads, screenshots, and whatever that .swf file was. Everything got tucked neatly into place. The thrill of seeing it work was only topped by the dread of realizing I’d just hidden all my junk into different corners. So, naturally, I added an undo button. Because sometimes, you need to imagine the consequences before you automate your mess.

Optional Ideas for Expansion

  • Add a “preview before sort” function so you can see what’s about to move
  • Let users customize folder names (e.g., “Images” instead of “jpg”)
  • Add a cleanup timer to auto-organize your folder once a week