Perl-Toolchain-Gang / CPAN-Meta

Specifications for CPAN distribution META files
36 stars 40 forks source link

Include conference talks about a distribution or module in META.json #125

Open simbabque opened 7 years ago

simbabque commented 7 years ago

In a discussion with @oalders about conference videos it came up that there is no good place to find conference talks, especially about specific modules or distributions. Since those are very useful especially for people getting started with Perl, we thought it might make sense to include those into the module or dist page on metacpan. For that, the URLs would have to go somewhere.

I think the https://metacpan.org/pod/CPAN::Meta::Spec#resources would be a good place. Possibly as x_videos or similar. I've not seen any documentation about that x_foo part of resources though. Can it be freely added, or is there some guide?

Is this maybe something that should be especially documented so authors learn about it?

haarg commented 7 years ago

x_ fields are intentionally unspecified in the spec. You can add whatever fields you would like, although there isn't much point until a tool starts using that data. If you wanted this to be used by MetaCPAN, for example, it would be better to file a feature request there. MetaCPAN documents the x_ fields it supports on its metadata about page. I'm not aware of a more a more comprehensive list of x_ fields used by other tools.

Generally, this seems like it would be more appropriate to include these links in the module documentation. If you were going to include it as metadata, I'd think a more generic x_links list would be more appropriate.

xdg commented 7 years ago

I'd prefer not to have a totally generic "x_links" as the keys under 'resources' historically give some context about what the resource is so consumers know what to do with it or how to display it.

Assuming someone wants to consume it, we can consider a number of approaches.

The simplest would be to have categories like:

And within those, do we want just a list of URIs or a list of hashes with things like title as well as URI?

Alternatively would we want a more generic "x_media" list where entries are hashes with title, URI and context around the specific type (possibly via a 'content-type' field or something).

I don't have a strong feeling either way.

haarg commented 7 years ago

For x_links, I meant something similar to what you proposed for x_media. Using MetaCPAN as an example again, since it is somewhere this type of information could be used, having to support several different category keys to handle the same type of data would be painful and annoying.

Something like

"x_media" : [
  {
    "url" : "https://youtube.com/...",
    "title" : "Introduction",
    "type" : "video"
  }
]

would make sense to me. content-type doesn't feel right to me, because it already has a technical meaning that wouldn't match this use case.

Leont commented 7 years ago

This idea sounds sensible enough to me.

Often presentations have two urls, one for the video and one for the slides, I would opt for something enabling that.

dolmen commented 7 years ago

:+1: for x_media as detailed by @haarg.