Coder Social home page Coder Social logo

codeformuenster / sitzplan-rat Goto Github PK

View Code? Open in Web Editor NEW
1.0 9.0 1.0 1.4 MB

Der Sitzplan der Sitzungen des Rats Münster als Webseite

Home Page: http://sitzplan.rat-muenster.de/

License: Apache License 2.0

JavaScript 4.44% CSS 5.52% Python 3.06% HTML 83.73% Jinja 3.24%
oparl city-council kommunalpolitik politics opendata muenster

sitzplan-rat's Introduction

HTML seating plan for council meetings Münster

This repository reads council member information from oparl and generates a HTML from it. Sadly, the seating information is not part of oparl and needs to be entered manually.

How does it work?

  • The script generateSitzplan.py will read all board members of a committee via OParl API interface and then write the member list to the file config-members.json, if the file does not exist.
  • If the file exists, then it will read the seating information from the field seat of every member and then render the committee seating plan to the file index.html

Usage

    # Step 1: On the first run, the file config-members.json will be generated:
    python3 generateSitzplan.py

    # Step 2: Manually enter the seating information
    # Now you can open the file `config-members.json`
    # and fill out all the seating information in the fields `seat`.

    # Step 3: Run generateSitzplan.py again to generate the index.html
    python3 generateSitzplan.py

Local development instructions

It is easier to fill out the seating information if you get "live feedback". That is why you should do the following:

  1. Open shellwindow #1 to watch config files for changes and run our python-script to regenerate the Rats-Sitzplan:

    # Watch for file changes and run generateSitzplan
    #   "-f" => File to watch (can be repeated)
    #   "-c" => Command to execute on file change
    inotify-hookable -f config-members.json -f generateSitzplan.py -c 'python3 generateSitzplan.py'
    
    # Alternative version:
    #   "-w" => Directory to watch ("dot" = current dir)
    #   "-i" => File patterns to ignore (we ignore html files, because they will be generated, which triggers a recursive call)
    inotify-hookable -w . -i *.html config-members.json -f generateSitzplan.py -c 'python3 generateSitzplan.py'
  2. Open Shellwindow #2 to serve the HTML:

        # Run http server
        python3 -m http.server 8000
  3. Open the file config-members.json in your favourite editor (e.g. VSCode) and enter the seating information

  4. Point your webbrowser to localhost:8000 and reload from time to time

Pre 2020 version

We have an old version of this script that basically does exactly the same. The difference is that it uses gatsby.js instead of vanilla python. You can find the old version in the directory "2019".

sitzplan-rat's People

Contributors

dependabot[bot] avatar felixerdy avatar rubbeldiekatz avatar tomsrocket avatar ubergesundheit avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rubbeldiekatz

sitzplan-rat's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.