#microformats 2023-01-30

2023-01-30 UTC
[tantek], ur5us, gRegorLove__, [snarfed], [fluffy] and greenfork joined the channel
#
greenfork
Hi, I have read several pages linked on microformats.org and I still don't understand what the problem is that microformats attempts to solve. Could someone give me a link explaining the problem?
#
greenfork
I found some valueable pieces here: https://microformats.org/wiki/get-started. I think it would be good for general understanding to put some of this content to the front page
IWSlackGateway, [tantek], [aciccarello], sebbu2, [KevinMarks], sivoais, [snarfed] and [dave] joined the channel
#
[dave]
@greenfork it's a way to mark up data in web pages so that it's consumable by a variety of services and tools without having to resort to proprietary tools and silos.
#
[dave]
Like in theory I could use http://microformats.org/wiki/h-recipe to specify data in an HTML page with my grandma's 'Party Potatoes' recipe and then anyone with a Chrome extension that understands h-recipe format could show a notification blip and let me click a button to save it to a bookmark or list or something
#
Loqi
[preview] Tantek Çelik
#
[dave]
(Note: I found out very quickly that my grandma's 'party potatoes' are called 'funeral potatoes' in other regions, and then in fact recalled that she only ever made them for wakes.)
#
[snarfed]
should mf2 parsers convert relative links inside `e-content` to absolute? right now eg php-mf2 does, mf2py doesn't. https://github.com/snarfed/bridgy-fed/issues/390#issuecomment-1408879534
#
Loqi
[preview] [snarfed] This isn't looking easy, at least with the tools I have. mf2py fully qualifies URLs it hoists out of content, eg in mf2 properties and rel URLs, but not inside `<a>` tags in HTML `e-content`. BeautifulSoup doesn't either. So I'd need to do it myself,...
#
[tantek]
Oooh @snarfed I think that’s a great question for e-* parsing and if the spec doesn’t already say so, it should.
#
aaronpk
is that not mentioned in the spec?
#
[tantek]
And yes I don’t see how to make it useful in practice without explicit relative URL handling, with base etc
#
[tantek]
Unintended omission aaronpk
#
aaronpk
i wonder why php-mf2 implemented it then
#
[tantek]
Since we already have at least one implementation, let’s file an issue to get this fixed asap
#
[tantek]
Because it’s necessary in practice
#
[tantek]
Makes sense
#
[tantek]
Probably because barnabywalters was eating his own cooking
#
[tantek]
[snarfed] can you file an issue for me to add that? And let’s get other parser devs opinions
#
[tantek]
Called it, it was barnaby
#
[snarfed]
Thanks all, will do
#
Loqi
[preview] [willnorris] #38 resolve relative URLs in e-* html
#
Loqi
[preview] [snarfed] #181 Resolve relative URLs in e-* HTML content
#
[KevinMarks]
I have done this elsewhere (and the reverse, for post processing spiderpig'sites)
#
[tantek]
[snarfed] would relative URLs as-is allow creating relative to the reader tags links?
#
[tantek]
Not that that’s enough if a use-case to justify keeping it
#
greenfork
[dave]: Thank you for your answer. Do you personally have any use cases for this? In your example you said "in theory", I wonder if anyone uses it in some interesting way
#
greenfork
I would naturally first construct something in JSON, and then generate HTML based of this
#
[snarfed]
[tantek] hah, sure, at least inside unstructured HTML content, but that's a pretty obscure use case
#
[snarfed]
and maintaining it would be as brittle as scraping
IWSlackGateway and [tantek] joined the channel
#
[tantek]
Yeah. Way too fragile.
[dave] joined the channel
#
[dave]
@greenfork there used to be a chrome extension that allowed you to save contacts from people's pages with that markup, but it looks like the extension has been disabled by chrome and needs to be updated.
#
[dave]
https://github.com/beatonma/microformats-reader -- the website for it isn't even there anymore and it doesn't work currently
#
Loqi
[preview] [beatonma] microformats-reader: A browser extension that brings the Indieweb to the surface.
#
[dave]
There's another one just called Microformats but it has an error and says 'This extension violates the Chrome Web Store policy." and I'm not sure who made it
#
aaronpk
paprika can import recipes from sites using h-recipe
[KevinMarks] joined the channel
#
[tantek]
starting from JSON sounds weird. is that really your primary type of content that you post? I would have expected text or photos.
[snarfed], ehmry, jamietanna, ur5us and [aciccarello] joined the channel
#
[aciccarello]
On my feeds, my posts are wrapped in a link. Since the wrapper is a link I can't have another link inside to point to the author card. Is there a way to reference the h-card inside an h-entry without href?
#
[aciccarello]
`<a class="h-entry u-url mdc-card disable-link-styles" href="/posts/2022/03/30/post-slug/">...</a>`
[jacky] and jamietanna joined the channel
#
[aciccarello]
I guess I can use a data element `<data class="u-author" value="/" />`
#
[jacky]
VCP strikes again
#
capjamesg
What is VCP?
#
capjamesg
[] [] pattern?
#
capjamesg
value class pattern?
[schmarty] joined the channel
#
[jacky]
Yeah! my fault shoulda expanded that
#
[aciccarello]
Hm, adding the data element caused the post URL to disappear from the mf2 parsing
#
[aciccarello]
Apparently combining h-entry and u-url isn't great.
#
[KevinMarks]
I think that would nest the h-entry under the url property of the container. If you want the url inside the entry you need a contained element
#
[tantek]
combining h-* and property class names on the same element does NOT mean the property applies to the root. pretty sure there's an FAQ on that
#
[tantek]
such properties apply to the ancestor, and the root h-* mentioned there becomes a *value* of that property
#
[tantek]
that's how you embed items
#
[jacky]
Like in the same element?
#
[jacky]
Do you know that FAQ link? Trying to make sure this case is covered in the Rust parser
#
[tantek]
yes jacky, the classic example of this is h-entry > p-author h-card
#
[tantek]
the p-author belongs to the h-entry parent, not the h-card on the same element
#
[tantek]
same with "u-url h-entry" as aciccarello wrote above
#
[tantek]
that u-url belongs to the ancestor h-* root from that point upward, not that h-entry on the same element
angelo, [chrisbergr] and [Caleb_Hearth] joined the channel