Skip to content

Instantly share code, notes, and snippets.

@KitaitiMakoto
Last active July 27, 2019 16:19
Show Gist options
  • Save KitaitiMakoto/350333067adc95f122d60023fda6eaa1 to your computer and use it in GitHub Desktop.
Save KitaitiMakoto/350333067adc95f122d60023fda6eaa1 to your computer and use it in GitHub Desktop.
How to use wax_iiif
file "build/#{name}/collection/top.json" do |task|
builder = WaxIiif::Builder.new(
base_url: "#{base_url}/#{name}",
output_dir: "build/#{name}",
verbose: true
)
records = Dir.glob("images/#{name}/**").collect {|path|
WaxIiif::ImageRecord.new(
id: File.basename(path),
path: path,
is_primary: true,
attribution: config["attribution"],
license: config["license"],
description: config["description"],
label: config["label"],
metadata: config["metadata"]
)
}
builder.load records
builder.proc
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment