#dev 2024-03-25

2024-03-25 UTC
#
[aciccarello]
Right, it's not part of markdown itself but I've seen plugins for it
#
Soni
[snarfed]: not particularly indieweb related but do you wanna (help us) setup a CursedIRC Mastodon bridge?
#
[snarfed]
Soni hmm! probably not? I don't really use IRC, I've never heard of CursedIRC, and I'm not sure chat and microblogging are a very good UX match for bridging
#
aaronpk
the only search result for CursedIRC is what appears to be a spam site that scraped a conversation from Soni from somewhere else
#
aaronpk
now this chat log will probably rank higher than those in the future
#
Soni
aaronpk: rule 1 of CursedIRC is that we don't talk about what CursedIRC actually is ^^
bterry joined the channel
#
[qubyte]
Well, I’m confused.
#
Soni
(well it has to do with IRC, that much is obvious)
AramZS_ joined the channel
#
Soni
[snarfed]: oh yeah in practical terms it's a terrible idea, we wanna do it because we can (but we refuse to ask whether we should)
[tantek] joined the channel
#
[tantek]
auto-emoji << implementation: emoji syntax plugin for markdown-it: https://github.com/markdown-it/markdown-it-emoji
#
Loqi
ok, I added "implementation: emoji syntax plugin for markdown-it: https://github.com/markdown-it/markdown-it-emoji" to the "See Also" section of /auto-emoji https://indieweb.org/wiki/index.php?diff=94361&oldid=94356
rrix and mahboubine joined the channel
#
mahboubine
suppose I use bridgy to publish from my website to mastodon.
#
mahboubine
and let's say when publishing I don't include the canonical url for my post on mastodon
#
mahboubine
than my post gets a bunch of interactions so I go and add a syndication link to my post
#
mahboubine
will bridgy automatically discover the post and send the missing webmentions to my site
#
mahboubine
I hope all that made sense
#
[aciccarello]
I think this section of the bridgy docs should help https://brid.gy/about#missing
#
[aciccarello]
"Are you using a syndication link? If so, Bridgy may have fetched your post before you added the link. When that happens, Bridgy waits up to two hours before it refetches your post and reloads syndication links. Try clicking the Crawl now button on your user page."
#
mahboubine
precisely what I needed, thank you!
#
[tantek]
hmm, what's the best way to post a quote post of a quote post?
x0, [contact898], Guest6 and [KevinMarks] joined the channel
#
[KevinMarks]
blockquote nests OK, though if you're worrying about POSSE a screenshot may be more resilient
[lcs], ttybitnik and [Erik] joined the channel
#
[Erik]
I haven’t been here in a while, but thought this might be worth sharing!
#
[Erik]
Looking for somebody to (help me) build a tool!
#
Loqi
[preview] A tool for sharing messages and images
AramZS joined the channel
#
GWG
I'm looking to store some static files somewhere and I don't want to upgrade my vps just for extra storage space. Anyone have any suggestions?
#
redblobgames
Not a serious suggestion: store it in youtube https://hackaday.com/2023/02/21/youtube-as-infinite-file-storage/
#
redblobgames
[edit] Not a serious suggestion: store it in youtube https://hackaday.com/2023/02/21/youtube-as-infinite-file-storage/
#
redblobgames
GitHub pages might be the easiest place to put static files, depending on the size and format
[Paul_Robert_Ll] joined the channel
#
GWG
I had looked into Amazon Cloudfront backed by S3.
#
GWG
I want something where I have more rights than a free service
ttybitnik joined the channel
#
[KevinMarks]
Are they files that you can give a creative commons designation? If so, http://archive.org will host them for you
[schmarty] joined the channel
#
[tantek]
[KevinMarks] have you seen anyone do that? nested blockquotes for a quote post of a quote post? would love to see a real world example
#
mahboubine
currently implementing micropub for my site
#
mahboubine
my site is built with a static site generator that can optionally turn dynamic, so this will be fun
#
[KevinMarks]
hmm. Maybe in a fisking post, I'd have to look for someone doing that. the modern example is quoting a quote-tweet, which is where screenshot come in
ttybitnik joined the channel
#
GWG
[KevinMarks]: No
bret joined the channel
#
starrwulfe
Re: will bridgy "store" interactions (paraphrasing here)
#
IWDiscord
<s​tarrwulfe>
#
starrwulfe
* * In my experience, yes if you make sure to include permalinks "burned in" the comment threads from time to time. I've managed to go back and do exactly as you've outlined and "repost" a post that was on my website 2 versions ago and was lost to the sands of procrastination with backups this way. Bridgy had no problem backfeeding the threads comments and interactions with minimal cleanup and reformatting needed.
vikanezrimaya_, lagomorph__, AramZS_ and eb joined the channel
#
mahboubine
this micropub test says it will send an access token in the http header and the post body
#
mahboubine
but isn't it actually sending it in the http header and query params?
#
aaronpk
where are you seeing it in the query param?
#
mahboubine
aaronpk: doesn't the use of ? and & mean it's query param?
#
mahboubine
usually body is in json format AFAIK
[qubyte] joined the channel
#
[qubyte]
Traditionally, no! Browsers natively speak URL encoded bodies (like you’re seeing).
#
mahboubine
that's what I figured, processing in javascript works a little differently it seems
#
[qubyte]
Is your server JS?
#
[qubyte]
(if so, you can use `https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams` to parse the body, but you’ll need to handle list-like things specially)
#
[qubyte]
There may be libraries to smooth that parsing.
#
[qubyte]
Anyway, iirc a micropub endpoint(s) needs to be able to handle URL encoded forms, multipart encoded forms, and JSON encoded bodies.
#
mahboubine
[qubyte]: thank you, I was looking for that
#
mahboubine
I wish the micropub spec chose either JSON or whatever this is for the body
#
mahboubine
cause now I have to do code gymnastics to support both
bret joined the channel
#
gRegor
There might be some libraries for that, I use https://github.com/aaronpk/p3k-micropub in PHP land
#
mahboubine
none of the libraries work exactly work with my framework, although I might be able to steal some bits from the expressjs library
#
aaronpk
if your server framework doesn't support form-encoded requests that is a serious shortcoming of the framework
#
aaronpk
that means it can't support browser form POSTs
#
[qubyte]
There’s a good chance an indiekit component will do what you want, or at least provide some code to compare yours to (again, assuming JS): https://www.npmjs.com/package/@indiekit/endpoint-micropub
#
[qubyte]
You may also see probably what _not_ to do by peaking at my code. For example, parsing URL encoded bodies in a way which works with mf2 style plurals. https://github.com/qubyte/qubyte-codes/blob/main/functions/micropub.js#L36-L55
#
[Paul_Robert_Ll]
Some of the code gymnastics Indiekit does to handle different requests can be found starting here: https://github.com/getindiekit/indiekit/blob/0198f5faf6277651deb2d51e64442a6329b9004e/packages/endpoint-micropub/lib/controllers/action.js#L45-L47
#
[Paul_Robert_Ll]
I also have a function that find a access token from the different places it could be set: https://github.com/getindiekit/indiekit/blob/0198f5faf6277651deb2d51e64442a6329b9004e/packages/indiekit/lib/token.js#L4-L27
MihajloPi joined the channel
#
[tantek]
On the broader topic of server-side support for form-encoded requests, I think that's a pretty important area of web dev that's been severely neglected by frameworks because there's been so much of an assumption (deliberate design?) that forms should only work purely on the client side with JS
#
[tantek]
and that all "submission" should be via JS, never HTML
#
aaronpk
true, i guess the trend of building SPAs means you don't really ever have to handle browser form posts directly
#
gRegor
They're still sending a `multipart/form-data` if using FormData, though, so something has to understand it?
#
aaronpk
not if it's POSTing JSON
MihajloPi and AramZS joined the channel
#
gRegor
[Erik], I think Bridgy Fed would work to federate your posts to Mastodon and PixelFed, Bluesky soon, I think.
#
gRegor
Including images and alt text based on the microformats in your original post: https://fed.brid.gy/docs#web-which-parts
#
gRegor
Bridgy Classic does have a Publish to Bluesky option, that's more like cross-posting than federation
#
gRegor
I use Bridgy Fed myself, just federated a photo the other day. You can search gregorlove.com on Mastodon to see it (if I link directly, it redirects to my site)
#
[tantek]
aaronpk, gRegor, I was working on extending CASSIS to handle this kind of form posts "runtime" with an abstraction that worked the same client and server-side but that side project got put on hold. the farthest I got with it was the demo site http://asin.cc which does use similar runtime logic if with or without JS, both on the client, and handling the form post on the server
#
Loqi
[preview] Tantek Çelik
#
[tantek]
unless you're literally building a real-time game, I don't think a SPA-only approach is ever appropriate. even for supposed "WebApps" like document collaboration etc. (e.g. MediaWiki is document collab and can work via form submissions)
#
gRegor
what is spa
#
Loqi
A single-page application (SPA) is a web application or web site that fits on a single web page with the goal of providing a user experience similar to that of a desktop application https://indieweb.org/SPA
rrix, geoffo, rrix_ and bterry joined the channel