#microformats 2021-02-20

2021-02-20 UTC
[snarfed] joined the channel
pengolod joined the channel
#
btrem
JackyAlcin[m] What is the microformat that can handle opening hours? I was under the impression that it wan an effort that got started, but never finished.
pengolod joined the channel
#
jacky
I figure that it could be done via h-event (making every open day an event that recurs)
#
btrem
Hmm, what would the event p-name be?
#
jacky
don't know if it needs one
#
jacky
like what's gained by defining one?
#
btrem
Well, what would a consuming application have to consume?
#
btrem
Just dt-start and dt-end?
#
jacky
solely the dt-start and dt-end
#
btrem
I guess I'm wondering if a consumer would be able to make sense of that.
#
jacky
it could be defined as a feed (on the fly) so people can ask for what time ranges as pagination options
#
jacky
date ranges, rather
#
jacky
by not specifying names, you could just show a "blocked off" region versus having to worry about munging names together (if they're closed for lunch, for example)
#
jacky
it'd be nice to have a dedicated format for this
#
jacky
but I think that (with some additional plumbing) could give the needed info for things
#
btrem
I looked into a few months ago, when I was mucking around with a format for food menus and an include pattern.
#
btrem
I agree, it'd be nice to have something. At the time, I couldn't really come up with an opening hours spec that would work for the seemingly endless variations.
#
btrem
Part of the problem is that visible data is rarely in a machine readable format, so opening hours vocabularies rely on hidden data, and the visible and invisible tend to fall out of sync.
#
jacky
that makes sense
#
jacky
especially since doing stuff like this isn't really "boilerplate" for most
#
jacky
I do notice Square making this easier for shop owners (since they directly are involved in that - versus stores going in to first vouch for a place then keep those hours in sync)
#
btrem
There is a need. It is *very* common for businesses to discover that the hours that Google or Yelp *think* they are open are wrong.
#
btrem
So businesses must be vigilant in entering the same data over and over again.
#
btrem
And people who rely on Google/Yelp/et. al. are likely to be steered wrong when it comes to whether a business is open.
#
btrem
It was a regular feature of the restaurants where I use to work. Then the pandemic hit.  :(
#
btrem
Yeah, when it started, we were told a few months and everything would be sorted out. I was less optimistic. I figured the better part of 2020, *maybe* a bit into 2021, but it'd be nearly over. I did not imagine it would go on for this long. And I was being intentionally pessimistic.
#
btrem
There won't be any hard end to this catastrophe. It will sort of gradually get better. But it's hard for restaurants e.g. to determine "ok, now we should start rehiring." So things are very tenuous.
#
btrem
I feel really awful for the kitchen people, who did not get any benefits, no payout, no unemployment, nothing.
#
btrem
Ok, enough whining from me.
#
btrem
Back to figuring out why my webmentions are not working.
[tantek] joined the channel
#
[tantek]
btrem, these are all legitimate concerns. especially for those with less support. ok to chat more about that in #indieweb-chat
#
[tantek]
jacky, perhaps the "simple" approach to opening hours is treating it as every venue's own calendar
#
btrem
I've already said I'm done. I'm back to banging my head against the wall re: webmentions.
#
btrem
jacky I thought that was what you were suggesting earlier.
pengolod joined the channel
#
btrem
I suppose maybe a series of h-events with no title or summary.
#
btrem
So a business would have to use some sort of cal app that can generate h-events.
#
btrem
If only the folks who make the software could be convinced to allow clients to export data in open formats. I think that'd be a tough sell.
#
jacky
_or_ the site can transform its own mf2 into a iCalendar-compatible feed (a bridge that lets other clients 'just work')
#
btrem
Can a iCalendar feed have a name? Then you could name the calendar "opening hours".
#
tantek
edited /opening-hours-brainstorming (+225) "calendar of unnamed events"
(view diff)
#
btrem
That seems way too easy. What's the catch?
#
jacky
btrem: why does it need a name?
#
jacky
I _think_ they can tho
#
[tantek]
the iCalendar feed name is meant to be user visible / consumable, not something that consuming code should look for
#
btrem
Well, so e.g. Google or Yelp or a phone app would *know* that the feed tells you when the restaurant/bookstore/what have you is open.
#
[tantek]
if machine-based discovery was what you were attempting
#
jacky
I don't think I can edit that wiki yet
#
jacky
btrem: that could be done by doing a hard specification though
#
jacky
like <link rel="ical hours" href="$URL" />
#
btrem
What do you mean?
#
btrem
Oh, right. We chatted right by each other.
#
jacky
[tantek]: I'd need an account, it mentions you as an admin that can grant me one :)
#
btrem
Hmm, this seems too easy. Like why didn't anyone think of it before? There *must* be something we're not thinking about.  :)
#
jacky
lol there definitely is
#
btrem
I'd very much like it if instead of <link> it were <div>. Visible data.
#
jacky
but potentially, the biggest issue is getting people on board to emitting this with mf2 first
#
jacky
I can see it then as `<a href="$URL" rel="ical hours" title="Open Hours">Open Hours</a>`
#
btrem
Or `<div class="h-x-hours"><span class="h-event">...`.
#
jacky
oh yeah for sure
#
jacky
I was thinking about the link to point to the feed that'd be on a store's homepage
#
jacky
that a reader could expose in its markup for a venue
#
btrem
Yeah. I just feel like a feed will be out of sync in situations were the it were maintained indepdent of the visible data.
#
[tantek]
looks like I can create an account, I need a place to message you the info jacky 🙂
#
jacky
slack works!
#
btrem
But yeah, a discoverable feed would be useful.
#
tantek
edited /Special:Log/newusers () "created new account User:Jacky: requested by user"
(view diff)
#
jacky
👀👀
#
btrem
edited /opening-hours-brainstorming (+213) "/* calendar of unnamed events */ suggests a type for opening hours"
(view diff)
#
btrem
Yeah, I was trying to write up example code, and ran into a problem. How do you markup the time for a day? The datetime attribute can be just a time, but then how do you attach that to a day of the week?
#
btrem
I don't know if `datetime` can be shoehorned into an opening hours spec. Which is I think one of the long standing problems.
#
jacky
edited /opening-hours-brainstorming (+962) "/* calendar of unnamed events */ add example of using h-event for open hours"
(view diff)
#
jacky
I just added an example that I think should satisfy both open and closed times
#
jacky
as well as even doing 'special events' (just change the URL under it)
#
jacky
we _really_ need anchor-specific parsing to be a concrete thing
#
jacky
It'd make that a lot easier than having to make a new page for everything
#
jacky
edited /opening-hours-brainstorming (+3) "/* calendar of unnamed events */ add bullet points"
(view diff)
#
jacky
lemme know how that looks btrem
#
jacky
tried to keep it visible in the markup so it could read well in a browser but also show the needed info in mf2
#
btrem
The datetime attribute is incorrect. Gotta be 24 hours. So 18:00 not 6pm.
#
jacky
edited /opening-hours-brainstorming (+10) "/* Jacky's Idea for Rendering a Week of Hours */"
(view diff)
#
jacky
edited /opening-hours-brainstorming (+4) "/* Jacky's Idea for Rendering a Week of Hours */ correct timestamsp"
(view diff)
#
btrem
There are i18n issues, of course. Monday in en, lundi in fr, montag in de, etc. So how do we make them machine readable and i18n friendly?
#
jacky
that can be a per-page translation thing
#
jacky
tbh a lot of this doesn't have to be human-entered specifically
#
jacky
like this bit can be generated by a machine that follows an expected format
#
jacky
like it could be a table on the page
#
jacky
and if the event is described to fit a particular range, it can then handle the proper timestamping
#
jacky
that's why I leaned into using a h-feed because then it can use future and historical info from the machine
#
btrem
Not sure I follow. The problem with datetime is coming up with a machine readable version of human readable data as I see it.
#
btrem
Right.
#
btrem
I actually don't know much about h-feed.
#
btrem
So I think I need to read up on that so I can follow what you're doing.
#
jacky
it's like a wrapper of items (kinda like a collection) but meant to represent conventional feeds (like RSS but in HTML and a lot simpler imo)
#
btrem
I gathered that much.
#
btrem
I just never had any use for it. Or maybe I did but didn't realize it!
#
Loqi
Tantek Çelik
#
btrem
Yeah, I know there are articles on the wiki. Like I said, I'll need to read up on and think about it a bit.
#
jacky
gotcha
#
btrem
This could be a game changer!
#
jacky
I'm interested in this myself tbh
#
jacky
re: opening hours - it could be used for conference layouts as well
#
btrem
A business could nest opening hours in their h-card, and a phone browser could tell a user "open right now" or "closed".
#
btrem
That would be a genuinely useful service for people, and thus I imagine attractive for publishers. I'd think.
#
btrem
jacky++
#
Loqi
jacky has 7 karma in this channel over the last year (111 in all channels)
#
btrem
for the h-feed ical idea!
#
jacky
oh that would be an excellent use case!
#
btrem
Yep. Like the way Yelp does it. Except Yelp often gets the hours wrong.
#
jacky
shoot, I could probably even do that for my site for 'office hours' / expect me to reply during this time kinda stuff
#
jacky
granted, it'd probably be a flag at first ;)
#
btrem
a flag?
#
jacky
like on my site saying if I'm around to talk or not
#
jacky
though I've been rewriting parts to make my homepage _also_ done via mf2 so it can pick and choose how to render things (on the presence of a property, for example)
#
btrem
Well, it's 7:00pm here (I'm in U.S., pst, UT - 08:00). So I think I'll start wandering around in my kitchen getting some sort of meal going.
#
jacky
ha that's the same as me
#
btrem
I'm going to read up on h-feed and maybe try to create hours for the restaurants I used to work at. I find problems when I have real data to work with.
#
btrem
...problems to solve...
#
btrem
West coast?
#
btrem
Whereabouts?
#
jacky
Yeah, I'm in the Bay Area
#
jacky
California
#
btrem
Seattle for me.
#
jacky
ah I haven't been there yey
#
btrem
Nor have I been to San Francisco.
#
btrem
Definitely on my list of things to do. I want to go the massive record store there. (I'm blanking on the name atm.)
#
btrem
Ok, nice chatting. I'm off to dinner. I'll be adding something to the wiki at some point, or chatting here, about the opening hours thingy.
#
btrem
Yep, Amoeba. I will go there one day. And spend too much money. But not any time soon, because (a) pandemic, and (b) unemployment. But someday.  :)
pmlnr_test, pmlnr_test2, pmlnr_test3, hendursa1, pmlnr_test4, KartikPrabhu, pmlnr_test1, [KevinMarks], hendursaga, [snarfed], [tantek], [tw2113_Slack_], [fluffy], [Ramiro_Ruiz] and btrem joined the channel
#
btrem
I'm adding h-feed to my site I already had lists of h-entry, so I'm just adding the container microformat.
#
btrem
Does it make sense to have more than one h-feed on the site?
#
btrem
Like, on the home page, I have the 10 most recent articles. And on /articles/ is the list of all articles. And on /articles/2021/ all articles from this year. So can/should I have h-feed markup on each of those pages?
#
KartikPrabhu
yes. having more that one h-feed is fine
#
btrem
Thanks. :)
#
KartikPrabhu
it is also ok to have more that one h-feed on the same page, but not sure if readers do anything special with that
#
btrem
Interesting. I suppose at a minimum you'd need a p-name if there were more than one h-feed on a page.
#
btrem
Speaking of which, there's no .p-name on the home page because there's no convenient name. I could add one in the html and hide it via css, but is there any reason to? What is the value of .p-name in .h-feed?
#
KartikPrabhu
yes, it is good to markup a p-name specially in the multiple feed cas
#
KartikPrabhu
I think readers use p-name to display that name in as the feed title
[tw2113_Slack_] and [snarfed] joined the channel
#
btrem
Hmm, maybe I need to specifically name it on my home page, then. I think I need to read a bit more about h-feed, specifically what parsers do when there isn't a p-name.
#
[KevinMarks]
you can have an implied feed with multiple h-entry on a page; the h-feed is to add feed-level information, so the name, summary, photo
#
[KevinMarks]
also can do feed-level author instead of repeating it per entry
btrem and [chrisaldrich] joined the channel