2020-05-12 UTC
[chrisaldrich], [benatwork], [KevinMarks], [prtksxna], [snarfed] and [jgarber] joined the channel
# 03:39 Loqi [jgarber623] #50 `rel-urls` Parsing Issues
[tantek] joined the channel
gRegorLove_ joined the channel
# 03:51 [jgarber] [tantek] Thanks! Just posted a follow up comment as well with an additional example.
# 03:52 [jgarber] [gRegorLove] Thanks for the comment on the issue, too. :thumbsup::skin-tone-2:
KartikPrabhu, gRegorLove_ and [aimee] joined the channel
# 07:24 [aimee] Thanks [jgarber] for the rel issue - I found this very ambiguous while implementing a parser this weekend
# 07:25 Loqi [aimee-gm] microformats-parser: A JavaScript microformats parser
# 07:25 [aimee] I say “finished” - I got it to the point where the test suite passed (v1, v2 and mixed) and published to npm
[LewisCowles], gRegorLove_, [jgmac1106], KartikPrabhu, [prtksxna] and [jgarber] joined the channel
# 13:35 Loqi [jgarber623] micromicro: A Ruby gem for extracting microformats2-encoded data from HTML documents.
# 13:42 cjw6k congratulations jgarber, on the first release of your new parser!
# 13:46 [jgarber] cjw6k: Thanks! It’s very rough around the edges. Feedback and ideas are definitely welcome and appreciated.
[LewisCowles], [tw2113], KartikPrabhu and [tantek] joined the channel
# 14:41 Loqi [aimee] has 3 karma over the last year
[prtksxna] joined the channel
# 15:21 cjw6k whoa two new parsers - congratulations aimee!
[jgarber] joined the channel
# 15:49 [jgarber] [aimee] Are you looking for any feedback or help on your new parser?
cal joined the channel
# 16:10 [jgarber] I’m looking at a part of the microformats2 parsing specification regarding child elements where those child elements have both a property class and a root class name.
# 16:10 [jgarber] I can’t find a test case for this in the test suite and can’t conceive of a use case where an `e-*` property also has a root class name.
# 16:10 [jgarber] In that case, a parser adds the element as a hash `{ }
` and follows the rules for populating that hash with the addition of a `value` key.
# 16:10 [jgarber] > else if it’s an `e-*` property element, re-use its { }
structure with existing `value:` inside.
# 16:10 [jgarber] My question is, are there any examples that match this case?
[KevinMarks] joined the channel
[tw2113] and KartikPrabhu joined the channel
# 16:24 sknebel Could see it with a h-cite where you want to preserve the hypertext content
# 16:34 [jgarber] I’m mostly curious what the expected JSON output of something like the above would be (since there doesn’t seem to be a test covering this).
# 16:35 sknebel True. Don't know a really convincing example right now. For q test, maybe just use clearly made up names to avoid confusion
# 16:35 sknebel [jgarber]: propose a test and we'll see if others and other parsers agree?
# 16:36 [jgarber] The microformats.io parsers seem to agree on output but it doesn’t square with my interpretation of the spec. 😭
gRegorLove_ joined the channel
# 16:43 [jgarber] My interpretation for setting the value of the `properties > content > value` key:
# 16:43 [jgarber] > else if it’s an `e-*` property element, re-use its { }
structure with existing `value:` inside.
# 16:43 [jgarber] …would wrap the `value` and `html` keys from the above JSON:
# 16:57 sknebel [jgarber]: I meant on github :D but yes, I'd agree with your reading
# 16:57 sknebel that microformats2-json page was an attempt by Zegnat to document it for e.g. micropub implementers if I remember right
# 17:04 sknebel and actually, after re-reading the spec I'm not sure about which interpretation the spec means anymore...
# 17:05 sknebel but this is clearly an edge case we don't actually use in practice
# 17:07 [jgarber] The spec (to me) reads as `"value": { "html": "…", "value": "…" }
`, but that microformats2-json wiki page documents the behavior exhibited by existing parsers of flattening `"html": "…", "value": "…"` .
# 17:08 sknebel I think the "reuse" is meant to refer to the new {} opened
KartikPrabhu joined the channel
# 17:24 [jgarber] Looks like I pulled that from the python.microformats.io parser result
# 17:30 Zegnat I wasn}t around, but I see my name, u-oh. What up?
# 17:33 [jgarber] Currently sorting through nested objects in JSON output, specifically around handling `e-*` properties.
# 17:33 [jgarber] It squares parsing specification ambiguity/murkiness with existing parser behavior.
# 17:34 [jgarber] …but lacks (by design, I suppose) the authority of the parsing specification. 😄
# 17:34 Zegnat It is there to make the JSON format possibly more clear. So people can graps just the JSON format without having to read how a parser comes to that result
# 17:35 Zegnat Just like the JSON Schema and the object Validator linked in the See Also section of that page
# 17:35 Zegnat Not sure what edge case there is for nested e-* objects though..?
# 17:40 [jgarber] The delta between my interpretation of the parsing specification with regards to determining the `value` key’s value vs. existing parser implementations and what’s documented on the microformats2-json wiki page.
# 17:42 [jgarber] I’m happy to put a pin in this one. Between the parsing spec, the microformats2-json wiki page, and existing implementations, there’s enough consensus for me.
# 17:44 Zegnat I may have written the json page based on the parsers. Could still be the parsers are wrong, hehe.
# 17:50 sknebel [jgarber]: if you can come up with a good rewording of that section so that you'd have understood it as the parsers do, an editorial change there might make sense
# 17:52 Zegnat I should have an actual output example of the e-* property on the -json page, maybe.
# 17:53 Zegnat Writing documentation is hard. So many notes on that document about already outdated sections
# 17:53 Loqi documentation has 1 karma in this channel over the last year (3 in all channels)
[aimee] joined the channel
# 17:57 [aimee] [tantek] no blog post yet, that’s something for the weekend perhaps. Was just happy to get it released
# 17:57 [aimee] [jgarber] yes and yes to feedback and help!
# 18:12 [aimee] Also congratulations on your parser too [jgarber]. I originally went down the route of being opinionated to v2 but realised that v1 was a challenge so I did it 🤦♀️
# 18:18 Loqi [jgarber] has 2 karma in this channel over the last year (6 in all channels)
# 18:18 Loqi [aimee] has 4 karma over the last year
# 18:18 sknebel we need to see that we get them added to microformats.io
# 18:18 [aimee] Also thank you for your help already [jgarber]
# 18:18 Loqi [jgarber] has 3 karma in this channel over the last year (7 in all channels)
[LewisCowles], [tim038] and [Sadik_Shahadu] joined the channel
# 19:38 Loqi [jgarber623] #51 Parser output for elements with property class and root class names?
gRegorLove_ joined the channel
# 21:36 Loqi [aimee] has 5 karma over the last year
[grantcodes] joined the channel