#microformats 2024-12-22
2024-12-22 UTC
Kupietz and Nova_Guy joined the channel
#
benpate [tantek]2: Okay, here's my use case: I'm making a music search engine that will show artists, albums, and possibly tracks. Initially, this will only search albums on my local server, where I know what's what. But eventually, I'd like to crawl other websites (that have opted-in) to include their albums/tracks in the search results.
#
IWDiscord <benpate>
#
benpate This means I'll need to be able to separate pages representing an "Album" from other kinds of collections, like social posts, photo reels, event calendars, etc.
#
IWDiscord <benpate>
#
benpate I do see how an album is a kind of playlist, which is a kind of feed/collection, but it's a *special kind* of playlist or feed that has extra data, and (as in my search example) may need to be queried separately from other kinds feeds.
#
IWDiscord <benpate>
#
benpate I agree that making a whole new object for every kind of use case may not be wise. However, this can be the only kind of specialization (or subclass, even?) that we've run into. Is there something in MicroFormats that gives me a sub-type? Or, some other kind of meta-data that might help separate Album-type data from other kinds, like Newsfeeds, Photo Reels, Calendars, etc.
#
[tantek]2 Usually for that sort of classification the first thing to try is a category / p-category or "hashtag" if you prefer.
#
benpate Thanks. I'm looking this up now.
#
[tantek]2 Subclassing (or any class hierarchy really) quickly becomes messy and fragile, too brittle to evolve as data evolves
#
[tantek]2 Like does adding a p-category of "album" or "playlist" (or both!) to an h-feed solve this problem?
#
benpate Yeah, I don't know. It's the best brainstorm I've had, so far, but I'm open to better ideas.
#
benpate I've also stumbled onto Microdata, which seems similar to MicroFormats but more complex.. It typically uses schema.org, which already has definitions for lots of things, including `MusicAlbum`
#
[tantek]2 Right microdata is a lot more complex and frankly kind of a dead end because it has so much strict hierarchy
#
[tantek]2 Might be ok to reuse "MusicAlbum" as a category though
#
benpate Yeah, that sounds like a decent way to handle it. Thank you!
gRegor, Kupietz, lucas1, sebbu2 and Hoinkas joined the channel; doesnm left the channel