mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 15:43:14 +01:00
Stadtratmonitor – Frontend
https://stadtratmonitor.leipzig.codefor.de
2139ccae04
some usage documentation |
||
---|---|---|
app | ||
bin | ||
config | ||
db | ||
lib | ||
log | ||
public | ||
spec | ||
test | ||
vendor/assets | ||
.coveralls.yml | ||
.dockerignore | ||
.gitignore | ||
.project | ||
.rspec | ||
.ruby-version | ||
.travis.yml | ||
config.ru | ||
docker-compose.yml | ||
Dockerfile | ||
Gemfile | ||
Gemfile.lock | ||
Guardfile | ||
LICENSE | ||
Rakefile | ||
README.md |
Stadtratmonitor
Usage / Features
The Stadtratmonitor Leipzig is a lightweight user interface for performing full text searches against paper contents issued to the city council of Leipzig. Note, this solution uses the data from Ratsinformationssystem Leipzig that also offers text search capabilities.
Sorting
- Sort by date, paper was issued
- Sort by relevance, e.g. how often the search keyword appears inside the title resp. the content of the paper
Filtering
Staying up-to-date
- Subscribing
- Firefox RSS extension
- Google Chrome RSS extension
- Reading
- Google Chrome Extension
- ...
Setup
There are two ways to run this app: using a local development setup, or using docker.
Local machine setup
- Install Ruby, Bundler, Elasticsearch
- Start Elasticsearch:
elasticsearch
- Setup Rails app:
bundle && bundle exec rake db:setup
- See "Importing data" below
- Start Rails server:
bundle exec rails s
- Visit http://localhost:3000
Using docker
- Install docker and docker-compose: https://docs.docker.com/compose/install/
- Start the app:
docker-compose up
- Initialize the database:
docker-compose run web rake db:setup
- See "Importing data" below
- Get the address of the docker host:
docker-machine ip default
- Point your browser to: 'http://<IP of docker host>:3000'
Importing data and building the index
- Currently an API key for morph is required:
cp config/morph.yml.example config/morph.yml
Edit the morph.yml file and insert the Morph API key - Import the data from our scraper:
docker-compose run web rake import_papers
- Build the elasticsearch index:
docker-compose run web rake index:rebuild