Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Salamek/blacklist
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.23
Choose a base ref
...
head repository: Salamek/blacklist
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Mar 5, 2018

  1. Update README.md

    Salamek authored Mar 5, 2018
    Copy the full SHA
    43bb141 View commit details
  2. Update README.md

    Salamek authored Mar 5, 2018
    Copy the full SHA
    a0692f3 View commit details

Commits on Mar 6, 2018

  1. Fix when we use -e

    Salamek authored Mar 6, 2018
    Copy the full SHA
    aec9827 View commit details

Commits on Mar 28, 2018

  1. Copy the full SHA
    8dec623 View commit details

Commits on Mar 29, 2018

  1. Added few debug prints

    Salamek committed Mar 29, 2018
    Copy the full SHA
    f1a7325 View commit details
  2. New version 1.0.24

    Salamek committed Mar 29, 2018
    Copy the full SHA
    27974c4 View commit details
  3. Copy the full SHA
    ecfbd07 View commit details
  4. New version 1.0.25

    Salamek committed Mar 29, 2018
    Copy the full SHA
    c72b42a View commit details

Commits on Jun 11, 2018

  1. Fixes #19

    Salamek committed Jun 11, 2018
    Copy the full SHA
    0bf1ad0 View commit details
  2. Closes #18

    Salamek committed Jun 11, 2018
    Copy the full SHA
    c963ec8 View commit details
  3. Fix archlinux build

    Salamek committed Jun 11, 2018
    Copy the full SHA
    b3cade1 View commit details
  4. Use version app

    Salamek committed Jun 11, 2018
    Copy the full SHA
    5aa03a2 View commit details
  5. New version 1.0.26

    Salamek committed Jun 11, 2018
    Copy the full SHA
    7b2b74d View commit details
  6. Add version config to git

    Salamek committed Jun 11, 2018
    Copy the full SHA
    ec874d0 View commit details

Commits on Jun 12, 2018

  1. Copy the full SHA
    36bc746 View commit details
  2. Update .gitignore

    Salamek committed Jun 12, 2018
    Copy the full SHA
    7369645 View commit details
  3. New version 1.0.27

    Salamek committed Jun 12, 2018
    Copy the full SHA
    7fec6cc View commit details
  4. Typo fix

    Salamek committed Jun 12, 2018
    Copy the full SHA
    3ad2b1d View commit details
  5. New version 1.0.28

    Salamek committed Jun 12, 2018
    Copy the full SHA
    c2c2a58 View commit details
  6. Typo

    Salamek committed Jun 12, 2018
    Copy the full SHA
    2b7bc07 View commit details
  7. New version 1.0.29

    Salamek committed Jun 12, 2018
    Copy the full SHA
    ce3928d View commit details
  8. Ok no enable for you

    Salamek committed Jun 12, 2018
    Copy the full SHA
    4d40df0 View commit details
  9. New version 1.0.30

    Salamek committed Jun 12, 2018
    Copy the full SHA
    b22ea51 View commit details
  10. Use inline check

    Salamek committed Jun 12, 2018
    Copy the full SHA
    d8b5d1e View commit details
  11. New version 1.0.31

    Salamek committed Jun 12, 2018
    Copy the full SHA
    bd75237 View commit details
  12. Fix pdf name

    Salamek committed Jun 12, 2018
    Copy the full SHA
    0ed11d2 View commit details
  13. New version 1.0.32

    Salamek committed Jun 12, 2018
    Copy the full SHA
    b1e291d View commit details
  14. Added api.get_screenshot

    Salamek committed Jun 12, 2018
    Copy the full SHA
    a808d5d View commit details
  15. New version 1.0.33

    Salamek committed Jun 12, 2018
    Copy the full SHA
    3302a1c View commit details

Commits on Sep 4, 2018

  1. Use .isoformat() for dates

    Salamek authored Sep 4, 2018
    Copy the full SHA
    ba2e76e View commit details
  2. New version 1.0.34

    Salamek committed Sep 4, 2018
    Copy the full SHA
    98ac44c View commit details

