Version

TottoriOpenDataCatalog

This gem provides an API and a CLI of Open Data Catalog of Tottori Prefecture http://db.pref.tottori.jp/opendataResearch.nsf to generate a machine-readable catalog.

Installation

$ gem install tottori-opendata-catalog

Synopsis

API

require 'tottori-opendata-catalog'
# TottoriOpenDataCatalog.get returns a nested ruby's object.
puts TottoriOpenDataCatalog.get
require 'tottori-opendata-catalog'
# without caching which uses a local storage (/tmp).
puts TottoriOpenDataCatalog.get(cache:false)

CLI

$ tottori-opendata-catalog csv > catalog.csv
$ tottori-opendata-catalog json > catalog.json
$ tottori-opendata-catalog json --no-cache > catalog.json

Development

Testing

$ bundle exec rake spec

Updating example/example.csv

$ bundle exec ruby bin/tottori-opendata-catalog csv > example/example.csv