craigsapp / website-polish-scores

Front-end for digital transcriptions of the Polish Music Heritage in Open Access project
https://polishscores.org
3 stars 1 forks source link

Allow sorting by roman numerals in titles #219

Open craigsapp opened 1 year ago

craigsapp commented 1 year ago

When viewing Gomółka's Melodiae na psalterz polski by shelfmark, the works are sorted in original order (since the shelfmark ID includes the order of the works in the source.:

Screenshot 2023-04-17 at 10 39 23 PM

When sorting by Composer or Title, the songs in Melodiae na psalterz polski are sorted alphabetically by the Roman numeral in the title:

Screenshot 2023-04-17 at 10 42 30 PM

It would be more useful to sort the Roman numerals by number and/or exclude them when sorting by title. The Roman numerals in this particular case are ended with a periodd, so the regular expression ^([IVXCM]+)\.\s+ could be used to recognize that the title starts with a Roman number, which can then be either ignored or converted to an Arabic number for sorting.