I finally managed to import a text file into DSpace today. It was "Decline of Science in England" by Charles Babbage. Here's how I did it:
- create an import directory. I called mine test-import.
- Create a directory below the import directory. I named it decline, after the book.
- Put the text file into the directory 'decline'.
- Create the file dublin_core.xml, in the 'decline' directory.
The file looked like this:
<dublin_core> <dcvalue element="title" qualifier="none"> Decline of Science in England </dcvalue> <dcvalue element="subject" qualifier="none"> science </dcvalue> </dublin_core>
- Create a file called content. The file contains a list of filenames, one per line. In this case I had body (which was the name of my text file) and preface, which was a separate preface file I created.
To import the item I then created a community and a collection under it, and gave this command:
bin\dsrun org.dspace.app.itemimport.ItemImport -a -e emailAddress -m mapfile.out -c 125050010/1469 -s test-import