Czech blacklist info page
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
archlinux
blacklist
debian
etc
tests
.gitignore
.gitlab-ci.yml
.version.yml
LICENSE
MANIFEST.in
README.md
babel.cfg
code-check.sh
manage.py
pre-commit.sh
requirements.txt
setup.py
stdeb.cfg
translation_compile.sh
translation_generate.sh
translation_update.sh
wsgi.py

README.md

Czech blacklist info page

This is simple Czech Web BLACKLIST info page with simple API to retrieve blacklist items written in Python Flask

Original blacklist is in PDF (Yes in PDF, i'm not joking) on MFCR web page

Features

  • JSON API
  • Auto crawling and parsing of PDF
  • List of blacklist items with blocking info, URL, page thumbnail and paging
  • Administration of blacklist
  • Your provider blocking info
  • OSS :)

Installation

Debian, Ubuntu and Archlinux packages are supported!

Blacklist is controled by 3 systemd services:

blacklist # Runs integrated web server (not needed if you run it behind uwsgi)
blacklist_celeryworker # To process celery background tasks
blacklist_celerybeat # To process periodic tasks

Debian and derivates

Add repository by running these commands

$ wget -O - https://apt.salamek.cz/apt/conf/salamek.gpg.key|sudo apt-key add -
$ echo "deb     https://apt.salamek.cz/apt all main" | sudo tee /etc/apt/sources.list.d/salamek.cz.list

And then you can install a package python3-blacklist

$ apt update && apt install python3-blacklist

Archlinux

Add repository by adding this at end of file /etc/pacman.conf

[salamek]
Server = https://arch.salamek.cz/any
SigLevel = Optional

and then install by running

$ pacman -Sy blacklist

Source install

$ apt install openjdk-8-jre xvfb wkhtmltoimage redis-server
$ git clone https://github.com/Salamek/blacklist.git
$ cd blacklist
$ pip install -r requirements.txt
$ blacklist post_install --config_prod
$ bower install
$ python3 manage.py server
$ python3 manage.py celerybeat
$ python3 manage.py celeryworker

Setup

After successful install you should run a setup script to configure your installation (database type, credentials, webserver) and generate default user:

$ blacklist setup
# Or python3 manage.py setup for source install

UWSGI

Here is example UWSGI configuration, dont forgot to stop and disable blacklist service after your uwsgi server is up and running

[uwsgi]
uid = blacklist
master = true
chdir = /usr/lib/python3/dist-packages/blacklist
socket = /tmp/uwsgi-blacklist.sock
module = wsgi
callable = app
plugins = python3
buffer-size = 32768

Nginx

server {
        listen 80;
        listen [::]:80;
        server_name blacklist.example.com;

        root /usr/lib/python3/dist-packages/blacklist;

        location / {
                uwsgi_pass unix:///tmp/uwsgi-blacklist.sock;
                include uwsgi_params;
        }
}