NYPL / ami-metadata

14 stars 2 forks source link

referenceFilename extension parameter should be limited #59

Open genfhk opened 7 years ago

nkrabben commented 7 years ago

Didn't we have a comment chain started on this? Regardless, this is the current regex ^[a-zA-Z\\d\\-\\*_]+\\.[a-zA-Z0-9]{2,3}$ Now that we're in the CMSID only era we could limit it to this ^[a-z]{3}_\\d{6}_v\\d{2}([frspt]\\d{2})*_(em|pm|sc).(mkv|mp4|wav|dv)$ I left the face, regions, stream, part, take portion fairly generic but we could be more exact about ordering.

Another option is that we create subspecies for these based on format types. For example, audio = ^[a-z]{3}_\\d{6}_v\\d{2}([frspt]\\d{2})*_(em|pm).wav$ video = ^[a-z]{3}_\\d{6}_v\\d{2}([frt]\\d{2})*_(pm|sc).(mkv|mp4|dv)$ film = ^[a-z]{3}_\\d{6}_v\\d{2}([r]\\d{2})*_(pm)_\\d+.dpx$