#microformats 2018-05-30

2018-05-30 UTC
voxpelli_, [cleverdevil], [jgmac1106], ChanServ, tantek_, pniedzielski[m], schmarty, wakest, [Natris1979] and KartikPrabhu joined the channel
#
@syedrasel1234
#Full #Width #templates #Microformats #Threaded #comments #Translation @Readygov Photoshop & Illustrator any Work) Contact Us :https://goo.gl/VLuTPY
(twitter.com/_/status/1001680891691839489)
#
gRegorLove
For https://github.com/indieweb/php-mf2/issues/176, part of the issue appears to be the h-cite has no u-url.
#
Loqi
[kartikprabhu] #176 funny parsing of 'u-photo h-cite'
#
gRegorLove
I'm reading http://microformats.org/wiki/microformats2-parsing##else+if+it's+a+u-* and it's not clear what to do when it doesn't have a u-url... fall back to parsing as p-* I think
#
Loqi
[Tantek Çelik] microformats2 parsing specification
#
gRegorLove
Aside from the stray example.com/foobar, which I know shouldn't be there. Still digging into that.
#
KartikPrabhu
"else use the parsed property value per p-*,u-*,dt-* parsing respectively " I think that means parse as u-* no?
#
KartikPrabhu
it is a bit ambiguous rule
#
gRegorLove
Actually hang on, that's not the part I meant to read, heh.
#
KartikPrabhu
in any case, the property should be a "value: something" instead of "something"
#
gRegorLove
Sure, aside from that though.
#
gRegorLove
KartikPrabhu, why does mf2py have "value": "" for the nested h-cite?
#
gRegorLove
When parsing that HTML
#
KartikPrabhu
I think it is parsing it as a u-* and goes all the way to the textContent rule
#
KartikPrabhu
I am now very confused what the "else use the parsed property value per p-*,u-*,dt-* parsing respectively " is supposed to mean
#
gRegorLove
I think it means jump down the page to "parsing a u- property"
#
gRegorLove
And agreed, looks like textContent.
#
KartikPrabhu
yeah, so by that interpretation mf2py seems to be doing the correct thing
#
gRegorLove
Which I think there's a separate mf2 parsing issue clarifying that algorithm? Heh
#
KartikPrabhu
is there?
#
Loqi
[Zegnat] #15 What should mf2 textContent parsing result in? User expectation vs. DOM specification.
#
KartikPrabhu
yeah that is different
#
gRegorLove
So DOM textContent doesn't replace an img with alt, that's just an mf2 parsing convention for p-*?
#
KartikPrabhu
that is more like what the textContent should be
#
KartikPrabhu
I thought that was the spec so I coded it that way :P
#
gRegorLove
Not questioning it, I just wasn't sure, haha
#
KartikPrabhu
yeah. I think mf2py is doing things as currently in spec but feel free to point out wrongness
#
KartikPrabhu
but in any case the URL shouldn't make it in there right?
#
gRegorLove
I thought fixing the 'value' first would be easier.
#
gRegorLove
Looks like it's part of Zegnat's text parsing updates. php-mf2 is extracting the img alt
#
gRegorLove
You can try dropping the img HTML in https://wiki.zegnat.net/media/textparsing.html and it gets the alt. I'll defer to him on that.
#
KartikPrabhu
hmm I think the text stuff is conflicitng with the ordering of the parsing
#
KartikPrabhu
for getting textContent I think both my algo an Zegnat's should give roughly the same thing
#
gRegorLove
If you put the <article> html in Zegnat's parsing it returns "this is alt"
#
KartikPrabhu
yeah because it is replacing img with alt or src, which the u-* parsing does not tell you to do
#
gRegorLove
That's the php-mf2 parser's current understanding of 'textContent'
#
KartikPrabhu
yeah mf2py only does img replacement when specified
#
gRegorLove
Which I realize is wrong
#
KartikPrabhu
it would be weird to get alt as a u-* value. src I can imagine being fine
strugee joined the channel
#
gRegorLove
I don't think textContent is going to be mf2-aware, though.
#
KartikPrabhu
since it should be replacing it with the "src"
#
gRegorLove
one bug at a time :)
#
KartikPrabhu
it isn't about textContent being mf2-aware, I think. It is more about what text equivalent makes sense in a mf2 context
#
KartikPrabhu
I think mf2py can handle the replace with "src" but not the "alt" case
#
KartikPrabhu
with minor modifications
#
KartikPrabhu
just like it fixes whitespacing depengin on the HTML element
#
gRegorLove
idk. I get confused every time I dig in-depth into the differences between textContent and the mf2 rules to parse p-*
#
KartikPrabhu
me too! :P
#
gRegorLove
So I'm not thinking about it much at the moment. Zegnat groks that a lot better
#
KartikPrabhu
so at the least that property should go as "value"
#
KartikPrabhu
that is a parsing bug and not a textContent bug
#
KartikPrabhu
basicaly any "u-*" there should give the same result
#
gRegorLove
I'm getting tired so I'm not following what you're saying. All I'm saying is "this is alt" comes from Zegnat's textContent algorithm
#
KartikPrabhu
gRegorLove: look at this example in contrast http://pin13.net/mf2-dev/?id=20180530063455820 I have changed the first u-photo to a u-like-of and that "spurious" thing is gone
#
KartikPrabhu
the "this is alt" is not the problem but the "http://example.com/foobar" in the first photo property is
#
gRegorLove
I'm working on the latter. And mf2py and php-mf2 disagree about the former.
#
KartikPrabhu
aah yes. they do. and there I think mf2py is follwing the spec to the letter
#
gRegorLove
That example is also wrong. photo from the h-cite showing up in the h-entry.
strugee joined the channel
#
gRegorLove
Retiring for the night soon, but I think I'm making progress on the implied photo issue!
#
KartikPrabhu
no that is implied photo :P
#
gRegorLove
what. Which of the implied parsing rules does it fall under?
#
gRegorLove
I read `else if .h-x>:only-child:not[.h-*]` as disqualifying this HTML from implying the photo
#
KartikPrabhu
step 5 of implied photo for the h-entry ;)
#
KartikPrabhu
"else if .h-x>:only-child:not[.h-*]>img[src]:only-of-type:not[.h-*], then use that img’s src for photo "
#
gRegorLove
If the implied photo is correct there then it should also be correct on https://github.com/indieweb/php-mf2/issues/176
#
Loqi
[kartikprabhu] #176 funny parsing of 'u-photo h-cite'
#
KartikPrabhu
no, the photo is not implied if there is a u-photo already
#
gRegorLove
ok, true.
#
gRegorLove
But second HTML snippet, " .h-x>:only-child:not[.h-*]" stops the implied parsing. It's a nested h-*
#
KartikPrabhu
this example is more complex than I wanted :P
#
KartikPrabhu
that is only for "name"
#
KartikPrabhu
there are rules for stopping implied name but none for stopping implied photo or url
#
gRegorLove
I'm saying step 5 for implied photo does not match, because: .h-x>:only-child:not[.h-*]
#
gRegorLove
Step 6 has the same beginning of the rule, so it doesn't match either.
#
gRegorLove
Thus no gotten value
#
KartikPrabhu
good point!
#
KartikPrabhu
ok so there is a bug in mf2py too
#
KartikPrabhu
which somehow has never been an issue!
#
gRegorLove
Think I've got this about fixed in php-mf2. Pretty sure it's an xpath issue in parseImpliedPhoto().
#
gRegorLove
I'll do some testing when I'm more awake tomorrow :)
[markmhendrickso joined the channel
#
Zegnat
gRegorLove++ for spending the time on the gnarly implied photo thing
#
Loqi
gregorlove has 30 karma in this channel (238 overall)
#
Zegnat
KartikPrabhu++ for to the letter spec implementation
#
Loqi
kartikprabhu has 25 karma in this channel (204 overall)
#
Zegnat
This alt parsing thing is going to invalidate a whole slew of tests again, isn’t it? :(
[jgmac1106], [kevinmarks] and barpthewire joined the channel
#
sknebel
given the recent wiki outage, should we setup a mirror for the mf-wiki too? (like the indieweb wiki content files are copied to the indieweb github org). or is at least someone maintaining an offline copy? (aaronpk?)
#
aaronpk
I don't have anything in place for the mf wiki
[kevinmarks], nitot, adactio and [jgmac1106] joined the channel
#
Zegnat
Filing PRs is nice because you can discuss and review a change before committing it. While the wiki takes a commiting first and then reviewing the revision sort of flow.
#
Zegnat
I wondered about putting the text copy of at least the mf2 parsing spec in the parsing spec github repo. That might also make it easier to link to specific points during issue discussion, and changes could be filed as PR.
barpthewire, nitot, [kevinmarks], [jeremycherfas] and [sebsel] joined the channel
#
gRegorLove
Zegnat, could you check into the h-cite value parsed in https://github.com/indieweb/php-mf2/issues/176? mf2py gets an empty string instead of "this is alt"
#
Loqi
[kartikprabhu] #176 funny parsing of 'u-photo h-cite'
#
Zegnat
Yeah, that probably should be discussed in the text parsing issue over at the parsing repo.
#
Zegnat
For my implementation in php-mf2 I replaced all “textContent” requests in the spec with one and the same algo. The question being: was that right? For things like the very final step in u-* parsing, it might be better to stick with raw textContent.
chrisaldrich, adactio and tantek joined the channel
tantek and [tantek] joined the channel
#
[jgmac1106]
can you have a ton of h-cite on one page if they are in one h-entry?
#
[jgmac1106]
On a syllabus for example I may have 20-30 citations
#
gRegorLove
Certainly!
#
Zegnat
Sky is the limit! If you break a mf parser, that is our problem ;)
gRegorLove_ joined the channel
#
[jgmac1106]
though it was so daunting I haven't added it my syllabus template yet: https://github.com/jgmac1106/Syllabus/blob/master/index.html just on my course sit:e on line 57: https://github.com/jgmac1106/edu305/blob/master/modulethree.html
#
[jgmac1106]
need a reverse parser where I can copy an APA citation from Google Scholar and have it spit out the correct mf2, so somebody fly around the earth like Superman and make thigns work backwards. Proper APA citation and h-cite markup is a bear
#
[jgmac1106]
...and before I get nerd corrected...yes Iknow that was about time travel and a bizzaro world would be better analogy
#
[jgmac1106]
and also since it was in the movie it was never canon anyway, but still felt like Superman when I figured out mf2 and APA
#
Zegnat
If you can draw out the mapping, I can build you the converter, maybe, [jgmac1106]
#
gRegorLove_
An h-cite builder like the hCard builder would be cool.
#
[jgmac1106]
be really cool if you coudl get h-cite listed on the bottom of the citation modal in Google Scholar...but I am sure those companies pay big bucks to get there
#
tantek
especially with a pop-up select for citation style, APA, etc.
#
[jgmac1106]
for new pubs the doi # would make this pretty straightforward as I think about it
#
[jgmac1106]
but that just links yopu back to the publishing silo actually
#
[jgmac1106]
click on the bibtex file everything is there that you would need
[Natris1979] joined the channel
#
@jgmac1106
↩️ Part of the reason I am working on a syllabus template using microformats2. The kind of readers I am seeing folks start to prototype will be awesome learning tools. https://github.com/jgmac1106/mf2syllabus see it on Glitch as well http://syllabus.glitch.me/ (https://jgregorymcverry.com/2975-2/)
(twitter.com/_/status/1001894115552919552)
#
[jgmac1106]
@zegnat I may just try to map it out using a workflow of going to Google scholar>copying the BibTex and throwing that into a modal with a selection for citation style. AssumingI would just need to make the proper mf2 template for each style.
barpthewire joined the channel
#
@jgmac1106
↩️ Yeah my syllabus was never complete just the template. The course is raging at https//:http://edu305.jgregorymcverry.com. I was using the experience to learn microformats and CSS Grid so it ain’t pretty. While the Holy Grail (would love a more inclusive as in… https://jgregorymcverry.com/2979-2/
(twitter.com/_/status/1001899022125330432)
#
@jgmac1106
@jaytiesse Just came across your and the @metalabharvard project in a thread about Open Syllabi. I have been pushing folks to keep syllabi as plain html as possible and use microformats2 versus more complex markup suggested by http://schema.org… https://jgregorymcverry.com/2984-2/
(twitter.com/_/status/1001903093393645570)
#
tantek
[jgmac1106]: is that a https//:http: typo in your post ^^^ ?
#
[jgmac1106]
kind of. I forgot to write https in a link in the note, the second is a truncated link to the rest of the note
#
[jgmac1106]
now to go edit a tweet and the post
#
[jgmac1106]
actually I just wrote schema.org either bridgy or Twitter added the http://
#
tantek
likely Twitter
#
Zegnat
tantek: I think the consensus between sknebel, ancarda, and me, is that the theoretical problem of thundering herd is always going to exsist for something like readers. If everyone hosts their own reader, once you send a WebSub ping into the world that there is a new post, they are all going to wake up and come at you.
#
Zegnat
But there are several technical mitagations we could think of. Usual caching, of course. E.g. making your website resist DaringFireball/Slashdot. Another thing that would be interesting is to make readers not respond to a ping immidiately (thus staggering the load from the requester side), but you can never be 100% sure that every reader is doing that.
#
Zegnat
ancarda had the interesting idea of also not doing a simultaneous websub ping to everyone. If you yourself control the websub hub, you can send the ping staggered to e.g. 5 subscribers at the same time and spread the load even further.
#
aaronpk
hah that's a really good idea
#
tantek
sounds like a good feature for a paid hub
#
[jgmac1106]
So I use flickr CC images alot. If I am using them in an h-entry can folks let me know if I added u-photo to img tag correctly here: https://github.com/jgmac1106/flickr-cc-helper/commit/88d6c361812a5ed543c4dfdd33f113dcc932f2d4 I was going to try and make it more of an h-cite format...but baby steps
#
tantek
[jgmac1106]: u-photo in an h-entry of yours should only be for your photos
#
tantek
especially if you are claiming p-author is you
#
tantek
then you are claiming you took the photo and its yours
#
[jgmac1106]
okay, that is what I misunderstood
#
tantek
everything about an entry is literal and direct in that way
#
tantek
if you want to embed someone else's photo, you have to do so inside perhaps an h-cite
#
tantek
with its own p-author etc.
#
[jgmac1106]
opps jinx
#
tantek
especially for a CC image - which requires that
#
[jgmac1106]
okay will keep working on the bookmarklet to see if I can have it spit back an h-cite
#
tantek
if you are doing a repost then that has its own markup
#
[jgmac1106]
These are images embedded in my posts, technically a repost but really just an image that I dig that is also openly licensed. Just pull it in from Flickr API using Alan Levine's tool. I think I will be able to maker an mf2 version
#
tantek
it's not technically a repost unless that's all there is to your post
#
tantek
more of an #indieweb-dev specific discussion
#
[jgmac1106]
okay will share it there when I mess with the plug-in
sebsel and [kevinmarks] joined the channel
#
[kevinmarks]
So is it a u-featured image?
#
tantek
depends on the content
#
tantek
/ usage
#
[kevinmarks]
In jgmac's context - one he wants to represent the post
[grantcodes] joined the channel
#
tantek
haven't seen a link to the context
[wiobyrne], [Vanessa], [chrisaldrich], KartikPrabhu, tantek and [jgmac1106] joined the channel
#
[jgmac1106]
I think in my context yeah I would use u-feature as it it kind of the "hero" image of the page...especially if SM treats that like a twitter card I would add to my header
#
[jgmac1106]
http://edu305.jgregorymcverry.com/modulefour.html Ignore the image size thats a me learnign css grid thing and not even getting bad inline styling to override'
#
[jgmac1106]
hmm. I think I need to add an h-card on every page above a featured image
#
tantek
or just make sure you have an h-entry for the page
#
[jgmac1106]
really an h-entry is broken and needs an h-card
#
tantek
what do you mean "is broken"?
#
[jgmac1106]
its not, I forgot it. I am broken
#
tantek
where is the heading for that page?
#
tantek
is it the invert thing at the top? "EDU 305 Spring 2018"
#
[jgmac1106]
Yeah I messed up, I should be adding headers for accessibility purposes after <main>
#
tantek
not *just* for a11y purposes, but purely visual hierarchy purposes in the first place!
#
tantek
like the url is "modulefour" yet there is nothing about that on the page indicating it
#
[jgmac1106]
yeah total oversite, and I hammer my students on that
#
tantek
also the title seems a bit, abstract? <title>Stages of Reading</title> - not sure how to interpret that out of context
#
tantek
the meta point here is that before worrying about h-entry h-card etc., it's important to get the HTML basics right
#
tantek
otherwise no amount of whatever you add to it will make any sense
#
tantek
this was the intention behind the "first make your page POSH" recommendation
#
[jgmac1106]
been following since
#
[jgmac1106]
doing your instructional design while also teaching is such a rush. Why I want to spend this summer getting my tempaltes perfect
#
[jgmac1106]
what is name or irc channel I always mess it up...but here is where I ended up: https://gist.github.com/jgmac1106/6bef1656ab4761405d62350825f53f95
KartikPrabhu, [kevinmarks], tantek, [chrisaldrich] and [jgmac1106] joined the channel