mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2025-02-27 20:21:55 +01:00
75 lines
3.9 KiB
Markdown
75 lines
3.9 KiB
Markdown
# Stadtratmonitor
|
|
|
|
**Offical site:** [stadtratmonitor.leipzig.codefor.de](https://stadtratmonitor.leipzig.codefor.de/)
|
|
|
|
## 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](https://ratsinformation.leipzig.de/allris_leipzig_public/) that also offers [text search capabilities](https://ratsinformation.leipzig.de/allris_leipzig_public/vo040).
|
|
|
|
### 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
|
|
* By paper type
|
|
|
|

|
|
|
|
* By originator
|
|
|
|

|
|
|
|
### Staying up-to-date
|
|
#### General
|
|
* Subscribing
|
|
* [Google Chrome RSS extension](https://chrome.google.com/webstore/detail/rss-subscription-extensio/nlbjncdgjeocebhnmkbbbdekmmmcbfjd?hl=de)
|
|
* [Firefox RSS extension](https://addons.mozilla.org/en-US/firefox/addon/rss-feed-icon-in-navbar/)
|
|
* Reading
|
|
* [Google Chrome Extension](https://chrome.google.com/webstore/detail/rss-feed-reader/pnjaodmkngahhkoihejjehlcdlnohgmp)
|
|
* [Firefox Extension](https://addons.mozilla.org/en-US/firefox/addon/simple-rss-reader-srr)
|
|
* [RSSOWL](http://www.rssowl.org/)
|
|
|
|
#### Example using Firefox and RSSOWL
|
|
Click on the newsfeed icon in the address bar
|
|

|
|
|
|
Copy the URL from the address bar
|
|

|
|
|
|
Create a new Feed in RSSOWL and paste the just copied URL in the form
|
|

|
|
|
|
When updating the feed in RSSOWL (or any other RSS reader of your choice) time after time all new papers matching the search query criteria will appear.
|
|
|
|
## Setup
|
|
There are two ways to run this app: using a local development setup, or using
|
|
docker.
|
|
|
|
### Local machine setup
|
|
1. Install Ruby, Bundler, Elasticsearch
|
|
2. Start Elasticsearch: `elasticsearch`
|
|
3. Setup Rails app: `bundle && bundle exec rake db:setup`
|
|
4. See “[Importing data via Allris Scraper](#importing-data-via-allris-scraper-optional)” below
|
|
5. Start Rails server: `bundle exec rails s`
|
|
6. Open [localhost:3000](http://localhost:3000)
|
|
|
|
### Using Container (Docker/Podman/…)
|
|
1. [Install Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable)
|
|
2. Build the application: `yarn && yarn build:css`
|
|
3. [Install Docker and Docker Compose](https://docs.docker.com/compose/install/)
|
|
4. Start the application: `docker-compose up`
|
|
5. Initialize the database: `docker exec stadtratmonitor-web sh -c "rake db:setup && rake import_papers && rake index:rebuild"`
|
|
6. Open [localhost:3000](http://localhost:3000)
|
|
|
|
### Importing data via Allris Scraper (optional)
|
|
1. You can use [our Allris Scraper](https://github.com/CodeforLeipzig/allris-scraper) to download the papers (resp. their links) from the [OPARL](https://oparl.org/) API, this will produce an input.json file
|
|
2. Put this input.json to a public web server and set the URL to this file then in:
|
|
`app/controllers/import_controller.rb` and `lib/tasks/import_papers.rake`
|
|
|
|
### Running tests
|
|
Assuming docker and docker-compose is installed:
|
|
1. `docker-compose run web bin/run-tests`
|