When uploading files with T138464: glam2commons (previously Single Image Batch Upload): Write and deploy initial and usable version a uniform way of naming files will be used per metadata-mapping. There are some standard operations which have to be performed to create a good title. Therefore it will be useful to have a title generator.
Ideally the title generator has a default order and some default operations, but it is possible to deviate from the default.
The following elements can be used in a file title:
- File identifier: the identifier the glam uses for this picture/object (this is useful to ensure unique titles)
- GLAM name: the name from the institution
- Collection: Sometimes it might be useful to specify in the file title in which collection the file falls. Either the metadata-mapping is for a single collection (then GLAM name could be used and an additional Collection is not needed), it is however also possible that a mapping is made for multiple collections at once.
- file name/title: These are not always provided, therefore a good default would be to use the title if available and otherwise the file description
- file descriptions: A file description can be very lengthy, therefore it is a good idea to set a limit on the length of the description. Something to crop descriptions at the last whitespace before X characters would be ideal.
I believe a good order is: title OR description - optionally collection - GLAM - ID . EXTENSION
Also try to test whether the title does not contain forbidden characters.
Allowing to specify the ordering of the title if from a metadata mapping we'd like to use something different from the default would be ideal.