#microformats 2021-12-08

2021-12-08 UTC
#
gregorlove
edited /app-examples (+10) "/* indiebookclub */ p-summary"
(view diff)
ur5us, Seirdy, KartikPrabhu, gRegor, umleaozinho and [Sean] joined the channel
#
@sosuisen_net
microformats は特定の問題領域において慣習的となった div や span 要素の class 属性の利用パターンを意味的なマークアップとして取りまとめてゆこう、ということだったと思います。 アプローチには今も共感できます。 http://microformats.org/
(twitter.com/_/status/1468448380875841538)
#
@sosuisen_net
microformats にしても div へ別途意味づけをするのは利用ありきですよね。映画の個人レビューサイトがみな h-review で定義された class を使っていれば、スクレイピングで集計できるわけです。 タグはコンテンツの分類や検索の便をはかるもので。
(twitter.com/_/status/1468456480924143620)
gRegor, ben_thatmustbeme, gRegorLove_, Seirdy and btrem joined the channel
#
btrem
Webmention question: if I have an h-review with a link to another page, is that a webmention?
#
aaronpk
A webmention is a notification of a link between two pages
#
btrem
Right. So I have a page that is an h-review of another page, an h-recipe. The h-review has a p-item that is set to h-review, and has a url pointing to that h-recipe page.
#
btrem
But when I send a webmention to webmention.io, with source set to the h-review, and target set to the h-recipe, webmention.io reports:
#
btrem
“The Microformats at the source URL do not contain a link to the target URL. Check the source URL in a Microformats parser such as php.microformats.io”
#
btrem
I’m looking at the webmention.io github readme: “The full list of recognized properties is below:
#
btrem
in-reply-to like-of repost-of bookmark-of mention-of rsvp”
#
btrem
So I suppose my source must have one of those properties. That is, being an h-review, with a microformats p-item u-url set to the target, is not enough.
jamietanna joined the channel; btrem left the channel
#
aaronpk
Ahh yeah it's more picky about it than it should be
#
aaronpk
what it should be doing is falling back to the HTML and ignoring the microformats if it doesn't recognize the vocab
#
aaronpk
Which is what I thought it already did but I guess not. Feel free to open an issue on the repo
gRegorLove_, [Paul_Walk], kimberlyhirsh[d], [KevinMarks], gRegorLove__, KartikPrabhu and [aciccarello] joined the channel
#
[fluffy]1
Isn’t mention-of just the fallback for if none of the other 5 are there and not an actual microformat class?
#
[fluffy]1
I think this is a thing which keeps on causing perpetual confusion because 5 of those are microformats and mention-of is just a webmention.io intrinsic.
#
aaronpk
yes, "mention-of" is part of the webmention.io API
#
aaronpk
but it should be recognizing the webmention even if it doesn't register one of the vocabularies
#
[fluffy]1
Ah, I see.
[calumryan] and btrem joined the channel
#
btrem
I’m not sure I follow. aaronpk says webmention.io “should be doing is falling back to the HTML and ignoring the microformats if it doesn't recognize the vocab.” But h-review is a microformat. So does webmenions.io not recognize h-review? Hmm, now that I think about it, probably not.
#
aaronpk
that is my suspicion yes
#
btrem
It would have to find the u-url property, then traverse up the tree to see if there’s a parent mf root property like h-review. The other properties are direct links.
#
btrem
I think maybe I should suggest another property, review-of, in webmentions.
#
aaronpk
no i don't think that's the solution
#
btrem
Well, how else could it work? The other option would be requiring webmention processors to process the source, not just for links, but for the elements that contain links. IOW, it would, I think, require a lot more work for processors.
#
aaronpk
webmention shouldn't drive the markup
#
btrem
Ok, but how else can it work? It would, ISTM, change the way webmentions works. A webmention for a review would look and behave differently than other webmentions, which could lead to confusion for everyone involved.
#
btrem
And I don’t think it is driving the markup. An h-review author might or might not want to create a webmention. Having a property like review-of would give authors control over that decision.
Kaja_ joined the channel
#
btrem
I suppose a workaround could be to add `mention-of` to my h-review u-url. But then webmention would return a `mention-of`; that is, I’d have to figure out how to distinguish `mention-of` and `mention-of`/`h-review`.
#
aaronpk
hold on, this is a bug in webmention.io. it should accept a webmention from a page that has a link to another page regardless of what microformats are on the page
rektide joined the channel
#
btrem
Maybe I don’t understand webmention. :-o
#
aaronpk
webmention is a notification that one page links to another
#
btrem
Got that part, right.
#
aaronpk
*if* the linking page has microformats, then the webmention receiver can use those to augment the display of the webmention
#
btrem
But not all links are intended to be webmentions, are they?
#
aaronpk
they can be, and nobody can stop them from being
#
aaronpk
anyone can send a webmention if one page links to another, not just the author of the page
#
btrem
Ah, ok, yeah I didn’t get that part.
#
aaronpk
so think of it as making sure your page has the right microformats markup that properly expresses the relationship between it and any links on the page
#
btrem
So `in-reply-to` et. al. are ways for authors to /augment/ webmentions, not a way to create them.
#
aaronpk
right, and they have uses outside webmention too, like in readers
#
btrem
So what is the purpose of `mention-of`? How does that augment a webmention? Or, to put it another way, what’s the difference between a page that links to another page with `mention-of` and a page that links without it?
Saphire joined the channel
#
aaronpk
so, webmention.io has an API to retrieve all the webmentions it's received for your account or your web pages
#
aaronpk
i made that API match the microformats vocab as close as I could
#
aaronpk
but if there are no microformats, or unknown microformats, then it falls back and presents the link in a "mention-of" property
#
aaronpk
because a webmention can still be valid even without microformats markup, so i wouldn't want to just not return those pages in the API
ur5us joined the channel
#
btrem
Ah. In that case, there’s no need for an author to add `mention-of` to a link. In the absence of any classes, the webmention will be defined as `mention-of`.
#
aaronpk
exactly
#
btrem
aaronpk++
#
Loqi
aaronpk has 3 karma in this channel over the last year (113 in all channels)
#
btrem
Thanks for the explanation.
#
aaronpk
that is a better way of saying what i was trying to say
#
btrem
That means, though, that the target of the webmention will not know that the `mention-of` is a review. Which is a shame.
#
btrem
And that makes me think that `review-of` /might/ be worth thinking about. Maybe.
#
aaronpk
that's just the fault of webmention.io
#
aaronpk
for not recognizing the review. adding review-of isn't going to magically solve that in webmention.io
#
btrem
No, of course not.
#
btrem
But how would a webmention processor (not just webmention.io) determine that? Are processors supposed to process the whole tree?
[pfefferle] joined the channel
#
btrem
IYSWIM, that’s different than just getting a list of links and seeing if the target link has a class that equals `in-reply-to` or what have you.
#
aaronpk
i still haven't seen what your markup actually looks like, but that doesn't sound that unusual
#
aaronpk
the top-level object is an h-review, one of the properties is p-item which may be a URL or may be an h-item with a URL that is the page being linked to
#
btrem
Yes, that’s it.
#
aaronpk
that doesn't sound that different from an h-entry with an in-reply-to
#
Loqi
[Brian Tremblay] Yellow Patty Pan Squash — Rating/Notes
#
aaronpk
so let's assume the yellow squash recipe was on my site, that looks like a perfectly reasonable page that my recipe should recognize as a review of it
#
btrem
Well, h-entry with in-reply-to doesn’t require going up the tree. You find the link to the target, see the class in-reply-to, and done. In my case, you find the target link, see that it’s u-url, then you have to start going up to find ancestor elements. If it’s p-item, then do x. If not, do y. If x, go up again, and try to find h-review. If found, do x, if not do y.
#
aaronpk
in-reply-to might also be an h-entry, not just a uRL
#
btrem
Making processors do more work is better than making authors do more work.
#
Loqi
[Aaron Parecki] you too can come visit the arctic circle where it’s -4°F/-20°C and stand outside in the literal freezing cold!
#
aaronpk
that's the exact same hierarchy as you have
#
Loqi
[Brian Tremblay] Yellow Patty Pan Squash — Rating/Notes
#
btrem
Hmm, I’m trying to work out your page. Please give me a bit of time to figure it out. :)
#
aaronpk
sure thing. it's got the full reply context expanded with markup.
#
btrem
Is your post an `in-reply-to`?
#
aaronpk
my post is a reply post, so it has an in-reply-to property
#
aaronpk
microformats properties don't dictate post types if that makes sense
#
@mluggy
↩️ הוסף microformats היכן שאפשר. מדובר בחתיכות קוד פשוטות שמתווספות ל-HTML ברמת המוצר, ביקורת, טבלה, גרף והופכת את המידע למובנה יותר. כשהוא מובנה, גוגל יבין אותו יותר, יתעדף ולפעמים גם יציג אותו בצורה אטרקטיבית יותר בתוצאות.
(twitter.com/_/status/1468693839703683072)
btrem joined the channel
#
btrem
So, aaronpk, that seems different. Your post has an explicit `in-reply-to` property; mine has no such explicit property. To put it another way, webmention.io will process my h-review as a mention-of. There’s no other way to do it. Unless it goes *up* the tree (not drilling down inside your div.h-cite.u-in-reply-to for .u-url). My difficulty with this might be due to the fact that I haven’t done a lot of html processing.
#
btrem
If were processing yours with js, it’d be easy to find in-reply-to, then find inside that u-url.
#
@mluggy
↩️ אולי זה אתר פחות מועמד לקידום (הם אמורים לדאוג לרוב הדברים בעצמם). אם זה אתר סחר, אפשר לשאול אותם אם הם מוסיפים microformats למוצרים/ביקורות. מהצד שלך, לוודא שאת משתמשת בדומיין אחד ו-sticking with it. לא מייצרת עמודים כפולים או סתם. אגב, כמה מק"טים יש? למה למכור בעצמך ולא FBA?
(twitter.com/_/status/1468696854883934211)
#
btrem
By contrast, finding my link with u-url, with no other information, then going up the tree, and trying to figure out if the link is part of something bigger, seems much harder.
#
btrem
Sorry, aaronpk, I missed your last reply.
#
btrem
You said, “microformats properties don't dictate post types if that makes sense.” How does webmentions.io determine that your post is a reply post, if not by seeing `in-reply-to`?
#
btrem
meta: my apolgies for using slash marks in attempt to emphasize something I was saying earlier. In the log, it is turned into a broken link. :( I’ll use * from now on.
#
aaronpk
btrem: your explicit property is "item"
#
aaronpk
it's part of the vocabulary of the review
#
aaronpk
just like in-reply-to is part of the vocabulary of the h-entry
#
aaronpk
Wait what do you mean HTML processing? Nobody should be processing microformats by looking at the HTML other than authors of microformats libraries
#
aaronpk
that's why I was sending links to the parsed JSON, because that's what consumers will see after running the page thru a microformats parser. No HTML
#
btrem
Ok, bear in mind that I’m *really* (see? I used asterisks this time!) new to webmentions. As you’ve no doubt seen, I’m still learning.
#
aaronpk
Sure, no worries. This should make more sense if you completely forget about the HTML markup and only look at the parsed result
#
btrem
But if there are no microformats, than a microformats parser will not produce any json, will it? (sigh) I’m confused now.
#
btrem
But at least I can see how managing a json object would be easier than an html tree.
#
aaronpk
Correct, which is why I've been saying the "mention-of" is a fallback that webmention.io uses in its API when it can't find microformats it recognizes but there is otherwise an HTML link
#
btrem
So in my case, the returned webmention will be `mention-of`, and I’ll have to determine that it’s an h-review. Have I got that correct?
#
aaronpk
Are you using webmention.io as your webmention endpoint?
#
btrem
Yes.
#
aaronpk
Then yes currently you'd need to work around the limitation that webmention.io doesn't recognize reviews of recipes, or you could file a feature request to get it added :-D
#
btrem
Right now, it doesn’t recognize the webmention at all!
#
aaronpk
That's definitely a bug then
#
btrem
And I’m still confused. You said that it looks at the json, and I should forget about the html. But earlier today, you said, “what it should be doing is falling back to the HTML and ignoring the microformats if it doesn't recognize the vocab.”
#
btrem
So does it process HTML in some cases?
#
aaronpk
Well the webmention spec is only talking about HTML, saying there should be an HTML link from the source to the target. That's the first step. Then later, the webmention receiver can decide what to do with the source page, which is where microformats comes in
#
btrem
If I were capable, I’d love to create a pr to add the feature. I’ve never written in ruby, so I don’t know if I could pull it off. But it’d be a cool thing to add to my limited resume. Err, that is, my *h-resume*!
#
aaronpk
That Interpretation step shouldn't care about the HTML because at that point the HTML link should have already been verified
#
aaronpk
(webmention.io is even more complicated because the core API is ruby but all the microformats parsing is done in PHP, so I would not recommend diving down that rabbit hole unless you want a real project)
#
btrem
Ok, thanks for the warning. Yeah, probably not something I could complete.
#
btrem
I filed an issue in webmentions github noting that it fails to see a webmention when there’s no `in-reply-to`/etc. property.
#
aaronpk
👍 I will try to get to it soon
#
aaronpk
but for now, bed time for me
#
btrem
Thanks again for the explanations. And because some things don’t go without saying, no rush on the fix. :)
Seirdy joined the channel; btrem left the channel