Commits on Sep 5, 2018

  1. Fix in date formatting

    Salamek committed Sep 5, 2018
    Copy the full SHA
    ad41f7d View commit details
  2. New version 1.0.35

    Salamek committed Sep 5, 2018
    Copy the full SHA
    f64ecc4 View commit details

Commits on Sep 25, 2018

  1. Fix log flood

    Salamek authored Sep 25, 2018
    Copy the full SHA
    d1ffb75 View commit details

Commits on Sep 26, 2018

  1. Update blacklist.py

    Salamek authored Sep 26, 2018
    Copy the full SHA
    04e3ff7 View commit details

Commits on Jun 14, 2019

  1. Flat bl file

    Petr Kejval committed Jun 14, 2019
    Copy the full SHA
    39fd8d3 View commit details
  2. newline

    Petr Kejval committed Jun 14, 2019
    Copy the full SHA
    5fb825c View commit details
  3. Merge pull request #21 from pkejval/master

    Flat blacklist file
    Salamek authored Jun 14, 2019
    Copy the full SHA
    1c43464 View commit details
  4. Use psycopg2-binary

    Salamek authored Jun 14, 2019
    Copy the full SHA
    2082802 View commit details
  5. Update py3dist-overrides

    Salamek authored Jun 14, 2019
    Copy the full SHA
    2f5c031 View commit details

Commits on Sep 19, 2019

  1. Create FUNDING.yml

    Salamek authored Sep 19, 2019
    Copy the full SHA
    21ebb0b View commit details

Commits on Oct 2, 2019

  1. Update blacklist.service

    Salamek authored Oct 2, 2019
    Copy the full SHA
    9eb378e View commit details
  2. Copy the full SHA
    5a144b7 View commit details
  3. Copy the full SHA
    577c4c5 View commit details
  4. Update requirements.txt

    Salamek authored Oct 2, 2019
    Copy the full SHA
    543f75c View commit details
  5. Update PKGBUILD

    Salamek authored Oct 2, 2019
    Copy the full SHA
    6742333 View commit details
  6. Update .gitlab-ci.yml

    Salamek authored Oct 2, 2019
    Copy the full SHA
    850f8a5 View commit details
  7. New version 1.0.36

    Salamek committed Oct 2, 2019
    Copy the full SHA
    83d4602 View commit details
  8. Copy the full SHA
    f328f67 View commit details
  9. Remove sudo from CI

    Salamek authored Oct 2, 2019
    Copy the full SHA
    6de977f View commit details
Showing with 741 additions and 482 deletions.
  1. +104 −6 .gitignore
  2. +41 −73 .gitlab-ci.yml
  3. +15 −0 .version.yml
  4. +15 −11 README.md
  5. +8 −7 archlinux/PKGBUILD
  6. +53 −19 archlinux/blacklist.install
  7. +1 −2 blacklist/__init__.py
  8. +5 −7 blacklist/application.py
  9. +105 −62 blacklist/bin/blacklist.py
  10. +9 −10 blacklist/blueprints.py
  11. +3 −1 blacklist/config.py
  12. +0 −4 blacklist/extensions.py
  13. +12 −11 blacklist/middleware.py
  14. +0 −24 blacklist/static/bower.json
  15. +0 −1 blacklist/static/img/thumbnails/README.md
  16. +64 −0 blacklist/static/package-lock.json
  17. +10 −0 blacklist/static/package.json
  18. +0 −1 blacklist/static/pdf/README.md
  19. +42 −28 blacklist/tasks/blacklist.py
  20. +1 −1 blacklist/templates/400.html
  21. +1 −1 blacklist/templates/403.html
  22. +1 −1 blacklist/templates/404.html
  23. +1 −1 blacklist/templates/500.html
  24. +12 −15 blacklist/templates/base.html
  25. +0 −6 blacklist/tools/Acl.py
  26. +8 −0 blacklist/tools/helpers.py
  27. +47 −11 blacklist/views/api/index.py
  28. +6 −6 blacklist/views/api/templates/api.index.doc.html
  29. +3 −3 blacklist/views/blacklist/index.py
  30. +3 −3 blacklist/views/blacklist/templates/blacklist.index.blacklist.html
  31. +1 −1 blacklist/views/blacklist/templates/blacklist.index.edit.html
  32. +1 −1 blacklist/views/blacklist/templates/blacklist.index.new.html
  33. +1 −1 blacklist/views/crawl/index.py
  34. +1 −1 blacklist/views/crawl/templates/crawl.index.crawl.html
  35. +17 −0 blacklist/views/download/index.py
  36. +5 −1 blacklist/views/download/templates/download.index.download.html
  37. +3 −3 blacklist/views/home/index.py
  38. +5 −5 blacklist/views/home/templates/home.index.home.html
  39. +2 −2 blacklist/views/sign/index.py
  40. +1 −1 blacklist/views/sign/templates/sign.index.login.html
  41. +4 −2 blacklist/views/statistics/index.py
  42. +3 −3 blacklist/views/user/index.py
  43. +1 −1 blacklist/views/user/templates/user.index.edit.html
  44. +1 −1 blacklist/views/user/templates/user.index.new.html
  45. +3 −3 blacklist/views/user/templates/user.index.user.html
  46. 0 { → blacklist}/wsgi.py
  47. +1 −0 debian/py3dist-overrides
  48. +54 −19 debian/python3-blacklist.postinst
  49. +4 −2 etc/blacklist/config.yml
  50. +2 −1 etc/systemd/system/blacklist.service
  51. +2 −1 etc/systemd/system/blacklist_celerybeat.service
  52. +2 −1 etc/systemd/system/blacklist_celeryworker.service
  53. +0 −22 requirements.txt
  54. +54 −29 setup.py
  55. +3 −2 stdeb.cfg
  56. +0 −64 version.py
