structables 0.3.5__tar.gz → 0.3.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {structables-0.3.5 → structables-0.3.6}/.gitignore +1 -0
- {structables-0.3.5 → structables-0.3.6}/PKG-INFO +2 -1
- {structables-0.3.5 → structables-0.3.6}/pyproject.toml +2 -1
- {structables-0.3.5 → structables-0.3.6}/src/structables/config.py +1 -1
- {structables-0.3.5 → structables-0.3.6}/src/structables/routes/main.py +15 -1
- {structables-0.3.5 → structables-0.3.6}/.forgejo/workflows/release.yml +0 -0
- {structables-0.3.5 → structables-0.3.6}/LICENSE +0 -0
- {structables-0.3.5 → structables-0.3.6}/README.md +0 -0
- {structables-0.3.5 → structables-0.3.6}/cronjob.txt +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/__init__.py +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/main.py +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/routes/__init__.py +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/routes/category.py +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/routes/contest.py +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/routes/member.py +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/routes/proxy.py +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/static/css/style.css +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/static/dist/css/bootstrap.min.css +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/static/dist/css/bootstrap.min.css.map +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/static/dist/js/bootstrap.bundle.min.js +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/static/dist/js/bootstrap.bundle.min.js.map +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/static/img/logo.png +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/static/img/logo_lg.png +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/static/img/magnifying-glass-solid.svg +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/400.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/404.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/429.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/500.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/archives.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/article-review.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/article.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/base.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/category.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/collection.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/contest.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/contests.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/footer.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/header.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/iframe.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/index.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/member-instructables.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/member.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/privacypolicy.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/projects.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/sitemap.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/templates/style.html +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/utils/data.py +0 -0
- {structables-0.3.5 → structables-0.3.6}/src/structables/utils/helpers.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: structables
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: A simple frontend for Instructables
|
|
5
5
|
Project-URL: Homepage, https://git.private.coffee/privatecoffee/structables
|
|
6
6
|
Project-URL: Bug Tracker, https://git.private.coffee/privatecoffee/structables/issues
|
|
@@ -674,6 +674,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
674
674
|
Requires-Python: >=3.10
|
|
675
675
|
Requires-Dist: bs4
|
|
676
676
|
Requires-Dist: flask
|
|
677
|
+
Requires-Dist: markdown2[all]
|
|
677
678
|
Description-Content-Type: text/markdown
|
|
678
679
|
|
|
679
680
|
<img align="right" src="src/structables/static/img/logo.png">
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "structables"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.6"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Private.coffee Team", email="support@private.coffee" },
|
|
10
10
|
]
|
|
@@ -20,6 +20,7 @@ classifiers = [
|
|
|
20
20
|
dependencies = [
|
|
21
21
|
"flask",
|
|
22
22
|
"bs4",
|
|
23
|
+
"markdown2[all]",
|
|
23
24
|
]
|
|
24
25
|
|
|
25
26
|
[project.scripts]
|
|
@@ -6,7 +6,7 @@ class Config:
|
|
|
6
6
|
LISTEN_HOST = os.environ.get("STRUCTABLES_LISTEN_HOST", "127.0.0.1")
|
|
7
7
|
INVIDIOUS = os.environ.get("STRUCTABLES_INVIDIOUS")
|
|
8
8
|
UNSAFE = os.environ.get("STRUCTABLES_UNSAFE", False)
|
|
9
|
-
PRIVACY_FILE = os.environ.get("STRUCTABLES_PRIVACY_FILE"
|
|
9
|
+
PRIVACY_FILE = os.environ.get("STRUCTABLES_PRIVACY_FILE")
|
|
10
10
|
|
|
11
11
|
@staticmethod
|
|
12
12
|
def init_app(app):
|
|
@@ -4,6 +4,7 @@ from urllib.error import HTTPError
|
|
|
4
4
|
from bs4 import BeautifulSoup
|
|
5
5
|
from urllib.parse import quote
|
|
6
6
|
from werkzeug.exceptions import InternalServerError
|
|
7
|
+
from markdown2 import Markdown
|
|
7
8
|
from traceback import print_exc
|
|
8
9
|
import pathlib
|
|
9
10
|
import json
|
|
@@ -342,11 +343,24 @@ def init_main_routes(app):
|
|
|
342
343
|
|
|
343
344
|
content = "No privacy policy found."
|
|
344
345
|
|
|
345
|
-
path = app.config.get("PRIVACY_FILE"
|
|
346
|
+
path = app.config.get("PRIVACY_FILE")
|
|
347
|
+
|
|
348
|
+
if not path:
|
|
349
|
+
if pathlib.Path("privacy.md").exists():
|
|
350
|
+
path = "privacy.md"
|
|
351
|
+
|
|
352
|
+
elif pathlib.Path("privacy.txt").exists():
|
|
353
|
+
path = "privacy.txt"
|
|
346
354
|
|
|
347
355
|
try:
|
|
348
356
|
with pathlib.Path(path).open() as f:
|
|
349
357
|
content = f.read()
|
|
358
|
+
|
|
359
|
+
print(path, content)
|
|
360
|
+
|
|
361
|
+
if path.endswith(".md"):
|
|
362
|
+
content = Markdown().convert(content)
|
|
363
|
+
|
|
350
364
|
except OSError:
|
|
351
365
|
pass
|
|
352
366
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structables-0.3.5 → structables-0.3.6}/src/structables/static/dist/css/bootstrap.min.css.map
RENAMED
|
File without changes
|
{structables-0.3.5 → structables-0.3.6}/src/structables/static/dist/js/bootstrap.bundle.min.js
RENAMED
|
File without changes
|
{structables-0.3.5 → structables-0.3.6}/src/structables/static/dist/js/bootstrap.bundle.min.js.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structables-0.3.5 → structables-0.3.6}/src/structables/static/img/magnifying-glass-solid.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|