#microformats 2018-03-14

2018-03-14 UTC
[tantek], [cleverdevil] and tantek joined the channel
#
tantek
so much logs
#
KartikPrabhu
tantek: there was a lot of VCP datetime discussed would be great to have your input
#
tantek
did anyone summarize into questions?
#
KartikPrabhu
I can try
#
KartikPrabhu
according to http://microformats.org/wiki/value-class-pattern#Basic_Parsing if there is only one value element then the datetime value is parsed as usual i.e.
#
KartikPrabhu
so <span class="dt-published"><abbr class="value" title="humdinger"></abbr></span> would give published = ["humdinger"]
#
Loqi
Value Class Pattern
#
KartikPrabhu
but if the date is specified using many value element then it switches to http://microformats.org/wiki/value-class-pattern#Date_and_time_parsing which then checks for validity of the date and time
#
Loqi
Value Class Pattern
#
KartikPrabhu
so sometimes the datetime validity is checked and other times it isn't
#
KartikPrabhu
so the question was basically: why do such complicated VCP parsing for datetimes at all
#
tantek
not complicated, conservative
#
KartikPrabhu
yes that is what I thought
#
tantek
and in short, to increase data quality when using VCP which because it adds multiple elements, may be more fragile
#
KartikPrabhu
VCP seems to exist mostly for some backcompat reasons no?
#
tantek
it's to better match existing markup on the page
#
tantek
without requiring invasive markup rewriting
#
tantek
and second, to increase DRY
#
KartikPrabhu
but then why not check validity of the example <span class="dt-published"><abbr class="value" title="humdinger"></abbr></span> would give published = ["humdinger"] ?
#
tantek
that's a good why question to note up front
#
tantek
yeah, single value dt-* parsing should also be conservative
#
tantek
checks
#
KartikPrabhu
so parsers should check validity of any dt-* property and ignore if not valid?
#
Loqi
Value Class Pattern
#
tantek
"For all date time properties (as defined in their respective microformats specifications), the following rules apply in addition to (and in some cases replacing) the above value class pattern parsing rules. "
#
Loqi
Value Class Pattern
#
KartikPrabhu
the date-time parsgin in only triggered on multiple value descendents
#
KartikPrabhu
otherwise 2 applies
#
Loqi
Value Class Pattern
#
tantek
which, since it comes later, it adds more details, to "Basic Parsing"
#
Loqi
Value Class Pattern
#
KartikPrabhu
otherwise it is never triggered
#
KartikPrabhu
3.2 is the only place that sends you to "datetime parsing rules" and 3.2 is only triggered when "multiple descendents "
#
tantek
KartikPrabhu: no that's a misunderstanding
#
tantek
3.2 is only in contrast to 3.1
#
tantek
not to all of basic parsing
#
Loqi
Value Class Pattern
#
KartikPrabhu
oh then that is confusing
#
KartikPrabhu
Zegnat thought only 3.2 triggered the date time parsing rule
#
KartikPrabhu
because that shows up as a substep of 3
#
Loqi
Value Class Pattern
#
tantek
because 3.2 needs to contrast with 3.1
#
tantek
that's the "only" aspect, in that context
#
tantek
not any broader context, and assuming so is an error (unfounded)
#
tantek
whereas http://microformats.org/wiki/value-class-pattern#Date_and_time_parsing is at the same level in the spec as "Basic Parsing" and thus has just as much weight
#
Loqi
Value Class Pattern
#
KartikPrabhu
maybe better to have a 2.5 which says the same thing as 3.2 ?
#
tantek
no it should be 1.5
#
KartikPrabhu
this is fine since both phpmf2 and mf2py interpret it as what you are saying
#
KartikPrabhu
aah yeah 1.5 is also fine
#
tantek
yes that would be clearer and perhaps reduce that one chance of confusion
#
KartikPrabhu
wait you mean 5 not 1.5
#
Loqi
[kartikprabhu] #24 Parsing <noscript> tags
#
tantek
no I mean 1.5
#
tantek
because once you know it is dt-* property, stop treating it like it is not
#
KartikPrabhu
are you using decimals instead of list numbering ;P
#
tantek
haha yes
#
Loqi
haha
#
KartikPrabhu
yeah adding that would be clear. and also parser compatible with phpmf2 and mf2py
#
tantek
I should probably note that that page is under change control like mf2-parsing
#
tantek
since it is a required part of mf2-parsing
#
Loqi
Value Class Pattern Issues
#
tantek
sigh ok
#
Loqi
definitely
#
Loqi
Value Class Pattern Issues
#
tantek
KartikPrabhu: can you file an issue to track that? re: move "Basic Parsing" 3.2 somewhere earlier in that algo to conform to publishing expectations and parser interop
#
tantek
and perhaps cite this thread
#
Loqi
[kartikprabhu] #26 vcp: Clarify VCP datetime parsing
KartikPrabhu and [cleverdevil] joined the channel
#
imran87h
edited /code-tools (-1) "www.eblogmedia.com"
(view diff)
tantek, [miklb] and nitot joined the channel
#
gRegorLove
tantek: Hah, that edit^ is spam in the revision comments, not in the page :)
#
Loqi
[gRegorLove] #27 vcp: Clarify ordinal dates in parsed result
#
Zegnat
sknebel, I see you closed https://github.com/microformats/microformats2-parsing/issues/11 but did that require any clarification in the spec to make sure new implementers do not create conflicting parsers again?
#
Loqi
[sknebel] #11 backcompat child of mf2 root
[tantek] joined the channel
#
Zegnat
KartikPrabhu, thanks for opening that issue 26! I just left a comment to try and explain where my thought process was coming from
#
sknebel
Zegnat: feel free to propose a clarification! Since everyone agreed on the reading and I didn't have good idea for a change, I considered it enough
#
Zegnat
Oh darn I missed that after my deep dive into what I considered vague. I’ll think about how I would phrase the clarification in the parsing spec :)
#
Zegnat
Oh. Wait. You meant on #11 and not on #26?
#
sknebel
my brain isn't awake enough for 25/26
#
Zegnat
After rereading, yeah, I think it is fine as is. It is probably overkill to explicitly state that “microformats” always means “"h-*" or backcompat roots”.
[kevinmarks], Kyle-K and Garbee joined the channel
#
aaronpk
https://pin13.net/mf2/ is updated to 0.4.0!
#
aaronpk
xray.p3k.io is updated too! look how nice this checkin with no p-name looks now :D https://xray.p3k.io/parse?url=https%3A%2F%2Fdavid.shanske.com%2F2018%2F03%2F04%2F1821%2F
#
@swentel
Tagged the first alpha release of the Indieweb module for Drupal 8. Includes webmentions, publishing, microformats, comment creation and micropub. Let's get the party started! https://www.drupal.org/project/indieweb #indieweb #drupal (https://realize.be/notes/1245)
(twitter.com/_/status/973910639537254400)
#
Zegnat
Discuss, is this example microformats object in JSON valid? https://www.w3.org/TR/micropub/#nested-microformats-objects-p-6
#
Zegnat
It does not pass my schema (https://gist.github.com/Zegnat/65ed9a9fb0546fb8c4aa0c0b790b8a40) because the nested microformats do not have a separate plain text “value” property.
#
aaronpk
that's true
#
Zegnat
I am not sure if the value is a hard-required property. I treat it as one. You can obviously get one when you are parsing from HTML. But Micropub is a little different in that you are authoring the mf2 object directly.
#
aaronpk
wow are you making a json schema for just the mf2 syntax?
#
Zegnat
That’s what I did. Yes.
#
Zegnat
I think it is complete. This was one of the few things that I noticed during random testing to not pass.
#
Zegnat
I am thinking about running it against all JSON files in the test suite
#
Zegnat
Or ... almost did. I think I didn’t include the rels for now.
barpthewire, nitot and [kevinmarks] joined the channel
#
[kevinmarks]
that example using summary instead of name feels a bit off
#
aaronpk
why? it's not a named post
#
aaronpk
name should be user-authored, but summary is okay to be machine-authored
#
Zegnat
Summary seems fine there, it is a summary of the rest of the object. The question is if your server is going to do anything with an h-entry lacking both name and content, but that’s up to the different implementations
#
[kevinmarks]
ah, I think of it as name is short, summary is medium, content is long, and we did have it so that there was almost always a name becasue of implied name.
#
[kevinmarks]
your distinction makes sense too
nitot, [cleverdevil] and tantek joined the channel
#
Zegnat
[cleverdevil], if you have any thoughts after working on tests and schemas I would love to get your opinion here: https://github.com/microformats/microformats2-parsing/issues/22
#
Loqi
[Zegnat] #22 Is there a definitive version of a type array?
CaseD[m], [pfefferle], [eddie], nitot and [tantek] joined the channel
#
[tantek]
Summary is also used for fallback behavior
nitot, [eddie], tantek and [cleverdevil] joined the channel
#
sknebel
I have a question about nested microformats
#
sknebel
the last step in determining the "value" is " else use the parsed property value per p-*,u-*,dt-* parsing respectively " - does that mean just applying the algorithm as if the h-* for the nested microformat didn't exist and put the result of that into "vlaue"
#
tantek
that sounds right
#
sknebel
ok. that got lost in the php-parser when reducing the implied p-name, probably because before there always was one
#
sknebel
filing bug
[pfefferle] and rodolfojcj joined the channel
#
tantek
sknebel: a-ha I could see that
#
tantek
since it's a very similar algo
#
Loqi
[sknebel] #151 "value" of nested microformats when no matching property exists
[eddie] joined the channel
#
KartikPrabhu
looks good on mf2py
[cleverdevil] joined the channel
#
tantek
hey has anyone looked at doing a Rust mf2 parser?
#
tantek
highly recommended as something you could submit to https://foundation.mozilla.org/opportunity/global-sprint/
#
sknebel
hah, we talked about that just today
#
sknebel
cc Zegnat
#
tantek
sknebel: worth starting a stub page about
#
sknebel
not sure, was more like "could do that", "not sure Rust is the most pressing candidate there, others would probably be more useful" ;)
#
KartikPrabhu
is there a HTML parser in Rust already? otherwise one would ahve to build that
#
sknebel
since Mozilla is building a browser in Rust I assume they have a HTML parser, or at least bindings for one
#
sknebel
question is more if people would build mf-consuming things in Rust
#
tantek
yes there is Servo - Mozilla's browser engine project written in Rust
#
sknebel
(I've seen some people experiment with it for webservices, but my general assumption would be that few will take that path since it seems kind of overkill)
[kevinmarks] joined the channel
#
KartikPrabhu
tantek: vcp question if free
#
KartikPrabhu
or anyone for that matter
#
tantek
KartikPrabhu: based on a real world example?
#
tantek
or theoretical?
#
KartikPrabhu
here the "value" element is a descendent but not a child so phpmf2 (and mf2py) don't seem to parse it violating to VCP rule http://microformats.org/wiki/value-class-pattern#Basic_Parsing 2.
#
Loqi
Value Class Pattern
#
KartikPrabhu
tantek: modification of an example in the VCP parsing
#
tantek
LMK when you link to a real world publishing example that is trying to use that
#
KartikPrabhu
then I guess not many things use much of VCP anymore
#
tantek
there's plenty
#
tantek
my point is to act upon empirical data, rather than attempting to manufacture data
#
tantek
because the latter methodology will result in unending work for very little benefit
#
KartikPrabhu
I for one have not seen much of any VCP in indieweb usage that my site encounters
#
gRegorLove
KartikPrabhu, pin13.net/mf2/ has v0.4.0 now btw
#
KartikPrabhu
!tell tantek: here you go simplified real world example http://pin13.net/mf2-dev/?id=20180314234440988 from http://microformats.org/wiki/events/2009-06-26-microformats-4th-bday#summary. note the dtstart is not parsed
#
Loqi
Ok, I'll tell them that when I see them next
[tantek] joined the channel
#
KartikPrabhu
mf2py gives start = ["06"]
#
KartikPrabhu
not sure which is correct
#
gRegorLove
YYYY isn't valid for the date part
#
KartikPrabhu
yes I know
#
KartikPrabhu
I think phpmf2 is doing the correct thing
#
KartikPrabhu
according to spec but not according to intention of the markup
#
gRegorLove
I wonder what the state of VCP was when that wiki vevent was authored
#
KartikPrabhu
who knows. it is an example in the wild though :P
#
Loqi
[kevinmarks] #84 remove nonexistent microformats