Notes Generator instructions

Overview

Script for generating notes for testing.

Script execution

java -jar .\target\folio-notes-generator.jar <okapiUrl> <tenant> <username> <password> <csvFile>

Script executable: folio-notes-generator.jar

Arguments:

  • okapiUrl - URL that is used for concrete environments
  • tenant - a tenant that has enabled mod-notes module
  • username - username of the user (should have notes creation permissions)
  • password - user's password
  • csvFile - CSV file with data about needed notes

Example:

java -jar .\target\folio-notes-generator.jar https://folio-snapshot-okapi.dev.folio.org diku diku_admin admin test.csv


CSV file format

Format of CSV file:

<domain1>,<type1>,<entityId1>,<noteTypeId>,<notesAmount1>,<title1>,<content1>
<domain2>,<type2>,<entityId2>,<noteTypeId>,<notesAmount2>,<title2>,<content2>

Example of the file: test.csv

 * Title and content are optional in the CSV file. If missed then default title and content are used.
 * If the title in the CSV file has a `#` character then it will be replaced with #<noteNumber> (#1, #2, etc.).
 * If the title in the CSV doesn't have a `#` character then a note number will be added to the end of the note title.