'''
Copyright (C) 2020 Detlef Wolf detlefwuff@googlemail.com
https://sourceforge.net/projects/webpoll/
This program named WEBPOLL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is in file LICENSE.html
in the same directory as this source code.
If not, see https://www.gnu.org/licenses/
'''
Project: WEBPOLL - A web application to collect answers anonymously.
First use case is a "COVID19 infection eagerness monitor" (Infektionsbereitschaftsmonitor)
The program is in its infancy. I consider it in proof-of-concept stage.
For high-frequency use, I recommend to exchange the file storage with a database,
and go from CGIs to something more lightweight (main problem is that the
CGI has to load the python interpreter and code on every click of every user).
An obvious refactoring opportunity would be to concentrate the code for
'payload' data (the questions and their answers) in one class. Currently this
knowledge is distribute across wp_database.py, wp_dataentryform.py, wp_report.py,
wp_plot.py.
Installation:
- have a python 3.7 installation with
matplotlib and pandas ready
- have an apache webserver with a cgi-bin directory configured to execute CGIs
let assume it is /somewhere/cgi-bin/
- create a directory /somewhere/cgi-bin/mywebpoll/
copy the files in this directory there
- copy wp_config_template.py to wp_config.py, edit as needed
- copy wp.cgi.template to wp.cgi, edit python path
- copy wp_about1.template.html to wp_about1.html, edit as needed
- invoke http://<yourserver>/cgi-bin/mywebpoll/wp.cgi
- that should be all.
Configuration
- The program supports two modes of operation.
- A group password can be configured.
- A data download password can be configured.
Modes of Opertion
- Zustandsanzeige: snapshot mode
- Verlaufsstudie: longitudinal study
- Snapshot mode:
-- keep only display timestamp and that one only with day resolution
-- no IP# recording
-- keep only last record per session
-- show personal data as extra function
-- option to delete own data
- longitudinal study
-- no delete
-- keep as much as possible
-- show my data over time