Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Contribute: Plugins/ImportPluginsCSV
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Testing Your Plugin = After restarting your webserver go to the Import Items screen from the Manage Deposits screen. If you can't find this, make sure you're logged in. Type this into the "Cut and Paste Records" box: <pre> title,abstract This is a test title,This is a test abstract This is another test title,This is another test abstract </pre> Select "CSV" from the Select import format drop down menu and click "Test Run + Import". You should end up at the Manage Deposits screen with the following message being displayed "Import completed: 2 item(s) imported.". == Embedding commas == If you want to include commas in your imports, which is very likely you must enclose the field in double quotations. For example: <pre> title,abstract An interesting article,"Damn it Jim, I'm a Doctor, not a Perl hacker." </pre> When doing this make sure not to leave any whitespace between a quotation mark and a comma or the import will fail. == Multiple fields == Multiple field types are handled by separating each individual value by a semi-colon, a simple example of this would be the subjects field. Go back to the import items and proceed as before, but typing this into the "Cut and Paste Records" box: <pre> abstract,title,subjects Testing,Testing,AI;C;M;F;P Testing,Testing,AC;DC </pre> After the records have been imported examine each one on the View Item screen. You will find that a list of subjects are given, and that a more descriptive name is given than the code we imported. == Compound fields == Compound fields are fields that have subfields within them, each with their own name. You don't compound fields in one go, but set the components individually. Subfields have names of the form mainfieldname_subfieldname. One of the most commonly used compound fields is the "Creators" field. It has a names subfield "creators_name" and an ID subfield "creators_id" which is most often used for email addresses. Here is an example of setting the creators field: <pre> title,creators_name,creators_id Setting compound fields.,"Bloggs, Joe;Doe, John","joe@bloggs.com;john@doe.com" </pre> If you import this record and then examine the view items screen you will find that the "Creators" field has been setup with the values displayed in a table.
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)