Vitrify saves a SPARQL response as an ordinary local file, alongside the exact query and RO-Crate retrieval evidence.
With Rust and Cargo installed, install Vitrify from crates.io:
cargo install vitrifyRetrieve five EU-capital labels from Wikidata:
echo 'SELECT ?label WHERE { ?country wdt:P463 wd:Q458; wdt:P36 ?capital . ?capital rdfs:label ?label . FILTER(LANG(?label) = "en") } ORDER BY ?label LIMIT 5' |
vitrify sparql \
--endpoint https://query.wikidata.org/sparql \
--query - \
--format csv \
--to eu-capitalsThe output directory contains:
eu-capitals/
results.csv
query.rq
ro-crate-metadata.json
results.csv is the endpoint response body, stored unchanged. The metadata
records retrieval details, including the endpoint, response media type, and
checksums for the query and result. A captured response looks like this:
label
Amsterdam
Athens
Berlin
Bratislava
BrusselsSee the CLI reference for options and the roadmap for planned work.
