Improving My Watch Log

05 Jun 2024 | ~2 minute read

I recently wrote about adding a watch wearing log to this site. I've been working away on improving it, and I think it's pretty great.

When I first introduced the Watch Log, it worked well, but there were a few things I wanted to improve.

For example, the original version couldn't display the watch I'm wearing today. Instead, it would just dump a random watch from the collection on every page refresh, which was a little...random.

I've managed to fix this so that when I choose a watch to wear, that "card" stays until I decided to generate a new watch, and confirm that I'm wearing it, the next day.

While I was there, I also wanted to add a notice that shows me the last time I wore a watch according to the log. If there's no entries in the log, it also needed to have an elegant message.

Here's what the card now looks like for me, when I'm logged in:

Example watch card when logged in

And here's what the watch card looks like when there's no record of the random watch in the log:

Example watch card that's not in the log

So all good, right? Well, yeah, but there was one more feature I wanted to add, and that's an RSS feed.

This proved to be quite difficult as the watch log is stored in a simple text file, then Kirby (my CMS) pulls the details from my collection. So for the RSS feed to work, it had to parse the log, find the correct watch, then pull the details from my collection.

Luckily I'd already worked this out with the Watch Log page, so it was just a case of tweaking the PHP to fit. Now that's done, anyone can follow along with which watch I'm wearing by subscribing to the Watch Log RSS feed, but more importantly, I have been able to plug that feed into EchoFeed so that my watch wearing antics are automagically posted to my socials every time I pick a watch to wear.

This morning was my first time doing this, and I'm really glad to see it all worked as expected:

Mastodon post with today's wristcheck.

Honestly, I wasn't sure how well EchoFeed would parse the my RSS feed, as there's a lot going on there - a hashtag, a link to the watch in my collection, and an image of the watch on my wrist. But EchoFeed worked flawlessly and I now have a fully automated daily wrist check.

Pretty cool, huh?

← The one before
We Already Have a Digital Currency

Up next →
Human or Not?

Get in touch!

Receiving emails from my readers is my favourite thing, so if you have something to say, feel free to drop me an email or sign my guestbook.

Want more content?

Say no more, dear reader. Click the button below to be taken to a random post:

Read a random post...

Want to be informed when I post new articles? Simply enter your email address below and you will get an email whenever new posts are published.

Alternatively, you can subscribe via RSS instead.

Enjoyed this post?

I put a lot of work into maintaining this site and I really enjoy interacting with my readers.

My fuel of choice is coffee, so if you did enjoy this post, or found it in any way useful, I'd appreciate more fuel to keep me going. ❤️

Buy me a coffee