From 5b9caf94171ace7bcdeca117a95aa1b08ddfcb81 Mon Sep 17 00:00:00 2001 From: octospacc Date: Mon, 13 Feb 2023 13:58:37 +0100 Subject: [PATCH] ShioriFeed v2 --- InvidiousFeedProxy.py | 0 ShioriFeed.py | 259 +++++++++++++++++++++++++++--------------- 2 files changed, 165 insertions(+), 94 deletions(-) mode change 100644 => 100755 InvidiousFeedProxy.py mode change 100644 => 100755 ShioriFeed.py diff --git a/InvidiousFeedProxy.py b/InvidiousFeedProxy.py old mode 100644 new mode 100755 diff --git a/ShioriFeed.py b/ShioriFeed.py old mode 100644 new mode 100755 index 5acef5d..75353f0 --- a/ShioriFeed.py +++ b/ShioriFeed.py @@ -1,25 +1,46 @@ #!/usr/bin/env python3 + +# *----------------------------------------------------------------------* # +# | [ ShioriFeed 🔖 ] | # +# | Simple service for getting an Atom/RSS feed from your Shiori profile | # +# | v. 2023-02-13-r2, OctoSpacc | # +# *----------------------------------------------------------------------* # + +# *---------------------------------* # +# | Configuration | # +# *---------------------------------* # +Host = ('localhost', 8176) +Debug = True +# *---------------------------------* # + +# External Requirements: urllib3 + +# *-------------------------------------------------------------------------* # + import traceback import json from base64 import urlsafe_b64decode, urlsafe_b64encode -from html import escape as HTMLEscape +from html import escape as HtmlEscape from http.server import HTTPServer, BaseHTTPRequestHandler from socketserver import ThreadingMixIn from urllib.request import urlopen, Request from urllib.error import HTTPError, URLError import threading -# Requirements: urllib3 # Usage: http[s]:///http[s]://// -Host = ('localhost', 8176) -HomeTemplate = ''' +HomeTemplate = '''\ - + - ShioriFeed + + ShioriFeed 🔖 + + + -

ShioriFeed

-

- Enter details about your account on a +

ShioriFeed 🔖

+

+ Enter the details of your account on a Shiori - server to get an RSS feed link. + server to get an Aotm/RSS feed link.


- {{PostResult}} -

-

-