Skip to content

Ruby crawler for the list of lobbyists published by German Bundestag

License

Notifications You must be signed in to change notification settings

FHG-IMW/lobbyliste

Repository files navigation

Lobbyliste

Build Status Documentation Status

This gem crawls and parses the the list of lobbyists which is published as a PDF by the German Bundestag. Our goal is to provide a simple and easy to maintain parser.

Installation

Add this line to your application's Gemfile:

gem 'lobbyliste'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lobbyliste

NOTE: This gem requires JAVA to be installed. We use PDFBox for PDF extraction as this currently seems to be the best alternative

Usage

require 'lobbyliste'

list = Lobbyliste.fetch_and_parse
organisation = list.organisations.first

organisation.name #=> 1219. Deutsche Stiftung für interreligiösen und interkulturellen Dialog e. V.

organisation.people.map {|person| person.name} #=> ["Claudius Groß", "Markus Hoymann", "Thomas M. Schimmel"]

organisation.tags #=> ["Kultur", "Religion"]

organisation.abbreviations #=> []

address = organisation.address
puts address.full_address
# 1219. Deutsche Stiftung für interreligiösen und #interkulturellen Dialog e. V.
# Hinter der katholischen Kirche 3
# 10117 Berlin
# Deutschland
# Tel: +4930 51057773
# Fax: +4930 51057785
# Email: schimmel@1219.eu
# http://www.1219.eu

CLI

You can also use this gem on your comandline. It will dump the complete list as JSON

For example to create a gziped json file run:

$ lobbyliste | gzip > lobbyliste.json.gz 

Special Thanks

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/FHG-IMW/lobbyliste. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

About

Ruby crawler for the list of lobbyists published by German Bundestag

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published