#dev 2021-07-30

2021-07-30 UTC
kimberlyhirsh[d], KartikPrabhu, [snarfed], alex11, [tantek], [jgmac1106], moose333, [jeremycherfas]1, capjamesg, angelo and hendursa1 joined the channel
#
petermolnar
parsing HTML with regex is fun though, because it's one of the simplest ways to summon a Lovecraftian Outer God
#
Zegnat
In the case of JSON-LD, it might be safe enough though. As you are not really looking to parse HTML per se. Just looking for a JSON blob delimited with <script> and </script> strings?
alex_ joined the channel
#
petermolnar
that is not that simple though in my opnion. One is supposed to add `type="application/ld+json"` with that `<script>` but what if the json block is inside ordinary javascript?
capjamesg joined the channel
#
petermolnar
in theory one could get all <script(?:[^>]+)>(.*)</script>, but then what?
#
Zegnat
"if the json block is inside ordinary javascript" then it is not a JSON-LD island. So when you grab the script tags, you can run whatever is inbetween them through a JSON parser, and if that does not work, it was not a valid JSON-LD island.
#
Zegnat
Sure you could add the type attribute for the string match. I am just saying string matches might actually be completely fine if all you want is JSON-LD islands and are not at all interested in the fact that it happens to be HTML they are inside of :)
#
petermolnar
the world should have stuck to XML; that way we'd have a single data exchange format, and not multiple of them embedded in eachother.
#
[tantek]
petermolnar, at least they're not publishing data in CSS syntax 🙂
#
capjamesg
I am using extruct for json-ld parsing for a side project.
#
capjamesg
It's going well.
#
capjamesg
I had never heard of it up until now but it does quite a bit of structured data parsing.
#
capjamesg
extruct is not perfect but worth a look.
^ilhalmer and eco_ joined the channel
#
@kevinmarks
↩️ Webmention is the way to do this if you don't connect it to twitter.
(twitter.com/_/status/1421101410184306692)
hendursaga joined the channel
#
[tantek]
KevinMarks, gotta check the year on those tweets before replying 😂
#
[tantek]
I kinda wonder if that could also be part of an authoring UI, like providing a bit of reply-context heads-up (author, date of original) when you're composing a reply
#
[tantek]
or even a warning the way that Guardian articles provide warnings about how old an article is if it's more than a year old
#
capjamesg
The "historical workaround" on the top answer on that Stack Overflow post is great for syncing photos from iPhone.
#
capjamesg
Seriously.
#
capjamesg
The best method I have seen.
#
[tantek]
what is iOS
#
Loqi
iOS is the operating system that runs on the Apple iPhone, iPad, and iPod Touch https://indieweb.org/iOS
#
capjamesg
And that's all 9,000+ photos copied over to my desktop.
#
capjamesg
(desktop computer, not my actual desktop folder!)
#
Loqi
capjamesg has 4 karma in this channel over the last year (5 in all channels)
#
[tantek]
capjamesg++ awesome! could you write up a short "How to Export" section for how you did that on /iOS ?
#
capjamesg
tantek done!
capjamesg joined the channel
#
[KevinMarks]
you do slow web your way…
#
Murray[d]
I really like the idea of a warning about responding to something over a certain age; I know some forums used to show a warning if you responded to a thread over a preset age (it had a term to do with graves or tombstones that I cannot recall now...)
#
sknebel
Necroposting
#
Murray[d]
👏 that definitely rings a bell
#
[KevinMarks]
the guardian changes it's article preview images to include the year and month if they're old
[aciccarello] joined the channel
#
[aciccarello]
That's smart considering how twitter sharing often loses all context
[jacky], [tw2113_Slack_], capjamesg, KartikPrabhu, [fluffy], alex11 and [snarfed] joined the channel
#
[snarfed]
experimenting with migrating bridgy and granary and friends from https://oauth-dropins.appspot.com/ to either https://github.com/authlib/loginpass or https://github.com/python-social-auth/ . oauth-dropins has had a good run, but never saw a ton of uptake, probably because it's webapp2 and Google Cloud Datastore specific, and owning that part myself doesn't really add any value
Jimmy and KartikPrabhu joined the channel
[Adnan_Onart] joined the channel