anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

Bulk update page metadata #226

Open alexdryden opened 8 months ago

alexdryden commented 8 months ago

I'm working with an author who has used the CSV bulk import feature to upload the metadata for a large number of essays. He noticed when testing out some search queries that none of his searches for IPTC:City returned any results. After a bit of digging, he realized that the value he used in the CSV for the metadata field was "iptc:city" and they value that appears on a page when the metadata is added manually is "iptc:City".

Here is an example (Link)of a page that was generated via the CSV with "iptc:city":

Screenshot 2024-01-29 at 11 39 21 AM

And here is an example (Link) of a page where iptc:City is added through the manual process (i.e., Edit > Metadata > Add metadata)

Screenshot 2024-01-29 at 11 38 44 AM

Can you advise on any methods to update these pages programmatically? The API section of the user guide mentions update methods and it seems like there is logic in the the transfer tool for updating through a CSV, which would be ideal because the author could do it themself. Are either of these routes we could take? There are approximately 400 records to update, so we would like to avoid completing it by hand, if possible.

craigdietrich commented 8 months ago

Hi @alexdryden,

I see what you mean. It's true, the Transfer tool can be used to bulk update metadata using an spreadsheet. I could walk you through that (e.g., via email).

Though, quick question: if the search were case insensitive so that it matched iptc:city and iptc:City, would that work?

alexdryden commented 8 months ago

Hi @craigdietrich,

Yeah, a case insensitive search would absolutely work as well. Although, if you are willing, I'd love to hear about using the Transfer tool for bulk updates. My email is adryden3@illinois.edu.