Purpose
Provides a single executable, bipm-fetch, that fetches BIPM committee
outcomes (CIPM, CGPM, and the consultative committees) from the official
BIPM website into a local YAML tree.
The gem also exposes a Ruby library API for programmatic use.
Command-line usage
Fetch every body, every language:
$ bipm-fetch
Fetch a single body (any of: ccauv, ccem, ccl, ccm, ccpr,
ccqm, ccri, cct, cctf, ccu, cgpm, cipm, jcgm, jcrb):
$ bipm-fetch --body=cgpm
Restrict to one language (en or fr):
$ bipm-fetch --body=cgpm --language=fr
Run each body in a forked child process (parallel):
$ bipm-fetch --fork
Show help:
$ bipm-fetch --help
The default output directory is ./data. Each body writes a
data/<body>/meetings-{en,fr}/meeting-<id>.yml tree.
Library usage
To read produced outcomes back:
Cassettes (test fixtures)
Network requests are replayed from cassettes/ (VCR). The CGPM scraper
hits post-SPA URLs that have no cassettes and runs against the live site.
To refresh cassettes:
$ BIPM_VCR_RECORD=all bundle exec rspec
$ BIPM_VCR_RECORD=new_episodes bundle exec rspec
License
Copyright Ribose. MIT license.