This plugin allows you to import issues and users into OJS using CSV files.
The tool processes each row (issue or user) individually. If an error is found during processing:
- The problematic row will be saved to a new CSV file
- A new column called 'reason' will be added to this CSV, explaining what went wrong
- The tool will continue processing the remaining rows
- At the end of processing, you can check the error CSV file to fix and reprocess the failed entries
For example, if your original CSV had 10 issues and 2 failed, you'll get:
- 8 issues successfully imported
- A new CSV file containing the 2 failed rows with their error descriptions
- Processing will complete for all rows, regardless of individual failures
php tools/importExport.php CSVImportExportPlugin [command] [username] [directory] [sendWelcomeEmail]
command
: Either 'issues' or 'users'username
: Username of an existing user in the system who will perform the importdirectory
: Path to the directory containing CSV files. Can be absolute (e.g.,/full/path/to/directory
) or relative to the current directory (e.g.,./relative/path
). For issues import, this directory must contain both the CSV files and all referenced assets (PDFs, images, etc.)sendWelcomeEmail
: (Optional, users only) Set to true to send welcome emails to imported users
# Import issues
php tools/importExport.php CSVImportExportPlugin issues admin /path/to/csv/directory
# Import users with welcome email
php tools/importExport.php CSVImportExportPlugin users admin /path/to/csv/directory true
Complete field list (in order):
journalPath,locale,articleTitle,articlePrefix,articleSubtitle,articleAbstract,articleGalleyFilename,authors,keywords,subjects,coverage,categories,doi,coverImageFilename,coverImageAltText,suppFilenames,suppLabels,genreName,sectionTitle,sectionAbbrev,issueTitle,issueVolume,issueNumber,issueYear,issueDescription,datePublished,startPage,endPage
Required fields only:
journalPath,locale,articleTitle,articleAbstract,articleGalleyFilename,authors,issueTitle,issueVolume,issueNumber,issueYear,datePublished
Important: Even when using only required fields, always maintain the same field order as shown in the "Complete field list". For unused optional fields, keep them empty but preserve their position in the CSV.
All files referenced in the CSV must be placed in the same directory as your CSV file. Required files:
- The CSV file(s) containing issue metadata
- Article files referenced in
articleGalleyFilename
column - Galley files referenced in
suppFilenames
column - Cover images referenced in
coverImageFilename
column
For example, if your CSV contains:
articleGalleyFilename=articleGalley.pdf,suppFilenames=suppFile1.pdf;suppFile2.pdf,coverImageFilename=cover.png
Your directory should contain:
/your/import/directory/
├── issues.csv
├── articleGalley.pdf
├── suppFile1.pdf
├── suppFile2.pdf
└── cover.png
Field descriptions:
journalPath
: Journal path identifierlocale
: Content language (e.g., 'en')articleTitle
: Title of the articlearticlePrefix
: Prefix for the article titlearticleSubtitle
: Subtitle of the articlearticleAbstract
: Article abstractarticleGalleyFilename
: Name of the article's primary galley fileauthors
: Author information with the following rules:- Each author's data must follow the format: "GivenName,FamilyName,email,affiliation"
- Multiple authors must be separated by semicolons (;)
- FamilyName, email, and affiliation are optional and can be left empty (e.g., "John,,,")
- If email is empty, the system will use the primary contact email
- The first author in the list will be set as the primary contact
- Example with multiple authors:
"John,Doe,[email protected],University A;Jane,,[email protected],;Robert,Smith,,"
keywords
: Keywords (semicolon-separated)subjects
: Subjects (semicolon-separated)coverage
: Coverage informationcategories
: Categories (semicolon-separated)doi
: Digital Object IdentifiercoverImageFilename
: Cover image file namecoverImageAltText
: Alt text for cover imagesuppFilenames
: Names of supplementary files (semicolon-separated). Note only supplementary files that doesn't require dependent files are supported on this field.suppLabels
: Labels for supplementary files (semicolon-separated). Must have the same number of items assuppFilenames
to ensure correct pairing between files and labelsgenreName
: Genre namesectionTitle
: Journal section titlesectionAbbrev
: Section abbreviationissueTitle
: Title of the issueissueVolume
: Issue volume numberissueNumber
: Issue numberissueYear
: Year of publicationissueDescription
: Description of the issuedatePublished
: Publication date (YYYY-MM-DD)startPage
: Starting page numberendPage
: Ending page number
Complete field list (in order):
journalPath,firstname,lastname,email,affiliation,country,username,tempPassword,roles,reviewInterests
Required fields only:
journalPath,firstname,lastname,email,roles
Important: Even when using only required fields, always maintain the same field order as shown in the "Complete field list". For unused optional fields, keep them empty but preserve their position in the CSV.
Field descriptions:
journalPath
: Journal path identifierfirstname
: User's first namelastname
: User's last nameemail
: User's email addressaffiliation
: User's institutional affiliationcountry
: Two-letter country codeusername
: Desired usernametempPassword
: Temporary passwordroles
: User roles (semicolon-separated, e.g., "Reader;Author")reviewInterests
: Review interests (semicolon-separated)
For users import, only the CSV(s) file(s) is(are) needed in your import directory.
For fields that accept multiple values:
- Use semicolons (;) to separate multiple values within a field
- For authors field:
- Format for each author: "GivenName,FamilyName,email,affiliation"
- FamilyName, email, and affiliation are optional (can be left empty)
- If email is empty, the system will use the primary contact email
- The first author in the list will be set as the primary contact
- Multiple authors must be separated by semicolons
- Example: "John,Doe,[email protected],University A;Jane,,[email protected],;Robert,Smith,,"
- For galleys:
- Both
suppFilenames
andsuppLabels
support multiple values - They must have the same number of items to ensure correct pairing between files and their labels
- Example: if
suppFilenames=suppFile1.pdf;suppFile2.pdf
, thensuppLabels
must be something likePDF;PDF
- Both