• Stars
    star
    182
  • Rank 211,154 (Top 5 %)
  • Language
    Python
  • Created about 8 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

📅 Simple alternative to Doodle polls and scheduling (Python 3, Django 5, some JavaScript)
pre-commit

What is jawanndenn?

Screenshot of poll creation in jawanndenn

jawanndenn is a simple web application to schedule meetings and run polls, a libre alternative to Doodle. It is using the following technology:

jawanndenn is libre software developed by Sebastian Pipping. The server code is licensed under the GNU Affero GPL license version 3 or later whereas the client code is licensed under the GNU GPL license version 3 or later.

Please report bugs and let me know if you like it.

Poll Setup Format

The textarea titled "Setup (JSON)" uses a simple JSON-based format that knows the following keys:

  • equal_width — a bool to control whether all options are pumped up to the same width (true or false) to counter potential voter bias
  • lifetime — duration after which this poll will be deleted; can be "week" or "month"; an enum-like string
  • options — a list of strings, one for each option; supports Markdown-like syntax for: bold, italic, inline code
  • title — the title or headline of the poll to run; supports Markdown-like syntax for: bold, italic, inline code

Installation

To install the latest release without cloning the Git repository:

# pip3 install jawanndenn --user

To install from a Git clone:

# ./setup.py install --user

Deployment with docker-compose

Create a simple file .env like this one:

JAWANNDENN_POSTGRES_NAME=jawanndenn
JAWANNDENN_POSTGRES_USER=jawanndenn
JAWANNDENN_POSTGRES_PASSWORD=dEb2PIcinemA8poH
JAWANNDENN_SECRET_KEY=606ea88f183a27919d5c27ec7f948906d23fdd7821684eb59e8bcf7377e3853b

Make sure to adjust these values after copy and paste!

You can then build and run a docker image using docker-compose up --build.

The app is served on localhost:54080. PostgreSQL data is saved to ~/.jawanndenn-docker-pgdata/ on the host system. There is also an instance of Redis used for cross-process rate limiting, and a "cron" housekeeping container that will go delete polls that have exceeded their configured lifetime, every 60 minutes.

(If you need a low-maintenance SSL reverse proxy in front of jawanndenn, docker-ssl-reverse-proxy could be of interest.)

There is a few more environment variables that you could want to adjust in your environment. Altogether, there are these variables:

Environment variables

DJANGO_SETTINGS_MODULE

Django settings module to use, leave as is, defaults to jawanndenn.settings (see docker-compose.yml)

JAWANNDENN_ALLOWED_HOSTS

Hostnames to serve jawanndenn at, list separated by comma, is set to jawanndenn.de,www.jawanndenn.de on the main production server, defaults to 127.0.0.1,0.0.0.0,localhost (see jawanndenn/settings.py)

JAWANNDENN_DEBUG

Debug mode, disabled for all values but True, disabled by default, should never be enabled in production for security (see jawanndenn/settings.py)

JAWANNDENN_MAX_POLLS

Maximum total number of polls to store, denial of service protection, defaults to 1000 (see jawanndenn/settings.py and docker-compose.yml)

JAWANNDENN_MAX_VOTES_PER_POLL

Maximum total number of polls to store, denial of service protection, defaults to 40 (see jawanndenn/settings.py)

JAWANNDENN_POSTGRES_HOST

Hostname of the PostgreSQL database to connect to; defaults to postgres (see docker-compose.yml)

JAWANNDENN_POSTGRES_NAME

Database name of the PostgreSQL database to connect to; no default, always required

JAWANNDENN_POSTGRES_PASSWORD

Password for log-in with the PostgreSQL database; no default, always required

JAWANNDENN_POSTGRES_PORT

Port of the PostgreSQL database to connect to; defaults to 5432 (see docker-compose.yml)

JAWANNDENN_POSTGRES_USER

Username for log-in with the PostgreSQL database; no default, always required

JAWANNDENN_REDIS_HOST

Hostname of the Redis database to connect to; defaults to redis (see docker-compose.yml)

JAWANNDENN_REDIS_PORT

Port of the Redis database to connect to; defaults to 6379 (see docker-compose.yml)

JAWANNDENN_SECRET_KEY

Django secret key; should be long, generated, not used elsewhere; no default, always required

JAWANNDENN_SENTRY_DSN

Data source name (DSN) for use with Sentry, disabled/empty by default (see jawanndenn/settings.py)

JAWANNDENN_URL_PREFIX

Prefix string to insert into URLs rather after the domain name to help with hosting multiple apps under the same domain side by side; e.g. prefix prefix123 will result in URLs like https://<domain>/prefix123/poll/<id>; empty by default (see jawanndenn/settings.py)

Command line usage

