Skip to content

Commit

Permalink
Add new documentation about CSV impor export tool for OMP 3.3 (#1256)
Browse files Browse the repository at this point in the history
  • Loading branch information
Godoy0722 authored Nov 14, 2024
1 parent d0a426d commit aa63a8d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
48 changes: 48 additions & 0 deletions admin-guide/3.3/en/data-import-and-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,54 @@ To export article and issue metadata using the Native XML Plugin:

![The Export Articles tab under the Native XML Plugin.](./assets/native-xml-plugin-export.png)

### OMP CSV Import

The CSV Content Import Plugin for OMP is a command line tools that allows users to import publications from a CSV file, along with cover images and submission PDFs. This tool will convert a CSV file into OMP publications, where each row represents a publication.

> Note: This is NOT a comprehensive CSV converter, and many fields are left out.
#### Formatting the CSV file

Each row in the CSV must be in this format:

```
pressPath,authorString,title,abstract,seriesPath,year,isEditedVolume,locale,filename,doi,keywords,subjects,bookCoverImage,bookCoverImageAltText,categories,genreName
```

1. **pressPath**: **(required)** is the path for the press where the user wants to import a publication. If not present, the tool will skip this submission.
2. **authorString**: **(required)** is the list of authors presents on the submission. For each author, it contains the given name, the surname and the email address. For each author, the string format must be on the following format: `Author1,Surname1,[email protected]`.
- The author's data must be inside double quotes as follows: `"Author1,Surname1,[email protected];Author2,Surname2,[email protected]"`;
- The information between the authors must be separated by a semicolon as shown above;
- The family name and email address are both optional, so if some of these fields are not present, continue using the comma and leave the space for this field blank (e.g. `"Author1,,[email protected];Author2,Surname2,;Author3,,"`).
3. **title**: **(required)** the submission's title.
4. **abstract**: **(required)** the submission's abstract.
5. **seriesPath**: the path for the series, which must exist in the press.
6. **year**: the submission's year.
7. **isEditedVolume**: sets the `work_type` for the submission.
8. **locale**: **(required)** the submission's locale. Must be one of the supported locales for this press. If it's not present, the tool will skip this submission.
9. **filename**: **(required)** the submission file name. It must be present on the same directory as the `CSV` file.
10. **doi**: the submission's DOI.
11. **keywords**: the submission's keywords. If the submission presents more than one keyword, they need to be separated by a semicolon (e.g. `keyword1;keyword2`);
12. **subjects**: the submission's subjects. If the submission presents more than one subject, they need to be separated by a semicolon (e.g. `subject1;subject2`);
13. **bookCoverImage**: the book cover image filename. This file must be in the same directory as the `CSV` file and should be in one of these formats: *gif, jpg, png or webp*. If the image isn't in one of these formats, it won't be imported.
14. **bookCoverImageAltText**: the alt text for the book cover image. It'll only work if the bookCoverImage is present.
15. **categories**: the submission's categories. All categories present here must be already added to the Press to work correctly. If the submission presents more than one category, they must be separated by a semicolon (e.g. `Category 1;Category 2`).
16. **genreName**: the submission's genre. If this field comes empty, the system will assume the **MANUSCRIPT** genre by default

#### Importing the CSV Data

1. Create the CSV file. You can use the `sample.csv` file as an example.
2. Place your CSV file in a directory of your preference on your server.
3. Place all cover images and submission files in the same directory as the CSV file. The Submission PDFs and the cover images must have the same filename as in the CSV file.
4. From the command line, starting on the OMP root directory, run the following command, where `<BASE_PATH>` is where the CSV file is located, `<CSV_FILE_NAME>` is the name of the CSV file and `<USERNAME>` is a valid OMP username:
```
php tools/importExport.php CSVImportExportPlugin <BASE_PATH>/<CSV_FILE_NAME>.csv <USERNAME>
```

The tool will import the publications for every row where data was correctly entered.

If any data was entered incorrectly, the tool will output any rows that did not import and the reason that each failed, and a CSV file called `invalid_rows.csv` will be generated with more details.

## Import and export users

### Export users to XML
Expand Down
Binary file modified learning-omp/3.3/en/assets/learning_omp-tools-import_export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions learning-omp/3.3/en/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ description: A guide to understanding the import/export and statistics tools in

![The list of import and export tools in OMP.](./assets/learning_omp-tools-import_export.png)

OMP provides a number of tools to import and export data into and out of your press. Please see [PKP’s Administrator’s Guide](/admin-guide/en/data-import-and-export) for information on how to use the Native XML Plugin and the Users XML Plugin. Please also note that the Quick Submit Plugin is not available for OMP.
OMP provides a number of tools to import and export data into and out of your press. Please see [PKP’s Administrator’s Guide](/admin-guide/3.3/en/data-import-and-export) for information on how to use the Native XML Plugin, the Users XML Plugin, and [the CSV Content Import Plugin](/admin-guide/3.3/en/data-import-and-export#omp-csv-import). The CSV Content Import Plugin can only be used with the command line.

To export using the ONIX 3.0 Monograph Export Plugin, you need to ensure that all of the fields are completed under Settings > Press > Publisher Identity.
Please also note that the Quick Submit Plugin is not available for OMP.

The Tab Delimited Content Import Plugin can only be used with the command line.
To export using the ONIX 3.0 Monograph Export Plugin, you need to ensure that all of the fields are completed under Settings > Press > Publisher Identity.

## Statistics

Expand Down

0 comments on commit aa63a8d

Please sign in to comment.