DistributedProofreaders / dproofreaders

Distributed Proofreaders is a web application intended to ease the process of converting public domain books into e-texts.
https://www.pgdp.net
GNU General Public License v2.0
46 stars 28 forks source link

Replace dc.xml with metadata.json and drop marc_records #1203

Closed cpeel closed 1 month ago

cpeel commented 1 month ago

The reason why Dublin Core (dc.xml) files were originally created is unclear. Users (PMs, PPs, and squirrels) currently use them when managing project directory contents to make sure they are in the right place. Replace them with the metadata.json files we already generate during archiving.

This allows us to stop storing and managing MARC records in the database. We could have opted to just have the dc.xml file be updated from the project table rather than the MARC record (we only pull 2 fields from it), but we are already generating the metadata.json file during archiving and there doesn't seem to be a good reason to keep both.

This code does not proactively create metadata.json files for existing projects until they are edited (or archived), nor does it remove any existing dc.xml files.

Sandbox: https://www.pgdp.org/~cpeel/c.branch/remove-marc-records/

Testing hints: