Last active
July 27, 2019 16:19
-
-
Save KitaitiMakoto/350333067adc95f122d60023fda6eaa1 to your computer and use it in GitHub Desktop.
How to use wax_iiif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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