#microformats 2018-08-27

2018-08-27 UTC
#
gRegorLove
I'd missed/forgotten this part of VCP: "The value class pattern only applies to properties which are simple strings, enumerated values, telephone numbers, and datetimes. The value class pattern does not affect parsing of properties of type email, URL, URI, UID."
#
gRegorLove
So it's "else get the textContent of the element" returning the address
#
KartikPrabhu
but else get textContent should not be "normalised" I think
#
gRegorLove
The inline proposal has the normalization after that, but I'm wondering if it should be moved just before the textContent step
#
gRegorLove
That would still be an improvement, since it would normalize u- from abbr and data
#
willnorris
that above note about which properties VCP applies to only really makes sense in mf1. mf2 parsers typically (?) don't know care which property they're parsing, they just care which parsing rules should be used
#
willnorris
At least in the go parser, I'm pretty sure vcp *would* get applied in https://php.microformats.io/?id=20180826224908006. I guess it shouldn't?
#
sknebel
U- doesn't do vcp
#
gRegorLove
willnorris, yeah, looks like php-mf2 does vcp for the email
#
sknebel
And email is backcompat parsed as u-email
#
Loqi
[Tantek Çelik] microformats2 parsing specification
#
sknebel
Oh sorry, I was wrong, vcp is just not the first step
#
gRegorLove
The only note about the `type` sub-property on /h-card is regarding p-tel, "And for now, the former hCard 'type' subproperty of 'tel' is dropped/ignored."
#
gRegorLove
Nevermind, that doesn't really impact this I guess. Tangent.
koddsson, strugee and KartikPrabhu joined the channel
#
gregorlove
edited /hreview-aggregate-examples-in-wild (+2014) "finish processing examples"
(view diff)
[asteres] joined the channel
#
gregorlove
edited /h-review-aggregate (+1281) "/* Backward Compatibility */ draft of parser compatibility, pending feedback and implementations"
(view diff)
#
gregorlove
edited /h-review-aggregate (+1) "/* Proposed Properties */ s/rating/average/"
(view diff)
#
gregorlove
edited /h-review-aggregate (+356) "/* Example */ simple example"
(view diff)
KartikPrabhu, barpthewire, pniedzielski[m], wakest[m], gRegorLove_, gRegorLove__ and gRegorLove joined the channel
#
@0kody
I just discovered rel="me" and now I feel dumb. This should be implemented on GitLab and Mastodon. http://microformats.org/wiki/rel-me https://indiewebify.me/validate-rel-me/
(twitter.com/_/status/1033973325578555392)
barpthewire, gRegorLove_, gRegorLove__, gRegorLove, [kevinmarks], barpthewire1, gtramontina and KevinMarks joined the channel
#
ben_thatmustbeme
hmm, if i am going to put some new features in to the ruby parser behind a development flag, what would be the best ones to target?
#
sknebel
the alt= thing changes the output format
#
ben_thatmustbeme
has there been a version that people have standardized on
#
sknebel
the lang= does too, but in a generally more compatible way (it only adds fields to objects that were objects before)
#
ben_thatmustbeme
not seeing a ton of agreement there
#
ben_thatmustbeme
or rather, my eyes just drift to a list of issues
#
Zegnat
I think snarfed may already be using the way it is implemented in Python ... so that’s the way to go, I guess?
#
Loqi
[kartikprabhu] Here are the proposed changes to the spec to account for `alt` attribute. Add a new section 1.5 with title "parse an `img` element for `src` and `alt`" with the steps - if `img[alt]` - return a new `{}` structure with - `value`: the `src`...
[kevinmarks] joined the channel
#
ben_thatmustbeme
okay, i am just documenting pieces
#
ben_thatmustbeme
err opening tickets for these
#
ben_thatmustbeme
what was the thing the php does for the e-* processing with whitespace?
#
Loqi
[Zegnat] #15 What should mf2 textContent parsing result in? User expectation vs. DOM specification.
#
Zegnat
That’s very much in flux though. Would much rather see more commentary on the algorithm than more half-implementations
#
sknebel
there's open PR(s?) to aaronpks examples and commentary on what was added on top in python
#
Zegnat
Yes. I keep trying to make time to get everything documented on microformats.org so iterations can happen with history on the wiki. But never actually having the time. Maybe this week, when I am isolated and alone in the guest house.
#
Zegnat
The whole plaintext thing used to be just in a release candidate build for testing, ben_thatmustbeme. But through quick iteration of updates and fixes on the rest of the PHP parser, and aaronpk wanting to use it in XRay and for Aperture, it landed in stable as well.
#
Zegnat
I wouldn’t prioritise getting it into the Ruby one just yet
#
aaronpk
I thought there was enough consensus around it already
#
aaronpk
it was in an -alpha release for a while
#
Zegnat
I think the consensus is that we want to have it. I am not sure there is actual consensus on all of the HTML->text conversions?
#
sknebel
well, I don't think python and php are entirely equivalent on that, but relatively close
#
sknebel
If I remember right
#
Zegnat
KartikPrabhu has iterated slightly faster and further than I have on the PHP side, so, yeah, there are still some slight differences. I just want to document the changes as part of an algorithm before copying them over, otherwise I know I will forget to update documentation
j12t joined the channel
#
@rubygems
microformats (4.0.8): A Ruby gem to parse HTML containing microformats2 and classic microformats that returns a… https://rubygems.org/gems/microformats
(twitter.com/_/status/1034112550537973760)
tantek__ joined the channel
#
ben_thatmustbeme
dang, i missed something an broke the gem
#
ben_thatmustbeme
cool, nice to see CI works well :/
[eddie] joined the channel
#
@rubygems
microformats (4.0.9): A Ruby gem to parse HTML containing microformats2 and classic microformats that returns a… https://rubygems.org/gems/microformats
(twitter.com/_/status/1034117089068498944)
#
gRegorLove__
Re: whitespace there seems to be some agreement that the textContent method in php-mf2 needs to preserve whitespace within content.value which it's not doing currently
#
Loqi
[sknebel] Whitespace in `<pre>` IMHO has to be preserved, with the expection of stripping newlines at the start if it is at the start of the property value and stripping whitespace at the end if it is at the end. Copying [comment I made](https://github.com/...
#
ben_thatmustbeme
updated with v 4.0.9 of ruby, now at 100/117
#
ben_thatmustbeme
a number of others are going to wait for 5.0.0
hober and KevinMarks_ joined the channel
#
@megarush1024
↩️ It's not a client in that sense. It's a service you use to connect a website to syndicate content from a website supporting microformats 2, and then to receive incoming webmentions from platforms like Twitter.
(twitter.com/_/status/1034137602708975616)
[tantek], jackjamieson, [kevinmarks], KevinMarks, [jon] and barpthewire joined the channel
#
gRegorLove
Zegnat: Would you like me to put this algorithm on the wiki somewhere so we can iterate on it? You mentioned KartikPrabhu had made some tweaks to it in mf2py I think? https://wiki.zegnat.net/media/textparsing.html
#
KartikPrabhu
there have been further tweaks by snarfed
#
Zegnat
Feel free to move it to the wiki. I haven't had time yet... :(
#
KartikPrabhu
the only thing I tweaked was handling <pre>
#
gRegorLove
I'll set it up on /textcontent-parsing marking it as a draft, with a section for brainstorming
[keithjgrant], chrisaldrich, [chrisaldrich] and [eddie] joined the channel
#
gregorlove
created /textcontent-parsing (+4967) "New page: This is a '''draft''' specification for parsing <code>textContent</code> based on [[User:Zegnat|Martijn van der Ven]]'s algorithm. [https://wiki.zegnat.net/media/textparsing.html] == Stat..."
(view diff)
#
Zegnat
Thanks gRegorLove! Maybe this’ll trigger me to start iterating again
#
gRegorLove
yw Zegnat. php-mf2 implements that version correct?
#
Zegnat
It should, yeah
#
Zegnat
Both Python and PHP now also built in a flag for the different img handling. Wonder if I should add that in the actual state machine itself.
#
Zegnat
scribbles note
#
gregorlove
edited /textcontent-parsing (+211) "/* Implementations */ +php-mf2"
(view diff)
#
gRegorLove
Ok. I'll let someone closer to mf2py add to http://microformats.org/wiki/textcontent-parsing#Implementations and note the differences.
#
Zegnat
Maybe I’ll get KartikPrabhu or sknebel to walk me through it so we can equalise again. Off to bed for now though.
#
Zegnat
Thanks for picking up the housekeeping slack, gRegorLove!
#
Zegnat
gRegorLove++
#
Loqi
gRegorLove has 27 karma in this channel over the last year (96 in all channels)
#
gregorlove
edited /textcontent-parsing (+324) "/* Brainstorming */ === whitespace in pre elements ==="
(view diff)
#
gregorlove
edited /textcontent-parsing (+2) "/* whitespace in pre elements */ s/newlines/whitespace/"
(view diff)
#
gregorlove
edited /textcontent-parsing (+0) "/* Element to string */ formatting fix"
(view diff)
[kevinmarks], [cleverdevil], [jgmac1106] and KevinMarks joined the channel