gbv / avram-js

Avram Schema Language implementation in JavaScript
https://gbv.github.io/avram-js/
MIT License
2 stars 0 forks source link

CLI: add method to infer/specify record types #18

Closed nichtich closed 8 months ago

nichtich commented 8 months ago

Primary use case MARC data. Could be hard-coded in lib/record. In any case, record types are

Default could be to enable marc21bibliographicRecordType unless --type "" is given.

The provider could be set with -x, --extension [name] where name is a node package or local file. The extension can provide methods detectRecordTypes(fields) as well as rules ( #15), e.g. loadRule returning an object with methods checkRecord, checkField, checkSubfield .