110 changes: 104 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,107 @@
bower_components
*.pyc
/blacklist/static/img/thumbnails/*
!/blacklist/static/img/thumbnails/README.md
node_modules
.idea/*

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

/blacklist/static/pdf/*
!/blacklist/static/pdf/README.md
# mypy
.mypy_cache/
114 changes: 41 additions & 73 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,41 @@
stages:
- test
- package
- packagetest
- deploy

test:debian:
stage: test
script:
- apt-get update -qy
- apt-get install -y python3-dev python3-pip
- pip3 install -r requirements.txt
- pip3 install .
- python3 setup.py test
tags:
- debian

test:archlinux:
stage: test
script:
- pacman -Sy python-pip --noconfirm #gcc
- pip install -r requirements.txt
- python setup.py test
tags:
- archlinux
#test:archlinux:
# stage: test
# script:
# - pacman -Sy python-pip python-setuptools --noconfirm
# - pip install .
# - python setup.py test
# tags:
# - archlinux

package:debian:
stage: package
script:
- apt-get update -qy
- apt-get install -y curl gnupg
- curl -sL https://deb.nodesource.com/setup_8.x | bash -
- curl -sL https://apt.salamek.cz/apt/conf/salamek.gpg.key | apt-key add -
- echo "deb https://apt.salamek.cz/apt all main" | tee /etc/apt/sources.list.d/salamek.cz.list
- apt-get install -y curl gnupg apt-transport-https wget
- wget -O- https://repository.salamek.cz/deb/salamek.gpg | tee /usr/share/keyrings/salamek-archive-keyring.gpg
- echo "deb [signed-by=/usr/share/keyrings/salamek-archive-keyring.gpg] https://repository.salamek.cz/deb/pub all main" | tee /etc/apt/sources.list.d/salamek.cz.list
- apt-get update -qy
- apt-get install -y python3-dnspython python3-pygal python3-flask-redis-helper xvfb wkhtmltopdf python3-tabula-py python3-pillow python3-pypdf2 python3-lxml python3-flask-celery-helper python3-flask-caching python3-dev python-pip redis-server python3-pip python3-stdeb python3-celery nodejs git python3-markupsafe python3-psycopg2 python3-dateutil python3-docopt python3-yaml python3-wtforms python3-raven python3-flask-migrate python3-flask-babel python3-flask-navigation python3-flask-login
- npm install -g bower
- apt-get install -y nodejs dh-python npm python3-dnspython python3-pygal python3-flask-script python3-flask-redis-helper xvfb wkhtmltopdf python3-tabula-py python3-pillow python3-pypdf2 python3-lxml python3-flask-celery-tools python3-flask-caching python3-dev redis-server python3-pip python3-stdeb python3-celery nodejs git python3-markupsafe python3-psycopg2 python3-dateutil python3-docopt python3-yaml python3-wtforms python3-raven python3-flask-migrate python3-flask-babel python3-flask-navigation python3-flask-login
- rm -rf "./deb_dist"
- cd blacklist/static
- bower install --allow-root
- npm install
- cd -
- export DEB_BUILD_OPTIONS=nocheck
- python3 setup.py --command-packages=stdeb.command bdist_deb
tags:
- debian
@@ -47,56 +45,25 @@ package:debian:
- deb_dist/*.deb
expire_in: 1d

package:archlinux:
stage: package
script:
- echo "[salamek]" >> /etc/pacman.conf
- echo "Server = https://arch.salamek.cz/any" >> /etc/pacman.conf
- echo "SigLevel = Optional" >> /etc/pacman.conf
- pacman -Sy python-pip python-dnspython python-pygal gcc nodejs wkhtmltopdf xorg-server-xvfb python-tabula python-lxml sudo git redis openssh bower python-flask-caching postgresql python-flask-celery-helper python-flask-redis-helper python-celery python-flask python-babel python-yaml python-flask-login python-flask-migrate python-flask-wtf python-raven python-docopt python-eventlet python-psycopg2 python-flask-babel python-flask-navigation fakeroot systemd python-pypdf2 --noconfirm
- useradd -m -G users -s /bin/bash package
- cd archlinux
- sudo -H -u package makepkg -f
tags:
- archlinux
#package:archlinux:
# stage: package
# script:
# - echo "[salamek]" >> /etc/pacman.conf
# - echo "Server = https://repository.salamek.cz/arch/pub/any" >> /etc/pacman.conf
# - echo "SigLevel = Optional" >> /etc/pacman.conf
# - pacman -Sy python-pip python-dnspython python-pygal python-flask-script gcc nodejs wkhtmltopdf xorg-server-xvfb python-tabula python-lxml sudo git redis openssh python-flask-caching postgresql python-flask-celery-tools python-flask-redis-helper python-celery python-flask python-babel python-yaml python-flask-login python-flask-migrate python-flask-wtf python-raven python-docopt python-eventlet python-psycopg2 python-flask-babel python-flask-navigation fakeroot systemd python-pypdf2 --noconfirm
# - useradd -m -G users -s /bin/bash package
# - chown -R package:users archlinux
# - cd archlinux
# - sudo -H -u package makepkg -f
# tags:
# - archlinux
#
# artifacts:
# paths:
# - archlinux/blacklist*.pkg.tar.zst
# expire_in: 1d

artifacts:
paths:
- archlinux/blacklist*
expire_in: 1d

packagetest:debian:
stage: packagetest
script:
- apt-get update -qy
- apt-get install -y curl gnupg apt-transport-https
- curl -sL https://apt.salamek.cz/apt/conf/salamek.gpg.key | apt-key add -
- echo "deb https://apt.salamek.cz/apt all main" | tee /etc/apt/sources.list.d/salamek.cz.list
- apt-get update -qy
- cd deb_dist
- apt install ./*.deb -qy
tags:
- virtualbox-debian
dependencies:
- package:debian
only:
- tags

packagetest:archlinux:
stage: packagetest
script:
- echo "[salamek]" >> /etc/pacman.conf
- echo "Server = https://arch.salamek.cz/any" >> /etc/pacman.conf
- echo "SigLevel = Optional" >> /etc/pacman.conf
- pacman -Sy
- cd archlinux
- pacman -U blacklist*.pkg.tar.xz --noconfirm
tags:
- virtualbox-archlinux
dependencies:
- package:archlinux
only:
- tags

repoupdate:
stage: deploy
@@ -109,14 +76,15 @@ repoupdate:
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
script:
- ssh www-data@salamek.cz 'rm -rf /var/www/arch.salamek.cz/www/any/blacklist*.pkg.tar.xz'
- ssh www-data@salamek.cz 'rm -rf /var/www/apt.salamek.cz/cache/blacklist*.pkg.tar.xz'
- scp archlinux/blacklist*.pkg.tar.xz www-data@salamek.cz:/var/www/arch.salamek.cz/www/any
- scp deb_dist/*.deb www-data@salamek.cz:/var/www/apt.salamek.cz/cache
- ssh www-data@salamek.cz '/var/www/arch.salamek.cz/update_repo.sh'
- ssh www-data@salamek.cz '/var/www/apt.salamek.cz/update_repo.sh'
#- ssh www-data@repository 'rm -rf /var/www/repository.salamek.cz/www/arch/pub/any/blacklist*.pkg.tar.zst'
- ssh www-data@repository 'rm -rf /var/www/repository.salamek.cz/cache/deb/pub/all/blacklist*.deb'
#- scp archlinux/blacklist*.pkg.tar.zst www-data@repository:/var/www/repository.salamek.cz/www/arch/pub/any
- scp deb_dist/*.deb www-data@repository:/var/www/repository.salamek.cz/cache/deb/pub/all
- ssh www-data@repository '/var/www/repository.salamek.cz/deb-pub-update.sh'
#- ssh www-data@repository '/var/www/repository.salamek.cz/arch-pub-update.sh'

dependencies:
- package:archlinux
#- package:archlinux
- package:debian
tags:
- docker
15 changes: 15 additions & 0 deletions .version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
GIT:
AUTO_COMMIT: true
AUTO_TAG: true
AUTO_PUSH: true # false=disabled, true=enabled, 'remote_name'=enabled and push to remote_name
COMMIT_MESSAGE: 'New version {version}'

REGEXPS:
'python': __version__\s*=\s*\'(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\'
'setup.py': version\s*=\s*\'(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\'
'PKGBUILD': pkgver\s*=\s*(?P<version>.*)

VERSION_FILES:
'blacklist/__init__.py': 'python'
'setup.py': 'setup.py'
'archlinux/PKGBUILD': 'PKGBUILD'
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Czech blacklist info page
# Czech Web BLACKLIST info page

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

@@ -13,7 +13,8 @@ Original blacklist is in [PDF](http://www.mfcr.cz/assets/cs/media/Zverejnovane-u
* Your provider blocking info
* OSS :)

# Installation
# Installation Guide


Debian, Ubuntu and Archlinux packages are supported!

@@ -29,14 +30,14 @@ blacklist_celerybeat # To process periodic tasks
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
$ wget -O - https://repository.salamek.cz/deb/salamek.gpg.key|sudo apt-key add -
$ echo "deb https://repository.salamek.cz/deb/pub all main" | sudo tee /etc/apt/sources.list.d/salamek.cz.list
```

And then you can install a package python3-blacklist
And then you can install a package `blacklist`

```
$ apt update && apt install python3-blacklist
$ apt update && apt install blacklist
```

## Archlinux
@@ -45,7 +46,7 @@ Add repository by adding this at end of file /etc/pacman.conf

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

@@ -63,7 +64,7 @@ $ git clone https://github.com/Salamek/blacklist.git
$ cd blacklist
$ pip install -r requirements.txt
$ blacklist post_install --config_prod
$ bower install
$ npm i
$ python3 manage.py server
$ python3 manage.py celerybeat
$ python3 manage.py celeryworker
@@ -86,12 +87,15 @@ Here is example UWSGI configuration, dont forgot to stop and disable blacklist s
[uwsgi]
uid = www-data
master = true
chdir = /usr/lib/python3/dist-packages/blacklist
socket = /var/run/blacklist.sock
threads=2
processes = 5
max_request = 300
chdir = /usr/lib/python3/dist-packages/blacklist/
module = wsgi
callable = app
plugins = python3
buffer-size = 32768

```

# Nginx
@@ -105,7 +109,7 @@ server {
root /usr/lib/python3/dist-packages/blacklist;
location / {
uwsgi_pass unix:///var/run/blacklist.sock;
uwsgi_pass unix:///run/uwsgi/app/blacklist.salamek.cz/socket;
include uwsgi_params;
}
}
Loading