#microformats 2020-09-13

2020-09-13 UTC
[tw2113], gRegorLove, [Emma_Humphries] and [chrisaldrich] joined the channel
#
GWG
Okay. I think I documented everything.
#
[chrisaldrich]
GWG++ for organizing, hosting, and documenting
#
Loqi
GWG has 12 karma in this channel over the last year (142 in all channels)
14WAADUQT, [asuh], [schmarty], [tantek] and [chrisaldrich] joined the channel
gRegorLove and [frank] joined the channel
#
[tantek]
GWG++ thank you! Catching up on the first part I missed 🙂
#
Loqi
GWG has 13 karma in this channel over the last year (143 in all channels)
[tantek] and cjk101010_ joined the channel
#
ben_thatmustbeme
the u-photo with alt text may have some other much more prevelent issue we hadn't considered.... it was assumed that the parser would parse alt text as the text value
#
ben_thatmustbeme
specifically i am finding multiple people who make an author tag with p-name on a div that contains a p-photo with alt="<their name>"
#
ben_thatmustbeme
so the alt text is expected to parse out to the text of a p-* > u-photo[alt] in to the textContent for the p-name to have any value
#
ben_thatmustbeme
also, i haven't found much of anyone using alt-tags in their content and many of those have alt tags that shouldn't be there... things like alt="a photo", alt="a jpeg", alt="Picture1" etc where the fault is not really on the parser at that point
#
ben_thatmustbeme
not done looking through all the examples i can yet
#
Zegnat
Loving test-driven development. Have the entire mf2 test suite loaded up now and running against my schema while I get it into tiptop shape :)
#
Zegnat
Currently 9 failures to address
#
Loqi
Zagnat has 1 karma over the last year
#
sknebel
heh, maybe Loqi needs aliases for Karma :P
#
Zegnat
https://gist.github.com/Zegnat/65ed9a9fb0546fb8c4aa0c0b790b8a40 - updated! this validates all JSON from the test suite, without allowing any properties not defined in the schema. So that also verifies there is no unexpected extra debugging output in the test suite :)
#
Zegnat
No strict validation on the rels and rel-urls objects yet. Will be working on that. There will also be a web gui to test payloads, but not sure I want to put that one public before tests are up to scratch.
jgmac1106_ and [jeremycherfas] joined the channel
#
Zegnat
rel and rels done, all tests still passing. Feel free to play with the schema. You can put https://gist.githubusercontent.com/Zegnat/65ed9a9fb0546fb8c4aa0c0b790b8a40/raw/1170ad1c3855b9b3af70a26f7bf67bc8968879d4/microformat.schema.json in to https://www.jsonschemavalidator.net/ and put any mf2 JSON next to it to (hopefully) see it pass!
#
Zegnat
Repo + simplified web gui coming later. But I also have D&D on the calendar.
#
ben_thatmustbeme
bit of silly pendentry, but the entirely empty string is marked valid
#
ben_thatmustbeme
i think at a miminumum it needs {"items":[],"rels":[],"rel-urls":[]}
#
ben_thatmustbeme
also, if it try any additional properties, we said its allowed to have other items, not related to this
#
ben_thatmustbeme
{"items":[],"rels":[],"rel-urls":[], "otherthing":[]} should be valid
#
ben_thatmustbeme
is "rels" and "rel-urls" allowed to be "", i would think it needs to be an array
#
ben_thatmustbeme
{"items":[],"rels":"","rel-urls":""} is currently valid
#
ben_thatmustbeme
i just realized you mentioned it being strict right now
#
ben_thatmustbeme
i tested a pull and parse of tantek.com and it validated fine
#
Zegnat
Yeah, I am not allowing additional properties yet, ben_thatmustbeme. Because I did not want to accidenally pass any of the test suite
#
Zegnat
rels and rel-urls should not be allowed to be empty strings. Hmmmm
#
Zegnat
Oh, I think I see what is going on. I thought the schema would auto-infer type object when I defined properties validation. But apparently it does some sort of type any. Making more explicit.
#
Zegnat
Schema updated. rels and rel-urls can only be objects. Thanks ben_thatmustbeme!
#
aaronpk
Zegnat++ ben_thatmustbeme++
#
Loqi
ben_thatmustbeme has 3 karma in this channel over the last year (4 in all channels)
#
Loqi
Zegnat has 9 karma in this channel over the last year (73 in all channels)
#
Zegnat
Entirely empty string (that is JSON "") is not valid for me ... or do you mean when you give the validator no input at all? I think that is a limitation on their part. The schema only supports a single object at root.
#
Zegnat
aaronpk: I also remembered why I first only published a schema for a single microformat object. I originally wrote the schema (and most of /microformats2-json) for Micropub validation.
#
Zegnat
Micropub, for that matter, is also prior art for creating mf2 JSON payloads without mf2 parsers involved.
#
ben_thatmustbeme
ahh, yeah, no input at all
#
aaronpk
ahh yes! Great point
#
aaronpk
Again tho it's not publishing that JSON on the web which ups the requirements for validators and such
#
Zegnat
Agreed. The schema was for validation in Sink, when people post JSON bodies to is. Making it more broad and having a live validator is nice if we want it more as a public format.
#
Zegnat
But because the Micropub spec refered to "the Microformats 2 JSON format" I started writing https://microformats.org/wiki/microformats2-json
gRegorLove and [chrisaldrich] joined the channel
#
Loqi
Zegnat has 10 karma in this channel over the last year (74 in all channels)
[tw2113], [tantek], gRegorLove, gRegorLove_, [frank], KartikPrabhu, [email096] and jgmac1106_ joined the channel
#
Zegnat
I have moved the schema into its own repo (https://github.com/Zegnat/microformats2-json-schema) and officially licensing the whole thing CC0. The simple web GUI for it will follow tomorrow (debating putting that in a separate repo, thoughts?)
#
Loqi
[Zegnat] microformats2-json-schema: A JSON Schema for verifying microformats2 JSON parser output / documents.
[chrisaldrich] joined the channel
#
[tantek]
wow Zegnat++
#
Loqi
Zegnat has 11 karma in this channel over the last year (75 in all channels)
#
[tantek]
now watching the last hour of the microformats session
#
GWG
Any new insights?