Improving My Watch Log
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:
And here's what the watch card looks like when there's no record of the random watch 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:
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?
Want more?
So you've read this post and you're still not satisfied? Ok then, here's some other stuff for you to do: