A script to transform fragment database exported from FileMaker to JSON format.
Usage:
node index.js <path to the CSV file>
The CSV must contain a header and have the following columns:
_id,cdliNumber,bmIdNumber,accession,genre,fincke,publication,joins,subcollection,description,length,width,thickness,collection,script,date,folios,record,transliteration,notes,museum
joinsis parsed to and array with+or\u000bas separator.foliosis parsed to an array with₤as separator.recordis parsed to an array of objects with₤as separator for array entries and€as separator for object properties. The resulting objects will have propertiesuser,date, andtype.\u000boutsidejoinsis parsed to\n.\u000bin the beginning of string is omitted.
scripts/expandFolioNumbers.jsexpands folio numbers in range format (e.g.08927-8) to individual entries.