diff --git a/1.patch b/1.patch deleted file mode 100644 index 98c218a..0000000 --- a/1.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 669cbdb3fb1d5155ea9163269c0dcf1c2b5621ea Mon Sep 17 00:00:00 2001 -From: George Rawlinson -Date: Tue, 27 Sep 2022 14:48:58 +1300 -Subject: [PATCH 1/4] fix version info detection - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 209d5b6..6633dfd 100644 ---- a/setup.py -+++ b/setup.py -@@ -3,7 +3,7 @@ - from distutils.core import setup - import sys - --if sys.version_info != (3, ): -+if sys.version_info <= (3, ): - print("rawdog requires Python 3.") - sys.exit(1) - - -From e7a3ce41abcdb524b965f61cfdd061c94cfe0173 Mon Sep 17 00:00:00 2001 -From: George Rawlinson -Date: Tue, 27 Sep 2022 14:49:17 +1300 -Subject: [PATCH 2/4] fix missing comma - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 6633dfd..9114305 100644 ---- a/setup.py -+++ b/setup.py -@@ -12,7 +12,7 @@ - description="RSS Aggregator Without Delusions Of Grandeur - python3 port", - author="echarlie", - author_email="echarlie@vtluug.org", -- url="https://github.com/echarlie/rawdog-py3" -+ url="https://github.com/echarlie/rawdog-py3", - scripts=['rawdog'], - data_files=[('share/man/man1', ['rawdog.1'])], - packages=['rawdoglib'], - -From 02d4c1b1dfc8fc7b3b382ae6e5f0930c9006a350 Mon Sep 17 00:00:00 2001 -From: George Rawlinson -Date: Tue, 27 Sep 2022 20:07:05 +1300 -Subject: [PATCH 3/4] fix: python version detection - -Rather than using sys.version_info to detect Python version, -upstream Python recommends using python_requires, as found here: - -https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#python-requires ---- - setup.py | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/setup.py b/setup.py -index 9114305..5988b4f 100644 ---- a/setup.py -+++ b/setup.py -@@ -1,11 +1,6 @@ - #!/usr/bin/env python3 - - from distutils.core import setup --import sys -- --if sys.version_info <= (3, ): -- print("rawdog requires Python 3.") -- sys.exit(1) - - setup(name="rawdog", - version="3.0", -@@ -15,6 +10,7 @@ - url="https://github.com/echarlie/rawdog-py3", - scripts=['rawdog'], - data_files=[('share/man/man1', ['rawdog.1'])], -+ python_requires='>=3', - packages=['rawdoglib'], - classifiers=[ - "Development Status :: 5 - Production/Stable", - -From afbb8cda6b8b2e8a558c62cb0e20754ac6eb09e8 Mon Sep 17 00:00:00 2001 -From: George Rawlinson -Date: Tue, 27 Sep 2022 20:09:18 +1300 -Subject: [PATCH 4/4] use consistent whitespace (space to tab) - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 5988b4f..cafe463 100644 ---- a/setup.py -+++ b/setup.py -@@ -10,7 +10,7 @@ - url="https://github.com/echarlie/rawdog-py3", - scripts=['rawdog'], - data_files=[('share/man/man1', ['rawdog.1'])], -- python_requires='>=3', -+ python_requires='>=3', - packages=['rawdoglib'], - classifiers=[ - "Development Status :: 5 - Production/Stable", diff --git a/2.patch b/2.patch deleted file mode 100644 index cfee444..0000000 --- a/2.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 48643a88e76148553af9fa3640a57e57d6ac137a Mon Sep 17 00:00:00 2001 -From: George Rawlinson -Date: Tue, 27 Sep 2022 16:31:16 +1300 -Subject: [PATCH] fix feedparser imports - ---- - rawdoglib/rawdog.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/rawdoglib/rawdog.py b/rawdoglib/rawdog.py -index b9d79dc..8fcba17 100644 ---- a/rawdoglib/rawdog.py -+++ b/rawdoglib/rawdog.py -@@ -54,9 +54,9 @@ - - # The sanitisation code was restructured in feedparser 5.3. - try: -- _resolveRelativeURIs = feedparser.urls._resolveRelativeURIs -+ _resolveRelativeURIs = feedparser.urls.resolve_relative_uris - except AttributeError: -- _resolveRelativeURIs = feedparser._resolveRelativeURIs -+ _resolveRelativeURIs = feedparser.resolve_relative_uris - try: - _HTMLSanitizer = feedparser.sanitizer._HTMLSanitizer - except AttributeError: diff --git a/Caddyfile b/Caddyfile deleted file mode 100644 index 9c6e38f..0000000 --- a/Caddyfile +++ /dev/null @@ -1,10 +0,0 @@ -:80 { - - root * /usr/share/caddy - file_server - - handle_errors { - rewrite * /{http.error.status_code}.html - file_server - } -} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 16766fb..0000000 --- a/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -FROM python:3.7.14-alpine3.16 - -COPY 1.patch 2.patch /opt/ - -# Récupération de Rawdog -RUN apk update \ - && apk add --no-cache git patch tzdata \ - && mkdir -p /opt/rawdog/bin \ - && git clone https://github.com/echarlie/rawdog-py3.git /opt/rawdog/bin \ - && cd /opt/rawdog/bin \ - && mv /opt/1.patch . \ - && mv /opt/2.patch . \ - && patch -p1 -i 1.patch \ - && patch -p1 -i 2.patch \ - && pip install --no-cache-dir feedparser \ - && python3 setup.py install - -ENV TZ=Europe/Paris - -COPY . /opt/rawdog -COPY ./crontabs /etc/crontabs/root - -RUN chown root:root /etc/crontabs/root && \ - chmod 600 /etc/crontabs/root - -WORKDIR /opt/rawdog - -VOLUME /opt/rawdog/public - -ENTRYPOINT ["/opt/rawdog/startup"] diff --git a/Makefile b/Makefile deleted file mode 100644 index e4260e6..0000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -NAME ?= rawdog -VERSION ?= 0.1 - -build: - docker build -t ${NAME}:${VERSION} . diff --git a/README.md b/README.md deleted file mode 100644 index 0d5a12a..0000000 --- a/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Introduction - -Ceci est le service de "veille" de Papa Ogre. - -C'est un système simple utilisant [Rawdog](https://offog.org/code/rawdog/) pour extraire les flux RSS et en faire une page web statique. - -Il se lance toutes les heures pour générer - si besoin - une page. - -# Dépendances - -* Docker -* Docker Compose - -# Utilisation - -```bash -cp env.example .env -make && docker-compose up -d -``` - -Le site est disponible sur http://localhost:8888/. diff --git a/crontabs b/crontabs deleted file mode 100644 index ef4471f..0000000 --- a/crontabs +++ /dev/null @@ -1 +0,0 @@ -0 4 * * * /bin/sh /opt/rawdog/startup diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index d85a5ce..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: "3" - -services: - generator: - image: rawdog:0.1 - volumes: - - ${PWD}/public:/opt/rawdog/public:rw - cron: - image: rawdog:0.1 - restart: always - entrypoint: /usr/sbin/crond - command: ["-f", "-l", "8", "-L", "/dev/stdout"] - volumes: - - ${PWD}/public:/opt/rawdog/public:rw - environment: - - UTILISATEUR - - web: - image: caddy:2-alpine - restart: always - volumes: - - ${PWD}/public:/usr/share/caddy:ro - - ${PWD}/Caddyfile:/etc/caddy/Caddyfile - ports: - - 8888:80 diff --git a/env.example b/env.example deleted file mode 100644 index d43a310..0000000 --- a/env.example +++ /dev/null @@ -1 +0,0 @@ -UTILISATEUR=1000 diff --git a/startup b/startup deleted file mode 100755 index 92481a8..0000000 --- a/startup +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -UTILISATEUR=${UTILISATEUR:-1000} - -/opt/rawdog/bin/rawdog -d /opt/rawdog/config -uw && chown ${UTILISATEUR} /opt/rawdog/public -R || exit 1 diff --git a/synchro.sh b/synchro.sh new file mode 100755 index 0000000..10f6666 --- /dev/null +++ b/synchro.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# +# synchro.sh +# + +rsync -avP . ovh:/srv/http/veille.o9.re/ --exclude=.git/