One of the journals I support just had a massive number of articles (20 years’ worth, or an est. 700 articles) from their back file re-scanned and would like to replace the existing article galleys or for batch versioning, uploading, and publishing. I’ve been investigating options for doing this in batch via Import and Export. The manual process would take a ridiculous amount of time and introduce a lot of opportunity for human error.
The Native XML tool seems to only be viable for net new submissions instead of versions or file replacement.
Is there a pathway for this kind of bulk replacement/versioning, whether through the API or by, I don’t know, getting my IT support to replace the database files? If not now, is this likely to be possible in OJS 3.4?
The problem in some cases is that the journals do not always have the permission to publish the articles in digital form and have to ask the permission again and that of course takes time to contact the authors. So some journals have imported just the article metadata in some cases.
We are then in a situation where I only know the article title, the issue where it is published and the file they want to add to an article already in the archive. So my galley plugin serves this purpose.
If I would know for example the publication id the article has in the OJS database, the plugin would be a lot simpler.
Also note that my plugin first checks if the article already has a galley and does not try to add a new one. So in your case you need to think what to do with the old galleys first. Of course one option would be that you rewrite the code so that it creates a new version first, adds the galley there and the publishes the new version, like you envisioned.
It is a good idea to let the it people to check the code first. I originally wrote this for internal use but great if you can use it to solve you problem. You are of course welcome to fork it and create you own version.
Alternately, you could try working with the files directly on the filesystem, since it sounds like you’re just replacing existing files. In OJS 3.3.0, you can find out the filesystem location for each file with a query like the following:
SELECT f.path, g.galley_id AS galley_id, g.publication_id AS publication_id, p.submission_id AS submission_id
FROM files f
JOIN submission_files sf ON (f.file_id = sf.file_id)
JOIN publication_galleys g ON (g.submission_file_id = sf.submission_file_id)
JOIN publications p ON (g.publication_id = p.publication_id);
Of course, take a complete backup before working with either the database or the filesystem directly!
Public Knowledge Project Team