structables 0.3.10__tar.gz → 0.3.12__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.10 → structables-0.3.12}/PKG-INFO +4 -2
- {structables-0.3.10 → structables-0.3.12}/README.md +3 -1
- {structables-0.3.10 → structables-0.3.12}/pyproject.toml +1 -1
- {structables-0.3.10 → structables-0.3.12}/src/structables/main.py +3 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/routes/main.py +40 -35
- {structables-0.3.10 → structables-0.3.12}/.env.example +0 -0
- {structables-0.3.10 → structables-0.3.12}/.forgejo/workflows/docker.yml +0 -0
- {structables-0.3.10 → structables-0.3.12}/.forgejo/workflows/release.yml +0 -0
- {structables-0.3.10 → structables-0.3.12}/.gitignore +0 -0
- {structables-0.3.10 → structables-0.3.12}/Dockerfile +0 -0
- {structables-0.3.10 → structables-0.3.12}/LICENSE +0 -0
- {structables-0.3.10 → structables-0.3.12}/cronjob.txt +0 -0
- {structables-0.3.10 → structables-0.3.12}/docker-compose-example-dev.yml +0 -0
- {structables-0.3.10 → structables-0.3.12}/docker-compose-example.yml +0 -0
- {structables-0.3.10 → structables-0.3.12}/entrypoint.sh +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/__init__.py +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/config.py +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/routes/__init__.py +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/routes/category.py +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/routes/contest.py +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/routes/member.py +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/routes/proxy.py +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/static/css/style.css +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/static/dist/css/bootstrap.min.css +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/static/dist/css/bootstrap.min.css.map +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/static/img/logo.png +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/static/img/logo_lg.png +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/static/img/magnifying-glass-solid.svg +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/400.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/404.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/429.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/500.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/archives.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/article-review.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/article.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/base.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/category.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/collection.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/contest.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/contests.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/footer.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/header.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/iframe.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/index.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/member-instructables.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/member.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/privacypolicy.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/projects.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/sitemap.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/templates/style.html +0 -0
- {structables-0.3.10 → structables-0.3.12}/src/structables/utils/data.py +0 -0
- {structables-0.3.10 → structables-0.3.12}/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.12
|
|
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
|
|
@@ -695,7 +695,7 @@ An open source alternative front-end to Instructables. This is a fork of <a href
|
|
|
695
695
|
| URL | Provided by | Country | Comments |
|
|
696
696
|
| ----------------------------------------------------------------- | ----------------------------------------- | ------- | -------- |
|
|
697
697
|
| [structables.private.coffee](https://structables.private.coffee/) | [Private.coffee](https://private.coffee/) | Austria | |
|
|
698
|
-
| [structables.bloat.cat](https://structables.bloat.cat/) | [Bloat.cat](https://bloat.cat) |
|
|
698
|
+
| [structables.bloat.cat](https://structables.bloat.cat/) | [Bloat.cat](https://bloat.cat) | Germany | |
|
|
699
699
|
|
|
700
700
|
To add your own instance to this list, please open a pull request or issue.
|
|
701
701
|
|
|
@@ -715,6 +715,7 @@ Of course, you can also join our [Matrix room](https://matrix.pcof.fi/#/#structa
|
|
|
715
715
|
4. Run `uwsgi --plugin python3 --http-socket 0.0.0.0:8002 --module structables.main:app --processes 4 --threads 4`
|
|
716
716
|
5. Point your reverse proxy to http://localhost:8002 and (optionally) serve static files from the `venv/lib/pythonX.XX/site-packages/structables/static` directory
|
|
717
717
|
6. Connect to your instance under your domain
|
|
718
|
+
7. Ensure that `/cron/` is executed at regular intervals so that the app updates its cached data.
|
|
718
719
|
|
|
719
720
|
### Production: Docker
|
|
720
721
|
|
|
@@ -728,6 +729,7 @@ Of course, you can also join our [Matrix room](https://matrix.pcof.fi/#/#structa
|
|
|
728
729
|
|
|
729
730
|
4. Point your reverse proxy to http://127.0.0.1:8002 (or your chosen port, if you modified it) and (optionally) serve static files from `structables/static`
|
|
730
731
|
5. Connect to your instance under your domain
|
|
732
|
+
6. Ensure that `/cron/` is executed at regular intervals so that the app updates its cached data.
|
|
731
733
|
|
|
732
734
|
### Development
|
|
733
735
|
|
|
@@ -16,7 +16,7 @@ An open source alternative front-end to Instructables. This is a fork of <a href
|
|
|
16
16
|
| URL | Provided by | Country | Comments |
|
|
17
17
|
| ----------------------------------------------------------------- | ----------------------------------------- | ------- | -------- |
|
|
18
18
|
| [structables.private.coffee](https://structables.private.coffee/) | [Private.coffee](https://private.coffee/) | Austria | |
|
|
19
|
-
| [structables.bloat.cat](https://structables.bloat.cat/) | [Bloat.cat](https://bloat.cat) |
|
|
19
|
+
| [structables.bloat.cat](https://structables.bloat.cat/) | [Bloat.cat](https://bloat.cat) | Germany | |
|
|
20
20
|
|
|
21
21
|
To add your own instance to this list, please open a pull request or issue.
|
|
22
22
|
|
|
@@ -36,6 +36,7 @@ Of course, you can also join our [Matrix room](https://matrix.pcof.fi/#/#structa
|
|
|
36
36
|
4. Run `uwsgi --plugin python3 --http-socket 0.0.0.0:8002 --module structables.main:app --processes 4 --threads 4`
|
|
37
37
|
5. Point your reverse proxy to http://localhost:8002 and (optionally) serve static files from the `venv/lib/pythonX.XX/site-packages/structables/static` directory
|
|
38
38
|
6. Connect to your instance under your domain
|
|
39
|
+
7. Ensure that `/cron/` is executed at regular intervals so that the app updates its cached data.
|
|
39
40
|
|
|
40
41
|
### Production: Docker
|
|
41
42
|
|
|
@@ -49,6 +50,7 @@ Of course, you can also join our [Matrix room](https://matrix.pcof.fi/#/#structa
|
|
|
49
50
|
|
|
50
51
|
4. Point your reverse proxy to http://127.0.0.1:8002 (or your chosen port, if you modified it) and (optionally) serve static files from `structables/static`
|
|
51
52
|
5. Connect to your instance under your domain
|
|
53
|
+
6. Ensure that `/cron/` is executed at regular intervals so that the app updates its cached data.
|
|
52
54
|
|
|
53
55
|
### Development
|
|
54
56
|
|
|
@@ -158,49 +158,54 @@ def init_main_routes(app):
|
|
|
158
158
|
for file in step["files"]:
|
|
159
159
|
if file["image"] and "embedType" not in "file":
|
|
160
160
|
step_imgs.append(
|
|
161
|
-
{"src": proxy(file["downloadUrl"], file["name"]), "alt": file["name"]}
|
|
162
|
-
)
|
|
163
|
-
|
|
164
|
-
elif not file["image"]:
|
|
165
|
-
step_downloads.append(
|
|
166
161
|
{
|
|
167
162
|
"src": proxy(file["downloadUrl"], file["name"]),
|
|
168
|
-
"
|
|
163
|
+
"alt": file["name"],
|
|
169
164
|
}
|
|
170
165
|
)
|
|
171
166
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if src.startswith("https://content.instructables.com"):
|
|
181
|
-
src = src.replace(
|
|
182
|
-
"https://content.instructables.com",
|
|
183
|
-
f"/proxy/?url={src}",
|
|
167
|
+
elif not file["image"]:
|
|
168
|
+
if "downloadUrl" in file.keys():
|
|
169
|
+
step_downloads.append(
|
|
170
|
+
{
|
|
171
|
+
"src": proxy(file["downloadUrl"], file["name"]),
|
|
172
|
+
"name": file["name"],
|
|
173
|
+
}
|
|
184
174
|
)
|
|
185
175
|
|
|
186
|
-
|
|
187
|
-
"
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
176
|
+
else: # Leaves us with embeds
|
|
177
|
+
embed_code = file["embedHtmlCode"]
|
|
178
|
+
soup = BeautifulSoup(embed_code, "html.parser")
|
|
179
|
+
|
|
180
|
+
iframe = soup.select("iframe")[0]
|
|
181
|
+
|
|
182
|
+
src = iframe.get("src")
|
|
183
|
+
|
|
184
|
+
if src.startswith("https://content.instructables.com"):
|
|
185
|
+
src = src.replace(
|
|
186
|
+
"https://content.instructables.com",
|
|
187
|
+
f"/proxy/?url={src}",
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
elif app.config["INVIDIOUS"] and src.startswith(
|
|
191
|
+
"https://www.youtube.com"
|
|
192
|
+
):
|
|
193
|
+
src = src.replace(
|
|
194
|
+
"https://www.youtube.com",
|
|
195
|
+
app.config["INVIDIOUS"],
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
elif not app.config["UNSAFE"]:
|
|
199
|
+
src = "/iframe/?url=" + quote(src)
|
|
200
|
+
|
|
201
|
+
step_iframes.append(
|
|
202
|
+
{
|
|
203
|
+
"src": src,
|
|
204
|
+
"width": file.get("width"),
|
|
205
|
+
"height": file.get("height"),
|
|
206
|
+
}
|
|
191
207
|
)
|
|
192
208
|
|
|
193
|
-
elif not app.config["UNSAFE"]:
|
|
194
|
-
src = "/iframe/?url=" + quote(src)
|
|
195
|
-
|
|
196
|
-
step_iframes.append(
|
|
197
|
-
{
|
|
198
|
-
"src": src,
|
|
199
|
-
"width": file.get("width"),
|
|
200
|
-
"height": file.get("height"),
|
|
201
|
-
}
|
|
202
|
-
)
|
|
203
|
-
|
|
204
209
|
step_text = step["body"]
|
|
205
210
|
step_text = step_text.replace(
|
|
206
211
|
"https://content.instructables.com",
|
|
@@ -360,7 +365,7 @@ def init_main_routes(app):
|
|
|
360
365
|
|
|
361
366
|
if path.endswith(".md"):
|
|
362
367
|
content = Markdown().convert(content)
|
|
363
|
-
|
|
368
|
+
|
|
364
369
|
except OSError:
|
|
365
370
|
pass
|
|
366
371
|
|
|
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
|
{structables-0.3.10 → structables-0.3.12}/src/structables/static/dist/css/bootstrap.min.css.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structables-0.3.10 → structables-0.3.12}/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
|
{structables-0.3.10 → structables-0.3.12}/src/structables/templates/member-instructables.html
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
|