• Those that are familiar with micropub know that there's two ways to use the endpoint. One is as a regular json api and the other is a plain-old form submit endpoint. Almost all integrations these days are done with json apis, so the idea of support a form api seems antiquated at first.

    But once you realize that any site can publish to your site, including file attachments(!), with a simple form on their website, it doesn't seem so antiquated after-all. It feels quite liberating. In fact, it may be my favorite part of micropub.

    Currently regular json requests can create a post. And form requests with file attachments can also create a post. Tanzawa automatically inserts the photo into the post and does its exif stripping, lazy loading, and other image loading optimizations.

    Testing with the Quill article interface - image attachments are sent in base64 encoded strings in the img tag. Extracting those images, saving them to disk, and rewriting the html will take me another day to complete.

    ---

    Feedly is still mangling my posts. Besides the figure tag messing things up for feedly, another theory I have is that it doesn't like text content not wrapped in a <p> tag. Trix (the editor Tanzawa uses) wraps all content in a <div> tag and text is raw inside of it. I pushed an experiment to rewrite that <div> to a <p> tag in the RSS feed. Hopefully this fixes it.

    Mangled posts in Feedly
  • I've noticed some errors when Feedly parses my Tanzawa RSS feed. Namely that it doesn't show any content when I include an image. I have no idea why it's stripping all text from the posts.

    Other fixes to the RSS feed include removing a / from the guid and setting the permalink to false, since the guid was not a url. As the guid change, most reads will show old posts as new - sorry about that.

    This mostly a test post to see if adding titles for my statuses (the first 128 characters of plain text) will make Feedly parse properly when I include an image.

    IfΒ  this doesn't work, I have a theory that Feedly may not like <figure> tags, so I may try to rewrite my html content to be simpler for rss feeds.

    A photo of my new titles in NetNewsWire
  • Micropub is going to be a larger task than anticipated. As such I think I'll roll it out incrementally, expanding the capabilities of the micropub endpoint as Tanzawa can support them natively.

    Today I managed to get my first post from Quill to Tanzawa!

    A first post to Tanzawa originating outside of Tanzawa!


  • Added support for verifying and revoking tokens. One thing I like about API development vs regular page/form development is the inputs and outputs are clearly defined. You don't need to worry about things like layout or looks. It's either valid or it's not.
  • With the basic indie auth login flow working, the next couple of days will be dedicated of fully fleshing out apis to support revoking tokens (e.g. on logout ) and checking token validity.Β  I added basic tests for the authentication -> access token call today, so I can be confident that while I make these changes, I won't break anything.

    I also added Bearer token based authentication today, which I've plugged into my micropub endpoint stub. My goal is to have the full indieauth/micropub api ready for release by Friday, at least on a basic level.

    Importing data from OwnYourSwarm like I want will require a few more models and planning because posts will need to support geo-coordinates and so forth.
  • Woohoo! First successful IndieAuth login with Tanzawa.Β  πŸŽ‰πŸ™ŒπŸ»

    Tanzawa logged in to OwnYourSwarm
  • I got the IndieAuth authorization api working. Initially I had built it out using the rest_framework.authtoken. However I realized their models only allow one token per user.Β  This would make integrating with multiple clients impossible, so I'm opting to generate / manage tokens myself.

    I can almost complete a sign in with OwnYourSwarm. I think my token endpoint response is wrong, which is preventing it from completing. Hopefully tomorrow I can get the complete signin working so I can move on to the micropub endpoint.

    I feel like I'm starting to break small bits here and there inadvertently . So perhaps before building out the micropub endpoint and potentially breaking more things, I should take a step back and start adding some unit tests for my apis. It'll cost me a day today, but save me days of headaches over the course of the project.
  • Got the start of the indieauth authorization flow working and the base models setup.

    Indieauth auth screen


  • Just a small update today. I shipped the login screen I shared yesterday and planned out what I need to build to support IndieAuth. I think I can use DRF to help handle token generation and authentication using the token.
  • With webmentions working, next up I want to tackle support for check-ins. Currently I'm using OwnYourSwarm to backfeed my checkins to my main site and I'd like to continue doing so with Tanzawa.

    Doing so requires that I add support for IndieAuth (so I can login using just my domain) and Micropub. I'm starting on the IndieAuth implementation, which means I need to actually start with a login page for users to authenticate (thus far I've been using the django admin).

    This is what it's looking like so far. Something feels off in the design of it, but I can't quite place my finger on what it is.

    The base login form
Previous 50 of 61 Next