

Published December 19, 2024 at 11:42 PM
If you know me-or have read any of my blog posts-you probably know two things about me: I take a lot of notes, and I’m fascinated by statistics and trends.
From Apple Health to Spotify Wrapped, I love tools that analyze data to tell a story. A story that usually doesn't matter, but I digress.
That said, don’t ask me to share my Spotify Wrapped. Ever.
Given how much I track my day-to-day life-TODO lists, journal entries, random thoughts-it hit me a few years ago: why not build my own version of Spotify Wrapped for my life?
Something to reflect on the year I’ve lived and the habits I’ve built.
As you might guess, I did what any self-respecting software engineer would do: I spent far too much time coding a custom program to analyze my notes, summarize my year, and highlight patterns.
It started as a curious experiment but has since evolved into an essential end-of-year ritual.
Without getting too deep into the code (it’s very personal), here’s the general workflow:
This isn’t just about stats-it’s about storytelling. Revisiting forgotten moments or rediscovering long-buried insights from February in December feels magical.
It’s easy to get caught up in the grind of daily life, but this exercise gives me a clearer view of where I’ve been and where I want to go.
I also think this is a great way to take my bias out of the picture. What did my year actually look like? How did I compare to last year?
Over the years, friends have asked me if they could use this too-but, sadly, notes are deeply personal and custom.
That said, people love Spotify Wrapped the last few years. The idea of a “life analytics” tool definitely has some weight, but it’s not without challenges, namely:
Still, with AI’s rapid advancements, I can’t help but wonder: could a tool like this help people see their lives more clearly?
Inspired by my personal program, I’ve created and open-sourced AI File Analyzer.
This project uses AI and open-source large language models (LLMs) to parse and analyze files. While my personal analyzer is entirely custom and doesn’t use AI, this generalized version serves as a proof of concept for what’s possible.
To be clear off the bat-it’s far from perfect.
This analyzer is a basic implementation, but it proves the core idea:
The code is pretty straightforward, but I thought it could be nice to walk through it.
At its core, this project is designed to process directories, analyze file contents, and summarize key insights using AI. Here's a high-level breakdown of its main components:
File Type Identification:
The function get_file_type determines a file's type based on its extension and MIME type. This allows the program to filter and handle files differently based on their format.
Content Analysis:
Files with text-based content are passed to the analyze_file_content function, which uses a summarization model from the Hugging Face transformers library. For performance, it processes a truncated sample of the file content, generating concise summaries.
Directory Scanning:
The process_directory_contents function walks through a specified directory (while skipping system folders like .git or node_modules) and collects statistics:
Summarization Model: The project utilizes the facebook/bart-large-cnn summarization model from Hugging Face. While my personal implementation doesn't use AI, this model allows the generalized version to analyze diverse files and generate meaningful summaries.
Performance Considerations: To prevent overloading, the code limits the number of files processed (MAX_FILES_TO_PROCESS) and skips files above a certain size or with unsupported extensions. It’s not optimized for large datasets, so patience is key for bigger directories.
Here are some ways this project could be expanded:
If you’re curious, feel free to make a PR or fork the repo and try it out. I’d love to hear your ideas for taking it to the next level!
As silly as it sounds, this experiment has become one of my favorite traditions.
It’s not just a productivity hack-it’s a way to celebrate, reflect, and grow. By stepping back to analyze my year, I find clarity about what worked, what didn’t, and what’s next.
Whether or not this idea evolves into a full-fledged product, I hope it sparks inspiration. Taking time to reflect on your year-whether through notes, photos, or something else entirely-can be incredibly rewarding.
Hopefully, you try out this experiment yourself, or at the very least, give your year the proper reflection it deserves.
Happy New Year, Everyone! 🎉
ML/AI
Python
Spotify