DDMAL / cantus

:mag: Searching with Optical Music Recognition technology and the Cantus Database
http://cantus.simssa.ca
MIT License
15 stars 4 forks source link

Provide csv export of folio mapping for use in CantusDB #783

Closed dchiller closed 1 year ago

dchiller commented 1 year ago

We essentially already provide this via our /folio-set/manuscript/<manuscript_id> url. However, this currently only provides a json response. We should update this to allow a csv response as well.

dchiller commented 1 year ago

@jacobdgm @lucasmarchd01 I'm keeping #784 open because the work is already done it will actually turn out to be useful internally for Cantus Ultimus. However, it doesn't solve this issue because what CantusDB needs is a mapping of folio number (eg. 010v) to a Cantus Ultimus url.

However, you actually don't need a csv export from Cantus Ultimus to create links to images on Cantus Ultimus. The url of the image of a folio on Cantus Ultimus is always cantus.simssa.ca/manuscript/<manuscript-id>/?folio=<folio-number>. For example, the image for Folio A10r on Salzinnes (id = 123723) is cantus.simssa.ca/manuscript/123723/?folio=A10r and the image for Folio 043v on GB-Ob Can. Lit. 202 (id = 123687) is cantus.simssa.ca/manuscript/123687/?folio=043v.

Rather than parsing a csv from Cantus Ultimus, it seems simpler just to construct those urls directly?

jacobdgm commented 1 year ago

Rather than parsing a csv from Cantus Ultimus, it seems simpler just to construct those urls directly?

This would make a lot of sense.

I guess on CD's end, we might write one management command to create links to CU, and write a view where a user with sufficient privileges can upload a CSV to set up mappings to non-CU IIIF images.

dchiller commented 1 year ago

I guess on CD's end, we might write one management command to create links to CU, and write a view where a user with sufficient privileges can upload a CSV to set up mappings to non-CU IIIF images.

Or could be an option on said view "Construct image links to Cantus Ultimus" since a good chunk of the behaviour (finding the sources chants, setting the image link parameter based on the folio number, saving the chant) will be the same. And presumably the same people who have the power to do 1 would have the power to do the other...