Alles
Day 24: media-endpoint at HWC
Today I was at Homebrew Website Club in Utrecht. We had some talks, showed some stuff, and then coded for a while. (You might say that we switched the quiet writing hour and the talks around, but we were not silent all the time.) Jesse made a first version of a blog section on his site and Martijn did some tweaking on his habit tracker.
I made it easy for myself: I just copy+pasted my existing [media endpoint](https://www.w3.org/TR/micropub/#media-endpoint) into my Indieweb Toolkit. Then I spent the rest of the time tweaking, cleaning and improving my code. The whole endpoint is now contained in a single static method, which takes a string with the path to the upload folder, and a string with the public URL of that same folder. It validates access tokens, saves media with a sanitised filename and an unguessable prefix, like vx5dgk-image.jpg
, and then returns the URL of the uploaded file in a Location
header.
So, this could be your media-endpoint.php
:
<?php
require __DIR__ . DIRECTORY_SEPARATOR . 'toolkit' . DIRECTORY_SEPARATOR . 'bootstrap.php';
require __DIR__ . DS . 'indieweb-toolkit' . DS . 'bootstrap.php';
endpoint::media(__DIR__ . DS . 'media', 'http://indieweb-toolkit.dev/media');
Still haven't brought the IndieAuth
class over to the toolkit though, so it's still not working. But it's coming!
Alleen jammer dat nog altijd elke muisklik naar Google wordt verzonden :) Dat sneeuwt nu een beetje onder.
Mijn schermloze dag is nu officieel mislukt. Ik ging van 'geen scherm' naar 'alleen telefoon', maar toen zat er een bug in de code die moet bijhouden hoe veel ik gelezen heb vandaag, dus nu zit ik toch weer achter mijn laptop, in de code, met koffie, IndieWeb-dingen te doen.
Whoa! How nice :)
Please note that at the moment of writing this, my blogpost does not describe what my Micropub plugin does. They are separate things now. But I do want to update the plugin, using the code from my toolkit, so that they become the same thing again.
Thanks for the mention though!
Day 23: automatic retweet
Okay, I admit: I already did this yesterday, as you can see from my previous retweet. But I wanted one day off. One day without screens. So that’s today.
Earlier on I made my site like tweets when I post a like to a tweet on my site. This means I get just feed my Micropub endpoint an URL as a like-of
, and don’t think about it anymore. Now I added reposts to this too, so I can just paste a link in Quill and it’s ok.
I also seemed to miss pictures in reposts since I redid them, so I fixed that as well. It’s the little things. See you tomorrow!
De voorlopige uitslag is dat we voorlopig even beter geen Stemwijzer moeten invullen. https://www.invetek.nl/de-voorlopige-uitslag-van-de-stemwijzer/
Goed, elke klik in de #stemwijzer wordt naar Google Ads gestuurd. Daar kun je iets of niets van vinden. Het gebeurt in ieder geval.
Day 22: read posts
In December I already posted some plain text notes tracking my reading progress in Stoner by John Williams. (The Dutch translation, by the way, because I got that one somewhere in a very portable version and I was on a city trip to Vilnius.) I already planned to upgrade those plain text notes to a more standarized format, so that I would have /read posts.
Before I could add them, though, I needed a way to give them URLs. So now I have this public list of books I own / owned / want to track, on my new library page: /bieb. All books in there are marked up as h-cite
s and have a url in the format https://seblog.nl/isbn/9780123456789
. Their u-uid
is set to isbn:9780123456789
, because that seems to be a valid url scheme (but browsers don't know what to do with it).
The next step was simple: I just expanded my shortpost type with a 'read' type, that looks for a read-of
field. Thanks to XRay and my existing code, the seblog.nl/isbn/
-url gets expanded to a title and author. I also added a page
field, because I posted when I was at certain points at the book, and I actually haven't finished it yet.
Now my new /gelezen page looks like this:

@raymonmens @svdleer Andere nuance: ze vergaten niet, maar hadden eigen aanpassingen nog niet doorgevoerd. Maar leuke samenvatting hoor ;)
Inzichten op de late avond: het probleem is niet dat ik niet op Facebook zit. Het probleem is dat jullie er allemaal wel op zitten, en dat normaal vinden.
En, min of meer door Tegenlicht van vanavond: zwart-wit denken los je niet op met grijstinten. Het tegenovergestelde van zwart-wit is kleur, een totaal andere manier van kijken.
En dat gaat dan dus niet over ‘Trump denkt zwart-wit’ of ‘mensen die Trump erg vinden hebben een psychose’, want dat is in zichzelf nog steeds zwart-wit. Dat relativeren (wat ik net deed) is denk ik een grijstint. Kleur is de nuance proberen te zien.
Mijn broer Wouter staat in de finale van de Dutch Barista Championships en heeft koffie nodig. Dus maakte ik ikkoffiejijkoffie.nl voor hem. Doe mee!