I'm super happy to be able to add myself to the list of people who publish weather info in their posts!
I've had a long-standing goal to include weather info on all of my posts on my site! In fact, I actually started collecting historical weather info just so that I could backfill the data on my site once I added the feature. The weather database I've been collecting goes back to 2012! I decided it's been long enough and bit the bullet and sat down to finally knock it out.
I've had the current weather up in my website header since 2016, and it turns out that I was able to reuse a lot of that existing code.
Today I finally added support for storing weather info per post, and adding it when new posts are created. The weather is based on my current location, which I've already been automatically including in my posts for a long time. So now, when a new post is created, if the cached weather info that is shown in the header is recent enough, it bakes it into the post's storage file.
Now my posts will all have little weather icons and the current temperature!
I decided on using an icon font for the weather icons so that they are all visually consistent and inline with the text. The icon set I'm using is http://erikflowers.github.io/weather-icons/ The weather info itself comes from Wunderground, although I may switch to Dark Sky in the future since they have a higher per-day API limit.
I also decided to put the weather info on the same line as the location name, since I feel like this information very closely linked to the location. (It's also stored in the location property internally.)
I'm pretty excited to finally have this done, just in time for all my posts in 2018 to be weather-tagged!
I'm postponing the work of backfilling all my past posts since that is going to take quite a bit of effort. I'll add it to the ever-growing list of old data to import to my site! 😂
Previously, Quill handled doing that for me when I use its browser bookmarklet. If you connect your Twitter account with Quill, then if you favorite a tweet URL, it will go and favorite the tweet on Twitter for you. This works great if you only ever use Quill to favorite stuff. Now that I've been using Eddie's Indigenous iOS app, I had lost the ability to actually favorite stuff on Twitter if I posted it to my site.
My goal was to make my Micropub endpoint understand how to POSSE likes to Twitter so that no matter which client I used to favorite things, I'll end up favoriting the twitter copy too.
Thanks to silo.pub taking care of dealing with the Twitter API, it didn't end up being that much work to actually make this happen. So now, when my Micropub endpoint receives a request to create a like-of where the URL is a tweet URL, it tells silo.pub to also syndicate that post to Twitter.
So now when I encounter a tweet on iOS, I can use the "share" button to favorite it on my site which then also favorites it on Twitter!
So I was pretty excited about that, but then quickly realized I needed to go an extra step with it! Stretch goal! What happens when I favorite someone's indie post? It's great that it favorites it directly, but if they've also syndicated their post to Twitter, I should also syndicate my like to Twitter! Thankfully this was also not a huge amount of work, thanks to a lot of infrastructure already in place in my site.
When I create a like, my site already expands the contents of the liked post and stores it internally, as well as rendering the content I favorited. I like the way this ends up looking since it makes my favorites page look more like the equivalent page on Twitter.
Since my site is already pulling in the content of the post I like, that already includes any syndication URLs reported by that post. That means I already know the syndicated tweet URL that I need to favorite on Twitter!
Adding support for this was a matter of finding the Twitter syndication URL of the post I've favorited, and then telling silo.pub to favorite that on Twitter as well.