I have a database of our publication’s previous issues and articles and would like to import that into a fresh install of OJS (currently version 2.4.8.1, but will be upgraded sometime during 2018).
How would I go about that? I am trying to import the issues first and have managed to a functional test-import by first downloading an xml-file of the issues, then manually changing the entries and uploading again. Now, my challenge is to convert my Excel-file to the xml-file.
I used a script to do this in the past. You can find it here:
After I completed the import, I discovered that this only worked for my OJS import because of a bug in the code, so YMMV.
OJS will automatically create the issues for you, if you provide issue information in the import file with the articles, so importing the issues first is probably more complicated than it needs to be.
Thank you! I managed to create the xml from my spreadsheet and is now looking at importing the articles (sounds like I could have started there, but oh well, I probably learned something useful a long the way…).
I’ve managed to import articles with all relevant data, including the pdf, except for one crucial part: assigning each article to a specific issue. I might have found the solution though.
In the OJS 2.4.x schema, issues contain sections contain articles. I think if you wrap your articles with the relevant section tags, and wrap your sections with the relevant issue tags, you should be able to import sections and artcles overtop of a set of empty issues (where the issue identification is identical).
Not at the moment, but I can see if I have time later this week to upload it. But I have to warn you that it is not pretty As I said above it depends on a standardized Excel sheet. We made it for journals that are importing new old articles to OJS and think that quicksubmit is too slow.
As it is mentioned in the readme file now, the script was written for in-house use, so there are probably some problems with it depending on the data you are trying to import. But we have used it to import the archives of six journals during last year, so it should work at least when used with one locale.
I can not promise that I will have time to give much support for using it, but feel free to try and modify if needed.
This is absolutely brilliant, @ajnyga. Thank you so much!
I get this error, though, when I try to create an xml-file (I have used your example-spreadsheet for testing, only changing file names to test upload of my own pdf’s):
Fatal error: Call to undefined function mime_content_type() in .../convert.php on line 258
Do you have any idea what this might be caused by?
The mime_content_type function wasn’t deprecated, then it was, now it isn’t again.
The good news is that PKP software only uses it as a fallback when the “preferred” mechanism, the fileinfo suite of tools, isn’t available. See Error message on upload: "No file uploaded or invalid file type!" for more information about how OJS/OMP/etc. determine file types.
Regards,
Alec Smecher
Public Knowledge Project Team