chore(content): Only put content for website. Not more
This commit is contained in:
parent
4995e03c21
commit
935daf3e08
106
1.patch
106
1.patch
@ -1,106 +0,0 @@
|
||||
From 669cbdb3fb1d5155ea9163269c0dcf1c2b5621ea Mon Sep 17 00:00:00 2001
|
||||
From: George Rawlinson <george@rawlinson.net.nz>
|
||||
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 <george@rawlinson.net.nz>
|
||||
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 <george@rawlinson.net.nz>
|
||||
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 <george@rawlinson.net.nz>
|
||||
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",
|
25
2.patch
25
2.patch
@ -1,25 +0,0 @@
|
||||
From 48643a88e76148553af9fa3640a57e57d6ac137a Mon Sep 17 00:00:00 2001
|
||||
From: George Rawlinson <george@rawlinson.net.nz>
|
||||
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:
|
10
Caddyfile
10
Caddyfile
@ -1,10 +0,0 @@
|
||||
:80 {
|
||||
|
||||
root * /usr/share/caddy
|
||||
file_server
|
||||
|
||||
handle_errors {
|
||||
rewrite * /{http.error.status_code}.html
|
||||
file_server
|
||||
}
|
||||
}
|
30
Dockerfile
30
Dockerfile
@ -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"]
|
5
Makefile
5
Makefile
@ -1,5 +0,0 @@
|
||||
NAME ?= rawdog
|
||||
VERSION ?= 0.1
|
||||
|
||||
build:
|
||||
docker build -t ${NAME}:${VERSION} .
|
21
README.md
21
README.md
@ -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/.
|
@ -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
|
@ -1 +0,0 @@
|
||||
UTILISATEUR=1000
|
5
startup
5
startup
@ -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
|
6
synchro.sh
Executable file
6
synchro.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# synchro.sh
|
||||
#
|
||||
|
||||
rsync -avP . ovh:/srv/http/veille.o9.re/ --exclude=.git/
|
Loading…
Reference in New Issue
Block a user