When installed, invocation is as simple as

# jawanndenn

During development, you may want to run jawanndenn from the Git clone using

# PYTHONPATH=. python3 -m jawanndenn --debug

Currently supported arguments are:

# jawanndenn --help
usage: jawanndenn [-h] [--debug] [--host HOST] [--port PORT]
                  [--url-prefix PATH] [--database-sqlite3 FILE]
                  [--django-secret-key-file FILE] [--max-polls COUNT]
                  [--max-votes-per-poll COUNT] [--dumpdata]
                  [--loaddata FILE.json]

optional arguments:
  -h, --help            show this help message and exit
  --debug               Enable debug mode (default: disabled)
  --host HOST           Hostname or IP address to listen at (default:
                        127.0.0.1)
  --port PORT           Port to listen at (default: 8080)
  --url-prefix PATH     Path to prepend to URLs (default: "")
  --database-sqlite3 FILE
                        File to write the database to (default:
                        ~/jawanndenn.sqlite3)
  --django-secret-key-file FILE
                        File to use for Django secret key data (default:
                        ~/jawanndenn.secret_key)

limit configuration:
  --max-polls COUNT     Maximum number of polls total (default: 1000)
  --max-votes-per-poll COUNT
                        Maximum number of votes per poll (default: 40)

data import/export arguments:
  --dumpdata            Dump a JSON export of the database to standard output,
                        then quit.
  --loaddata FILE.json  Load a JSON export of the database from FILE.json,
                        then quit.

Migrating data from jawanndenn 1.x to 2.x

Migration takes four steps:

  1. Update to the latest version of jawanndenn 1.x, e.g. by running: pip2 install --upgrade 'jawanndenn<2'; the JSON data export was first introduced with release 1.6.3.
  2. Export existing polls:
    1. If you're using the commend line app: python2 -m jawanndenn --dumpdata > dump.json
    2. If you're using docker-compose: docker-compose run -T jawanndenn --database-pickle /data/polls.pickle --dumpdata > dump.json
  3. Deploy latest jawanndenn 2.x somewhere (as described above) or just pip3 install 'jawanndenn>=2' it somewhere
  4. Import the JSON dump created in step (2):
    1. If you're using the commend line app: python3 -m jawanndenn --loaddata dump.json
    2. If you're using docker-compose: docker-compose run -T jawanndenn sh -c 'cat > /tmp/dump.json && DJANGO_SETTINGS_MODULE=jawanndenn.settings python3 -m django loaddata /tmp/dump.json' < dump.json

Goals

Please check out the list of upcoming features.

Non-goals

  • Use of heavy frontend frameworks: building blocks only
  • Read availability from calendars

Thanks

Special thanks to Arne Maier (@KordonDev) for reporting an XSS vulnerability, responsibly.

More Repositories

1

git-delete-merged-branches

🔥 Command-line tool to delete merged Git branches
Python
858
star
2

grub2-theme-preview

🌇 Preview a full GRUB 2.x theme (or just a background image) using KVM / QEMU
Python
286
star
3

image-bootstrap

⛅ Creates Linux chroots and bootable virtual machine images; command line tool (Python 3)
Python
245
star
4

django-berlin

🍀 Ever wondered who's doing Django... in Berlin?
79
star
5

sandwine

🍷 Command-line tool to run Windows apps with Wine and bwrap/bubblewrap isolation on Linux
Python
66
star
6

wnpp.debian.net

🌍 Code powering website "Debian Packages that Need Lovin'" created in 2009
Python
42
star
7

resolve-march-native

🐌 Tool to determine what GCC flags -march=native would resolve into
Python
32
star
8

docker-ssl-reverse-proxy

🔒 Easy-to-use auto-SSL reverse proxy as a Docker container based on Caddy and Let’s Encrypt
Python
23
star
9

xiangqi-setup

🎲 Generate razor-sharp Xiangqi (Chinese chess) setup graphics; command line tool + themes
Python
22
star
10

binary-gentoo

🐮 Collection of simple CLI tools to help build Gentoo packages on a non-Gentoo Linux host
Python
17
star
11

django-createsuperuserwithpassword

Django management command to create usable super users, programmatically
Python
16
star
12

svneverever

🔦 Collects path entries across SVN history (Python)
Python
15
star
13

surrogates

😌 Encode and decode pairs of surrogate characters in Python 3
Python
11
star
14

django-migration-vis

to visualize django migration graphs with GraphVis
Python
11
star
15

golang-berlin

🍀 Ever wondered who's doing Golang... in Berlin?
10
star
16

antijack

🥷 seccomp-based anti-TTY-hijacking proof-of-concept (prevents TIOCSTI and TIOCLINUX)
C
10
star
17

go-wait-for-it

🦫 Wait for service(s) to be available before executing a command.
Go
9
star
18

visdriver

🎦 visdriver uses Winamp plug-ins to visualize audio; targets Wine on GNU/Linux primarily
C
8
star
19

fetchcommandwrapper

🐮 Wrapper integrating aria2 (https://aria2.github.io/) into portage's FETCHCOMMAND for faster downloads (Python)
Python
8
star
20

no-cyclic-imports

♻️ Tool to detect and report on cyclic imports in a Python codebase
Python
8
star
21

mozilla-password-decrypt

🔓 Decrypt passwords stored by Firefox, Thunderbird, Iceweasel, Icedove using libnss3.so
Python
7
star
22

update-notifier-tray

💡 Update indicator tray icon for Debian and Gentoo; meant to replace gone update-notifier
Python
7
star
23

shared-library-version-bump

🌍 A web-tool to help with bumping -version-info linker arguments with your upcoming release of a shared library
HTML
6
star
24

rnv

🐠 Relax NG Compact Syntax validator by David Tolpin; official upstream maintenance repository
C
5
star
25

vue-tristate-checkbox

Vue.js component implementing a cycling tristate checkbox that supports form submission
HTML
5
star
26

extract-hotline-miami-soundtrack

🎵 Extract soundtrack from Hotline Miami PC game .wad file (OGG Vorbis); command line tool
C
5
star
27

enum

🔢 Command line tool to enumerate values, replacing GNU seq and *BSD jot (moved from https://fedorahosted.org/enum/)
C
4
star
28

svgstrip

🛀 Tool that strips private information from SVG files (Python)
Python
4
star
29

import-watch

Trace module imports and detect/deny cyclic imports at runtime
Python
3
star
30

dsp_restless

The Restless Winamp Plugin (a.k.a. dsp_restless) of 2005
C++
3
star
31

backup-my-hub

🐙 Simple command line tool to make local backups of GitHub repositories and gists (Python)
Python
3
star
32

rust-for-it

🦀 Wait for one or more services (TCP port) to be available before executing a command; Rust version of wait-for-it
Rust
3
star
33

xiangqi-book-example

Example of a book featuring print-quality Xiangqi board setup graphics generated on-the-fly using xiangqi-setup; PDF output download at https://github.com/hartwork/xiangqi-book-example/releases/download/1.0.0/book_1_0_0.pdf
TeX
3
star
34

sdl_video_demo

Demos fast blitting of a video buffer to the screen with scaling while respecting aspect-ratio in C99 for both SDL 2 and SDL 1
C
2
star
35

klogripper

🚽 Kernel log ripper, i.e. a union of dmesg and tail -f (C)
C
2
star
36

newspipe

📰 RSS/Atom aggregation to e-mail. Fork of Newspipe 1.1.9 with SSL and packaging (Python)
Python
2
star
37

slides_shell_we_continue

🐚 Slides for a talk on Bash and the terminal (in German)
CSS
2
star
38

gentoo-workshop-troisdorf-2015-08-01

🐮 Slides for a talk on how to write Ebuilds for Gentoo (in German); PDF: http://downloads.trolug.de/2015-09-01_gentoo-workshop-troisdorf_sebastian_pipping_paketierung.pdf
Makefile
2
star
39

slides_python_json_emoji_crash_story

🗿 Slides of talk "Python JSON Emoji crash story" at Django Meetup Berlin 2020-02-18; latest PDF: https://github.com/hartwork/slides_python_json_emoji_crash_story/releases/download/v4/python-json-emoji-crash-story-2020-02-18-v4.pdf
Makefile
2
star
40

OpenXiangqi

🎲 Chinese chess (Java, GNU AGPL v3 or later)
Java
1
star
41

out_bridge

The Outbridge Winamp Plugin (a.k.a. out_bridge) of 2005/2006
C++
1
star
42

gen_freeze

The Freeze Winamp Plugin (a.k.a. gen_freeze) of 2006
C++
1
star
43

dsp_freeverb_gpl

The GPL Freeverb Winamp Plugin (a.k.a. dsp_freeverb_gpl) of 2006
C++
1
star
44

flasktop

🔝 "top in the browser" using Flask and jQuery DataTables (Python, JavaScript)
Python
1
star
45

audio_pump_demo

🎙️ Demos pumping audio from the microphone to headphones/speakers in C99 for PulseAudio, PortAudio and SDL 2
C
1
star
46

beamer-theme-matrix

🌐 LaTeX Beamer Theme Matrix of 2009 (Bash)
Shell
1
star
47

gen_allmusic

The Allmusic Hotkey Winamp Plugin (a.k.a. gen_allmusic) of 2006
C++
1
star