pyvideo / data

Python related videos and metadata powering PyVideo.
https://pyvideo.org
Creative Commons Zero v1.0 Universal
451 stars 265 forks source link

Feature request: Support speaker name alias #1177

Open Mariatta opened 1 month ago

Mariatta commented 1 month ago

I understand currently only one name per speaker is allowed. I'm wondering if it would be possible to support alias for people who might have "stage name", using non-latin alphabets, or different name due to life events.

Examples of such speakers:

Proposed solution:

jonafato commented 1 month ago

Thank you for the suggestion, this will be a great addition. Currently, speaker names are currently just strings, so this will require expanding support to speakers as JSON objects (which also opens up the possibility of adding info such as a bio to the speaker page). As a first pass, I think this will look something like

{
    "name": "Conference Speaker",  # the speaker's canonical name
    "slug": "conference-speaker",  # can be used to override the default logic for generating speaker URLs when necessary
    "aliases": [  # a list of globally unique speaker name aliases
        "Conf Speaker",
        "C. Speaker",
    ]
}

This will require changes in both pyvideo/pyvideo and pyvideo/data, so I can create the relevant issues on the static site repository to support the new feature as well. Input welcome for this initial new metadata structure (but let's limit the first change to names and aliases).

Mariatta commented 1 month ago

Yes I think adding the slug and list of aliases will work. Thanks!

Mariatta commented 1 month ago

So if I understand it, the approach is to have a new speakers.json with the above schema. And in the videos.json will refer to speaker slug instead of speaker names, correct? I think this will work. I can perhaps start working on transforming the current record into the new schema format, if that's decided.

jonafato commented 1 month ago

@Mariatta I haven't sketched out an implementation yet, but I think it will likely look like a speakers/ directory with each speaker getting a JSON file (likely named to match the "slug" attribute that generates their speaker page URL) that fits the format in my comment above. The usage of speaker names and aliases in each video JSON file would remain as-is, which would allow us to display the alias as specified in the video metadata while still linking to canonical speaker page (if we swapped out the slug for the name or alias, we would lose reference to whichever version was intended to be associated with a given video). I'll be creating a few issues in the pyvideo/pyvideo repository this weekend to plan out these changes, and I think the combined effort will be approximately the following: