#microformats 2018-02-25

2018-02-25 UTC
#
KartikPrabhu
while parsing attributes for propreties http://microformats.org/wiki/microformats2-parsing#parse_an_element_for_properties (e.g. getting the href of <a> for a u-url) if the attribute is a blank string it should still count as found yes?
#
Loqi
[Tantek Çelik] microformats2 parsing specification
#
KartikPrabhu
asking since mf2py is a bit overzealous and rejects empty string values
#
Loqi
[kartikprabhu] #46 Parse blank href and src properly to got to current page
#
KartikPrabhu
tantek: ping ^^ since you might have a quick answer
#
tantek
in short, yes, though I'd be interested in seeing real world examples to verify that we are doing the right thing
#
Loqi
tantek: sknebel left you a message 2 days, 15 hours ago: microformats wiki captcha is showing warning that the recaptcha v1 API will shutdown 2018-03-18
#
KartikPrabhu
tantek: see example link mentioned in the issue https://github.com/kartikprabhu/mf2py/issues/46
#
Loqi
[kartikprabhu] #46 Parse blank href and src properly to got to current page
#
KartikPrabhu
the link uses href="" to denote u-url and u-uid but mf2py rejects those blank values
#
KartikPrabhu
borwsers though send href="" to current page URL
#
tantek
good example
#
tantek
and makes sense
#
KartikPrabhu
ok so will fix mf2py to never reject explicitly authored blank values
#
tantek
KartikPrabhu: I myself am attempting to use it on my home page with <a class="u-url u-uid" rel="author" href=""></a>
#
KartikPrabhu
cool, so this definitely needs to be fixed
#
tantek
do we have a test case?
#
tantek
to check other parsers?
#
tantek
php etc
#
Loqi
[Johnny Oskarsson] Exam weeks and comments on the side
#
Loqi
[kartikprabhu] Simple example ## HTML ``` html <html> <head> <base href="http://example.com"> </head> <body> <article class="h-entry"> <a class="u-url" href="">text</a> </article> </body> </html> ``` ## Current output ``` json "items": [ ...
#
KartikPrabhu
woah there Loqi
#
tantek
right
#
aaronpk
Pretty sure I use href="" on my site for my author url in posts
#
KartikPrabhu
yeah seems like explicitly authored blank properties should be allowed. fixing in mf2py currently
#
KartikPrabhu
for value-class-patter in date and time parsing http://microformats.org/wiki/value-class-pattern#Date_and_time_parsing does "innertext" mean the same as textContent elsewhere i.e. textContent dropping <style> and <script>? What about substituting img with alt and src ?
#
KartikPrabhu
ok fixed blank attributes in mf2py now
#
KartikPrabhu
enough python for today!
tantek joined the channel
#
tantek
wow lots of chat last two days
#
tantek
for the parser and the h-entry questions / suggestions the best thing to do is probably to file issues for them, so we can track threads on each
#
tantek
(I didn't see any that had obvious answers, or even if they do, it's likely worth adding to an FAQ, and keeping an issue open can be a reminder to do that)
#
tantek
edited /Special:Log/block () "blocked [[User:HashGains Mining]] with an expiry time of infinite (account creation disabled): Removing content from pages: spam"
(view diff)
#
tantek
^^^ why "hash" has a bad reputation mixed up with (obv blockchain related) "mining"
KartikPrabhu, tantek, [mrkrndvs], [miklb] and [kevinmarks] joined the channel
#
[kevinmarks]
They already tainted "crypto", now "hash" as well?
ivc and voxpelli joined the channel
#
sknebel
FWIW, a test-case for empty properties has been submitted to the microformats test collection, but I never got any feedback on it, nor was it merged
#
Zegnat
Empty src and href should be supported no matter other empty attributes (alt/title/whatever), since an empty string is a valid relative URL.
[mrkrndvs], nitot, tantek, barpthewire, [eddie] and [jeremycherfas] joined the channel
#
Loqi
[kartikprabhu] #20 innertext in value-class-pattern needs clarification
#
Zegnat
not me!
#
Zegnat
In fact, that innerText algo may or may not also be something to consider for https://github.com/microformats/microformats2-parsing/issues/15
#
Loqi
[Zegnat] #15 What should mf2 textContent parsing result in? User expectation vs. DOM specification.
#
KartikPrabhu
that depends a lot on the styles in CSS too for instance "'display' property is not 'none':"
#
Zegnat
Yes, for that you may have to assume the default display value per element.
#
Zegnat
It would be a big algo to write up
#
KartikPrabhu
unless the use-case does not need that
#
KartikPrabhu
the goal is to sanely parse value-class-pattern for dates
#
Zegnat
E.g. aaronpk is basically already saying he expects an extra line break to replace paragraphs, in #15. So that’s already 1 element that needs special casing for textContent/innertext.
#
Zegnat
Aaaah. Dates. Yes. That’s a double “not me!” from me. I at one point started to try and rewrite the vcp date parsing completely, in mf2 terms, but ran into time constraint.
#
KartikPrabhu
yeah date parsing is pretty annoying. I don't understand even half of the code in mf2py that does this, no idea how kylewm figured it out!
#
Zegnat
I would almost want to take a virtual HWC some day and just sit down to talk it through from spec. It is dense.
[eddie] joined the channel
#
Zegnat
A thing some people may like, not sure anyone made one before, JSON Schema for a microformat: https://gist.github.com/Zegnat/65ed9a9fb0546fb8c4aa0c0b790b8a40
#
Zegnat
Possibly incomplete.
#
Zegnat
Was working on it so I could do quick and easy validation on Micropub payloads
vivus, nitot, [jeremycherfas] and tantek joined the channel