I don’t plan on actually releasing everything every day (speaking of which I’m glad Novembeat 2019 is finally over with, holy heck!) but I definitely have things I want to get done this month.
The big one is I want to finally have a working, end-to-end AutoAuth implementation. I already implemented part of it; Publ accepts bearer tokens, and can also generate them in IndieAuth C2S mode. However, it doesn’t support the S2S flow (which is different, and I’m also not quite sold on the need for it), and I don’t have an IndieAuth endpoint that’s capable of supporting S2S either.
Unfortunately there’s not much out there that exists except as a very rough, draft specification, although Sven Knebel has a test endpoint that should at least let me validate the client side of things (and then once I have client support working I can then implement my server support against that theoretically-working client). The docs are all so scattered, though.
So, my general notion of what I need to implement, in order, is:
- Add S2S token support to an IndieAuth
user_authorizationendpoint (probably SelfAuth since that’s what I use and it’s pretty straightforward)
- Write a reference tool/CLI client that follows the AutoAuth flow to generate a bearer token
- Support that flow in Publ
- Stretch goal: add this to Feed on Feeds (which will be a gigantic undertaking, most likely)
I’ve been slowly working on improving my reactions page; just now I made it hide reactions that don’t have a post-body and replace it with a simple icon that links to the thing being reacted to.
But right now the script I use to generate those entries is, well, a hideous hack. I want to finally get around to writing reblob so I can do this somewhat better.
In particular I want to build it as a library with a CLI tool; this means that I’d be able to run reblob from the command line, but I could also use it to implement interesting things on the backend.
Things I’d want to do in reblob, roughly in order:
Detect whether a page has mf2 or not, and fall back to the ad-hoc heuristics if not
Currently it trusts mf2py to do the right thing, but mf2py is quite aggressive at trying to infer mf1 and convert it over – which ends up getting very confused by a lot of common WordPress templates
For reposts, just wrap the existing HTML content in a
<blockquote cite>(with relative links rewritten), save the entry as HTML, and call it a day
For replies, try to convert the entry text into a suitably-formatted Markdown document; unfortunately this is Rather Difficult (it’s technically a subset of HTML rendering, after all…) and none of the libraries I’ve found work particularly well for my purposes (which is to say they work well for other use cases, just not mine)
A nice stretch goal: support both Publ-style and Jekyll-style metadata so this can be used with more site engines (like, almost all of them use Jekyll-style, so…)
And another, much harder (and less useful) stretch goal: in Markdown quoted content, try to detect images in the form of
[!(image)](link)and convert them to Publ-style
Even better/harder: convert multiple images into image sets
Even harderer: if the linked image seems to be what the thumbnail image is, mirror the linked image and let Publ’s image set stuff do the right thing
As if the above weren’t already enough, I’d also really like to make a web-based post editing UI for Publ. It would have mechanisms for finding and creating posts (either from scratch or using reblob as a library).
The core UI doesn’t have to be all that complicated; I’m just envisioning a two-panel thing where the left side shows the three entry file sections, and the right side shows the rendered entry. There could also be a means of uploading/inserting images.
I’d want this to be a separate project from Publ, which can be added as a library (since there are definitely use cases for Publ which don’t allow for live content editing). It would in turn use Publ as a library for rendering and access control.
This could also support Micropub and then that turns Publ into a fully-fledged IndieWeb social network node.
Maybe it could eventually support other site generators too, but that’s waaaaaay off in the weeds.
Okay this is definitely way more than one month’s worth of work. But it’s at least a nice roadmap for what I want to do with Publ!