#microformats 2021-12-08
2021-12-08 UTC
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?
# 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
gRegorLove_, [Paul_Walk], kimberlyhirsh[d], [KevinMarks], gRegorLove__, KartikPrabhu and [aciccarello] joined the channel
[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.
# 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.
# 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.
# 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`.
rektide joined the channel
# btrem Maybe I don’t understand webmention. :-o
# btrem Got that part, right.
# btrem But not all links are intended to be webmentions, are they?
# btrem Ah, ok, yeah I didn’t get that part.
# 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
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`.
# btrem aaronpk++
# btrem Thanks for the explanation.
# 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 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.
# btrem Yes, that’s it.
# btrem Here’s a link: https://btrem.com/2021/11-yellow-squash-rating
# 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.
# btrem Making processors do more work is better than making authors do more work.
# btrem Hmm, I’m trying to work out your page. Please give me a bit of time to figure it out. :)
# btrem Is your post an `in-reply-to`?
# @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.
# 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.
# 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.
# 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?
# btrem Yes.
# btrem Right now, it doesn’t recognize the webmention at all!
# 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?
# 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*!
# 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.
# 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