#microformats 2018-03-11
2018-03-11 UTC
KartikPrabhu and [kevinmarks] joined the channel
# KartikPrabhu [kevinmarks]: could you take a look at my PR https://github.com/microformats/mf2py/pull/94 most of it is doing the same upgrades as the last PR except Ihave added the new implied-name-parsing rules and updated the backcompat processing with new tests
[eddie], Garbee, [tantek], tantek, chrisaldrich, KartikPrabhu, rMdes, [jeremycherfas], barpthewire and [Vanessa] joined the channel
# @pstuifzand Implemented source queries on the micropub endpoint. This is really easy now, because of the microformats backend. (twitter.com/_/status/972834419626176512)
KartikPrabhu and webchat254 joined the channel; justme23 left the channel
# KartikPrabhu new parsing issue everyone https://github.com/microformats/microformats2-parsing/issues/24
chrisaldrich joined the channel
# KartikPrabhu I didn't even address microformats nested inside <noscript>
# KartikPrabhu I used to have one on my site but my site code has changed since then
# KartikPrabhu sknebel: if you can find examples that would be neat
# KartikPrabhu is also looking
# KartikPrabhu a lot of image lazy loading use this <noscript> technique
# KartikPrabhu right I can add more questions :P
# KartikPrabhu basically properties nested inside <noscript>
# KartikPrabhu sknebel: updated with your found example as Q5.
[snarfed], [Vanessa], [eddie] and [cleverdevil] joined the channel
# KartikPrabhu is now looking at vcp for datetime parsing
# aaronpk attempts to use github Projects to plan the 0.4.0 release https://github.com/indieweb/php-mf2/projects/1
# gRegorLove_ aaronpk: one more quick update that could go into 0.4.0 https://github.com/indieweb/php-mf2/pull/146 just needs the php55 test run again.
# gRegorLove_ oh, nice!
# aaronpk changelog is all updated too https://github.com/indieweb/php-mf2#current-master-branch
# KartikPrabhu should add changelog in mf2py
# KartikPrabhu is lost in regex land
# KartikPrabhu stomps on the lookahead
# KartikPrabhu <isgh> mf2py over-normalises datetimes! adding in "00" seconds and converting "am/pm" to 24 hour!
# KartikPrabhu gRegorLove_: does phpmf2 do that ^ ?
# KartikPrabhu or aaronpk^^
# KartikPrabhu hmm
# gRegorLove_ I think it used to, but should be fixed.
# gRegorLove_ Try examples against http://pin13.net/mf2-dev/
# KartikPrabhu basically nothing should be normalised right? everything as authored?
# KartikPrabhu but just above http://microformats.org/wiki/value-class-pattern#format_specific_details the timezones have no colon
# gRegorLove_ See my comments on the 4th block in aaronpk's requested changes (click "show outdated") https://github.com/indieweb/php-mf2/pull/131
# gRegorLove_ php-mf2 now normalizes to remove colons in TZ offset
# KartikPrabhu but they shouldn't be removed if authored
# KartikPrabhu the spec allows for colon tz
# KartikPrabhu aaronpk: yeah seconds should definitely not be added
# gRegorLove_ iirc, that normalization only happens with VCP, when we're constructing dates from other authored parts.
# KartikPrabhu aah! so in vcp the timezone does not have a colon but otherwise it does if authored
# KartikPrabhu will go with that; but first to fix this seconds stuff
# gRegorLove_ I'd need to review VCP and the tests. I don't remember offhand.
# KartikPrabhu are there any "correct" tests? :P
# gRegorLove I mean, to the spec, sure.
# KartikPrabhu the one in mf2py are wrong basically matching wrong parser behaviour
tantek joined the channel
# gRegorLove Oh, I think there's normalization of offsets like "700" to "0700" too
# KartikPrabhu oh boy!
# KartikPrabhu this is going to take longer than backcompat fixes
# gRegorLove Or "+2" to "+0200"
# gRegorLove Yeah, VCP is a lot. It's like I have to re-learn it every time I look at it.
# KartikPrabhu yeah, I have never loked at it because kylewm did :P
# KartikPrabhu gRegorLove: which according to spec tests do you use?
# gRegorLove Not sure I follow. To clarify, I meant I write tests against the spec.
# gRegorLove The specific tests are in https://github.com/indieweb/php-mf2/blob/master/tests/Mf2/ParseDTTest.php
# gRegorLove I could go either way on the TZ colon thing, but yeah it doesn't change the meaning at least.
# gRegorLove Heading out for a bit
KartikPrabhu joined the channel
# KartikPrabhu <phew> removed adding 00 seconds
[snarfed] and [kevinmarks] joined the channel
# gRegorLove Took a crack at the img alt spec update: https://github.com/microformats/microformats2-parsing/issues/2#issuecomment-372146267
# Loqi [gRegorLove] > Would someone like to take a crack at suggested minimal spec edits to implement the proposal?
On http://microformats.org/wiki/index.php?title=microformats2-parsing&oldid=66695#parsing_a_u-_property
Replace:
> * else if img.u-x[src] or audio....
# gRegorLove I think this one can be closed? https://github.com/microformats/microformats2-parsing/issues/5
# KartikPrabhu gRegorLove: aaronpk: what is going on with the dt-start here http://pin13.net/mf2-dev/?id=20180311203129053 !
# gRegorLove dangit
# KartikPrabhu :P
# KartikPrabhu I was actually testing if it picks the first found value
# gRegorLove It's just really really in -0600, ok? ;)
# KartikPrabhu which it does but then barfs somewhere else
# KartikPrabhu lol
# gRegorLove Let me see if I can make a quick fix.
# KartikPrabhu also new issue for your inputs https://github.com/microformats/microformats2-parsing/issues/25
# gRegorLove Is this a real example somewhere?
# gRegorLove Will still fix, just wondering.
# sknebel KartikPrabhu: isn't that https://github.com/microformats/microformats2-parsing/issues/4?
# KartikPrabhu oh opps! should have searched
# KartikPrabhu gRegorLove: the mulitple ones isn't but that is a test I wrote according to spec
# KartikPrabhu looks like phpmf2 does use the implied TZ why is that not in spec yet?
# KartikPrabhu boom! better vcp datetime in mf2py now https://github.com/kartikprabhu/mf2py/tree/vcp-dt
# KartikPrabhu yup got 2 notifications already
# gRegorLove Not sure why it's not in spec. I haven't had a chance to review sknebel's last comment on parsing issue 4
# KartikPrabhu aah that seems valid
# KartikPrabhu ok enough python for the day
# KartikPrabhu sknebel: maybe by reviewing https://github.com/microformats/mf2py/pull/94 to see if everything looks OK?
# KartikPrabhu cool, it does not have the vcp fixes yet since I don't want to burden the PR too much
# KartikPrabhu right
# gRegorLove KartikPrabhu: This look right? https://gregorlove.com/php-mf2/test.php?id=50
# KartikPrabhu gRegorLove: yes, apart from the implied TZ which is not in spec
# KartikPrabhu what was the error?
# gRegorLove complicated loops and if conditions within them :)
# KartikPrabhu haha
[eddie] joined the channel
# gRegorLove Basically needed an "else" to do nothing when certain dt parts already found, haha.
# KartikPrabhu aah yes. I just added those in mf2py too :)
[cleverdevil] joined the channel
# gRegorLove Re https://github.com/microformats/microformats2-parsing/issues/2#issuecomment-372150186 I was thinking if we have <img src="/photo.jpg" alt=""> we still wanted the old behavior of just the URL instead of the dictionary.
# Loqi [kartikprabhu] Absence of `[alt]` is different from `[alt=""]` https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
So I suggest the following modification to @gRegorLove 's suggestion
- else if `img.u-x[src][alt]`
- return a dictionary with two k...
# gRegorLove Maybe got turned around on the "no non-empty alt" though
# KartikPrabhu yeah, I think alt="" is supposed to have semantic meaning as compared to no alt
# KartikPrabhu I would prefer preservation of whatever was authored
# gRegorLove So you'd expect a dictionary when parsing <img src="/photo.jpg" alt="">?
# KartikPrabhu I think so
# gRegorLove ok
# gRegorLove This is the comment I was referring to: https://github.com/microformats/microformats2-parsing/issues/2#issuecomment-236712535
# KartikPrabhu huh! I wonder why "non-empty"
# gRegorLove Well, from a consumer perspective if you get just a string (the img URL), you can presume either alt="" or no alt in the authored HTML.
# KartikPrabhu right, but you don't know which
# gRegorLove No information seems to be lost
# gRegorLove It's the same effect, isn't it?
# KartikPrabhu the information lost is the semantics of whether the <img> is content (no alt) or presentational (empty alt)
# gRegorLove I don't follow the content vs presentational?
# KartikPrabhu paraphrased
# KartikPrabhu here it is fragmentioned https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Omitting%20this%20attribute
# gRegorLove Ah, hm.
# KartikPrabhu yup ^
# gRegorLove TIL :) Revised version sounds good to me then.
# KartikPrabhu updated my comment with fragmentioned URL
[snarfed], [eddie], tantek and webchat254 joined the channel