Skip to content

Instantly share code, notes, and snippets.

View no-reply's full-sized avatar

tamsin woo no-reply

  • UC Santa Barbara Library
  • United States
View GitHub Profile
# Note: this is all pseudocode to mock up a DSL at this point.
# THIS IS A VERY INCOMPLETE EXAMPLE; much work to do for mods.
bpl_mods_mapper = Krikri::Mapper.new
bpl_mods_mapper.build do
input_format :xml # :json, :csv, :tsv others?
selector type: :xpath, "//record"
# select an XPath relative to `selector` as the default parent for mappings