#microformats 2022-02-07

2022-02-07 UTC
dtw, Seirdy, ur5us, Seirdy0, [schmarty], [fluffy]1, KartikPrabhu and balupton[d] joined the channel
#
@__eel__
Do microformats like hCard, hResume, and hAtom get used in the wild ever? Does anything parse or care about those attributes?
(twitter.com/_/status/1490558284868173824)
tj1 joined the channel
#
[tantek]
hCard and hAtom yes, as part of backcompat for IndieWeb use-cases of course. hResume I'm not sure anything parses it since the libraries that Glenn wrote years ago.
#
KartikPrabhu
I think mf2py does backcompat for hresume
#
[tantek]
I believe it, problem is lack of h-resume consuming applications/services
#
KartikPrabhu
yes of course
#
KartikPrabhu
maybe someone should talk to linkedin jk!
#
[tantek]
KartikPrabhu, perhaps we need to start with more h-resume examples in the wild to point to, to make it worth the time to talk to LinkedIn (to support importing, updating from h-resume)
[manton], jacky and Ramon[d] joined the channel
#
jacky
the need to preserve 'T' is maddening (lol)
#
jacky
in datetime strings
#
jacky
it's the way I'm parsing things, I lose it in the process
#
jacky
I think I can tack it back in
#
jacky
lol I feel like I'm building an AST of date-time values for value-class parsing
#
aaronpk
I thought the whole point of the way datetime parsing works is the parser doesn't have to do any date parsing at all, just treating things as strings
#
jacky
so initially, my assumption was that some sense of parsing was needed
#
jacky
I think that came from me taking the headings literally
#
jacky
namely "the following rules apply in addition to (and in some cases replacing)"; making me think that some sense of massaging values to match the expected formats at the bottom of that section
#
jacky
now I'm seeing it's more of the "find strings and massage them to expected formats"
#
jacky
i.e: you can provide something like 2022-010 4 AM but that doc hints that it should be returned as "YYYY-MM-DD HH:MM"
#
jacky
(so ordinal formatting would be lost and the use of meridan values push it to be in 24-hour style)
#
aaronpk
Oh darn, expecting 4 AM to turn into 4:00 is not trivial
#
[KevinMarks]
If you're parsing into a strongly typed language there may be a case for creating native timestamps, but then you do hit all the date vs datetime issues we were talking about before
#
jacky
I've been using named groups in the regex to help with that meridan math
#
jacky
(if `pm` is detected, add 12 to hour value) for example
#
aaronpk
except for 12pm of course
#
jacky
only exception
#
jacky
quickly adds that
#
sknebel
(test cases plz :))
#
jacky
sknebel: to the test suite, you mean?
#
sknebel
if it tripped up a parser writer, it probably deserves a test case
#
jacky
gotcha!
#
sknebel
(or throw in a ticket desciribing the problem, thats at least it written down somewhere :))
#
jacky
re: time parsing, this is what I'm using right now to pull out meridan info, if it's using a prefix (like 'T') and grab the offset
#
jacky
lots of stuf
sarahd[d], daiyi[d], Asaf_Agranat[d], Jeremiah[d], rattroupe[d], aspenmayer[d], sayanarijit[d], Seb[d], Murray[d], shaunix[d], Zegnat[d], corenominal[d], aaronpk[d], hans63us[d], capjamesg[d], Osvik[d], hoenir, mossymaker[d], Myst[d], Ramon[d], balupton[d], P1000[d], wackycity[d], marksuth[d], dovedozen[d], Christian_Olivie, MarkJR84[d], barnaby, ben_thatmustbeme, cygnoir[d], jacky, edburns[d], [Aaron_Klemm], [jgmac1106] and ur5us joined the channel
#
[tantek]
except " " is also a date / time separator too
#
[tantek]
and more recommended for readability as well
KartikPrabhu joined the channel
#
jacky
true!
#
jacky
I've managed to work with it
#
jacky
had to check more of the regex logic for it
#
jacky
the one thing tripping me up right now and I don't know how to handle is this assumed date
#
jacky
and it's a useful convention to have - esp for short hand
#
[tantek]
implied date?
#
[tantek]
like from one dt-* property to another ?
#
[tantek]
btw jacky, I'm absolutely open to adding more id="" linkable fragments to the mf2 spec
#
[tantek]
anything that helps reference specific steps
#
[tantek]
I'd rather do that manually than use <ol> FWIW, because the numbers will change when the algorithm does
#
jacky
is that's what it's called? if so, then yeah
#
jacky
yeah tbh anything with a heading that doesn't show up in the ToC works
#
jacky
but now I wonder if they _do_ have IDs and aren't just linked directly
#
jacky
that'll be interesting to implement
#
[tantek]
yes and super helpful!
zack[m], mambang[m], diegov and juanchipro[m] joined the channel
#
jacky
there's this "P2YM11" value in `v2/h-resume/work` and there's no mention of how to parse that on the Wiki
#
jacky
guessing that's an ISO 8601 thing
#
jacky
lol this is going to be fun P3Y6M4DT12H30M5S
#
jacky
(an example string of that)
#
aaronpk
oh yeah durations
#
jacky
tbh I'm learning more about mf2 from doing this than I expected
#
jacky
it's def more expressive than I expected
#
jacky
agh there's also intervals! lol
#
jacky
now I know how my calendar figures things out
jacky joined the channel
#
jacky
duration isn't too hard (thanks regex)
angelo joined the channel
#
jacky
that wasn't too bad
#
aaronpk
that seems to be a common theme here 😂
#
barnaby
jacky: maybe if enough people write mf2 parsers, someone will finally end up actually using the value class pattern for datetime parts, to justify having written all that code for handling them
#
[KevinMarks]
The usecase that is still hard to mark up is the calendar grid for events where you have time down and different tracks across.
#
[KevinMarks]
there was an attempt at this in 1.0, but it was pretty complicated https://microformats.org/wiki/hcalendar-brainstorming#Tabular_event_calendars