Skip to content

Instantly share code, notes, and snippets.

Avatar
🧊

tamsin johnson no-reply

🧊
  • UC Santa Barbara Library
  • United States
View GitHub Profile
View bpl_mods_mapper.rb
# 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