Skip to content

Instantly share code, notes, and snippets.

View bodnarbm's full-sized avatar

Brandon Bodnar bodnarbm

View GitHub Profile
@bodnarbm
bodnarbm / download.rb
Created March 30, 2017 00:50
Given a comments.json (output from a the /documents.json for regulations.gov api), download all the attachments for the comments.
require 'JSON'
require 'open-uri'
api_key = "REPLACE_WITH_DATA_GOV_API_KEY"
file = File.open('comments.json')
comments_json = JSON.load(file)["documents"]
comments_with_attachments = comments_json.select { |comment| comment["attachmentCount"] > 0 }

Keybase proof

I hereby claim:

  • I am bodnarbm on github.
  • I am bodnarbm (https://keybase.io/bodnarbm) on keybase.
  • I have a public key ASCm9aWgKQ2pfGt7tLcmjhIB0zeaiwZJTD4MDG2hZosjBAo

To claim this, I am signing this object: