-
Weekly Roundup #2
byThis past week was spent rounding out support for checkins.Microformat Fixes
I was so focused on getting locations functioning and out the door that forgot to include microformatted data. I've now included it along with the map and added tests to ensure I don't break it in the future.Checkins
Building locations helped me figure out the best pattern for adding 1-to-1 related data to an entry. A checkin is a location and a checkin record which is the name of the venue and a url for the venue. The one limitationΒ I built in surrounding checkins is that they must be created via a micropub request and can only be updated via the admin interface.
While it's possible to integrate with Foursquare's places api and allow people to "checkin" using Tanzawa, it's a much better experience to use Swarm app and backfeed it.Syndications
Syndications is different from locations or checkins because rather than being a 1-to1 relationship, they're a 1-to-Many relationship. i.e. a single entry can have multiple syndication urls.Β
Supporting multiple syndication urls from micropub is straight forward, I can just iterate over the urls and save. However, the adminΒ interface allows me to add, update, and delete records. In addition to the form itself, it also requires a (hidden) management form to manage the number of records and so forth.Β
Thankfully I was able to work the pattern out so going forward, adding any other 1-toMany data for a post should be much quicker. -
byParsing the Wordpress XML file with feedparser strips all of the Wordpress specific data. But it looks like I can use BeautifulSoup (which I'm using elsewhere) to get what I need. The "xml" parser preserves the CData, so I can get the encoded data, too. Progress.
Example of getting content from Wordpress export files with Python -
byShipped full support for checkins and syndication urls . Yay! π Next up is support for importing posts from Wordpress...π¬
-
byI got the web interface working for adding and removing of syndication urls. Nice and simple. Once I've got them marking up properly, I think they're ready to ship!
Adding syndication urls in Tanzawa -
Response to
Whatβs cool about this: you can watch for mentions of whatever you want, and those come to you in the same app where your other feeds live.
Following Twitter searches in NetNewsWire looks super handy. Will have to add the #IndieWeb hashtag once this is released.Β -
byBack to building some base infrastructure again. This time for adding / deleting syndication urls. Deleting is simple enough β it's just a (hidden) checkbox with a small stimulus controller setup to toggle its label text between "Remove" and "Undo".
Adding a secondary form also works. I output an empty formset form into my template then use a small action to copy it, replace the id and update the management form, 5 lines of code, half of which is variable definitions.
My goal is to be able to reuse this whenever I need to add multiple related records to a post without any modifications. -
Response to
It's a little bittersweet β on the one hand it feels good as I know that I have a new solution but, on the other, it feels a little sad that the fruits of so much time and effort are now redundant.
I feel this when I improve implementations all the time. Code reflects our best understanding of a given problem to a given solution at a given time. Requirements changing naturally means that the problem has also changed.
When writing code I try to remind myself that all is temporary and will be deleted or rewritten at some point, so I best not grow too fond of it. -
byCreating a slick checkin experience is out of the scope of a personal website, so you'll need to use Swarm (or such) to checkin and backfeed them into Tanzawa. However, I often find myself wanting to expand that check into a proper blog post β to tell a story about what happened. So you should be able to edit a checkin on your blog.
The edit checkin page is the same all other edit pages, except it has two fields at the top: Where did you go? and What's its url?Extra fields on checkin posts
I also started working on being able to add syndication urls to posts. I've already added support via micropub to save syndication urls. This lets you add / remove them for non-micropub posts.Syndication urls
When you can eventually set your identities on other sites in Tanzawa, it might be fun to customize the placeholder text. For example you could get it to use your username or randomly use different sites e.g. twitter on the first load, flickr on the second load etc... -
Response to
byI just took a quick look at my server logs. And I see that there are some bots that are constantly crawling my site. If that would be search engines, feed readers etc. that wouldnβt be a problem. But this are crawlers by companies whose websites try to se
I wonder if there isn't a list of these cralwers out there that you could then automatically block at the nginx/apache level. Even handling it at the app server level would discourage them from crawling your site too much. -
byJust a small update today β posts made with micropub respect the published datetime and I'm saving /showing syndication urls. I still need a proper interface for both of these in the admin. This is what syndication links will look like in a post.
Syndication links now appear in the post meta