structables 0.3.14__tar.gz → 0.3.16__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.
Files changed (52) hide show
  1. {structables-0.3.14 → structables-0.3.16}/Dockerfile +6 -2
  2. {structables-0.3.14 → structables-0.3.16}/PKG-INFO +28 -7
  3. {structables-0.3.14 → structables-0.3.16}/README.md +26 -5
  4. {structables-0.3.14 → structables-0.3.16}/pyproject.toml +1 -1
  5. {structables-0.3.14 → structables-0.3.16}/src/structables/utils/helpers.py +2 -1
  6. {structables-0.3.14 → structables-0.3.16}/.env.example +0 -0
  7. {structables-0.3.14 → structables-0.3.16}/.forgejo/workflows/docker.yml +0 -0
  8. {structables-0.3.14 → structables-0.3.16}/.forgejo/workflows/release.yml +0 -0
  9. {structables-0.3.14 → structables-0.3.16}/.gitignore +0 -0
  10. {structables-0.3.14 → structables-0.3.16}/LICENSE +0 -0
  11. {structables-0.3.14 → structables-0.3.16}/cronjob.txt +0 -0
  12. {structables-0.3.14 → structables-0.3.16}/docker-compose-example-dev.yml +0 -0
  13. {structables-0.3.14 → structables-0.3.16}/docker-compose-example.yml +0 -0
  14. {structables-0.3.14 → structables-0.3.16}/entrypoint.sh +0 -0
  15. {structables-0.3.14 → structables-0.3.16}/src/structables/__init__.py +0 -0
  16. {structables-0.3.14 → structables-0.3.16}/src/structables/config.py +0 -0
  17. {structables-0.3.14 → structables-0.3.16}/src/structables/main.py +0 -0
  18. {structables-0.3.14 → structables-0.3.16}/src/structables/routes/__init__.py +0 -0
  19. {structables-0.3.14 → structables-0.3.16}/src/structables/routes/category.py +0 -0
  20. {structables-0.3.14 → structables-0.3.16}/src/structables/routes/contest.py +0 -0
  21. {structables-0.3.14 → structables-0.3.16}/src/structables/routes/main.py +0 -0
  22. {structables-0.3.14 → structables-0.3.16}/src/structables/routes/member.py +0 -0
  23. {structables-0.3.14 → structables-0.3.16}/src/structables/routes/proxy.py +0 -0
  24. {structables-0.3.14 → structables-0.3.16}/src/structables/static/css/style.css +0 -0
  25. {structables-0.3.14 → structables-0.3.16}/src/structables/static/dist/css/bootstrap.min.css +0 -0
  26. {structables-0.3.14 → structables-0.3.16}/src/structables/static/dist/css/bootstrap.min.css.map +0 -0
  27. {structables-0.3.14 → structables-0.3.16}/src/structables/static/img/logo.png +0 -0
  28. {structables-0.3.14 → structables-0.3.16}/src/structables/static/img/logo_lg.png +0 -0
  29. {structables-0.3.14 → structables-0.3.16}/src/structables/static/img/magnifying-glass-solid.svg +0 -0
  30. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/400.html +0 -0
  31. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/404.html +0 -0
  32. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/429.html +0 -0
  33. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/500.html +0 -0
  34. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/archives.html +0 -0
  35. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/article-review.html +0 -0
  36. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/article.html +0 -0
  37. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/base.html +0 -0
  38. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/category.html +0 -0
  39. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/collection.html +0 -0
  40. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/contest.html +0 -0
  41. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/contests.html +0 -0
  42. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/footer.html +0 -0
  43. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/header.html +0 -0
  44. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/iframe.html +0 -0
  45. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/index.html +0 -0
  46. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/member-instructables.html +0 -0
  47. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/member.html +0 -0
  48. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/privacypolicy.html +0 -0
  49. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/projects.html +0 -0
  50. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/sitemap.html +0 -0
  51. {structables-0.3.14 → structables-0.3.16}/src/structables/templates/style.html +0 -0
  52. {structables-0.3.14 → structables-0.3.16}/src/structables/utils/data.py +0 -0
@@ -4,8 +4,12 @@ ENV APP_ENV=/opt/venv
4
4
  ENV PATH="${APP_ENV}/bin:$PATH"
5
5
 
6
6
  RUN apk add --no-cache py3-pip uwsgi-python3 && \
7
- python3 -m venv $APP_ENV && \
8
- $APP_ENV/bin/pip install --no-cache-dir pip structables && \
7
+ python3 -m venv $APP_ENV
8
+
9
+ COPY . /app
10
+
11
+ RUN $APP_ENV/bin/pip install --no-cache-dir pip && \
12
+ $APP_ENV/bin/pip install /app && \
9
13
  adduser -S -D -H structables
10
14
 
11
15
  COPY entrypoint.sh /entrypoint.sh
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: structables
3
- Version: 0.3.14
3
+ Version: 0.3.16
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
@@ -692,12 +692,22 @@ An open source alternative front-end to Instructables. This is a fork of <a href
692
692
 
693
693
  ## Instances
694
694
 
695
- | URL | Provided by | Country | Comments |
696
- | ----------------------------------------------------------------- | ----------------------------------------- | ------- | -------- |
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) | Germany | |
695
+ | URL | Provided by | Country | Comments |
696
+ | ----------------------------------------------------------------------- | ----------------------------------------------- | ------- | -------- |
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) | Germany | |
699
+ | [structables.darkness.services](https://structables.darkness.services/) | [Darkness.services](https://darkness.services/) | USA | |
699
700
 
700
- To add your own instance to this list, please open a pull request or issue.
701
+ ### Tor Hidden Services
702
+
703
+ | URL | Provided by | Country | Comments |
704
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ------- | -------- |
705
+ | [structables.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion](http://structables.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion/) | [Private.coffee](https://private.coffee/) | Austria | |
706
+ | [structables.darknessrdor43qkl2ngwitj72zdavfz2cead4t5ed72bybgauww5lyd.onion](http://structables.darknessrdor43qkl2ngwitj72zdavfz2cead4t5ed72bybgauww5lyd.onion/) | [Darkness.services](https://darkness.services/) | USA | |
707
+
708
+ ### Adding Your Instance
709
+
710
+ To add your own instance to this list, please open a pull request or issue, see below.
701
711
 
702
712
  ## Opening Issues
703
713
 
@@ -740,6 +750,17 @@ Of course, you can also join our [Matrix room](https://matrix.pcof.fi/#/#structa
740
750
  5. Run `structables`
741
751
  6. Connect to http://localhost:8002
742
752
 
753
+ ### Environment Variables
754
+
755
+ Structables supports the use of the following environment variables for configuration:
756
+
757
+ - `STRUCTABLES_PORT`: The port to listen on (default: 8002)
758
+ - `STRUCTABLES_LISTEN_HOST`: The host/IP address to listen on (default: 127.0.0.1)
759
+ - `STRUCTABLES_INVIDIOUS`: The hostname of an Invidious instance to use for embedded YouTube videos (currently not recommended due to YouTube blocks)
760
+ - `STRUCTABLES_UNSAFE`: If set, allow embedding untrusted iframes (if unset, display a warning and allow loading the content manually)
761
+ - `STRUCTABLES_PRIVACY_FILE`: The path to a text file or Markdown file (with .md suffix) to use for the Privacy Policy page (if unset, try `privacy.txt` or `privacy.md` in the working directory, or fall back to a generic message)
762
+ - `STRUCTABLES_DEBUG`: If set, log additional debug information to stdout
763
+
743
764
  ## License
744
765
 
745
766
  This project, as well as the two projects it is based on, are licensed under the GNU Affero General Public License v3. See the [LICENSE](LICENSE) file for more information.
@@ -13,12 +13,22 @@ An open source alternative front-end to Instructables. This is a fork of <a href
13
13
 
14
14
  ## Instances
15
15
 
16
- | URL | Provided by | Country | Comments |
17
- | ----------------------------------------------------------------- | ----------------------------------------- | ------- | -------- |
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) | Germany | |
16
+ | URL | Provided by | Country | Comments |
17
+ | ----------------------------------------------------------------------- | ----------------------------------------------- | ------- | -------- |
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) | Germany | |
20
+ | [structables.darkness.services](https://structables.darkness.services/) | [Darkness.services](https://darkness.services/) | USA | |
20
21
 
21
- To add your own instance to this list, please open a pull request or issue.
22
+ ### Tor Hidden Services
23
+
24
+ | URL | Provided by | Country | Comments |
25
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ------- | -------- |
26
+ | [structables.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion](http://structables.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion/) | [Private.coffee](https://private.coffee/) | Austria | |
27
+ | [structables.darknessrdor43qkl2ngwitj72zdavfz2cead4t5ed72bybgauww5lyd.onion](http://structables.darknessrdor43qkl2ngwitj72zdavfz2cead4t5ed72bybgauww5lyd.onion/) | [Darkness.services](https://darkness.services/) | USA | |
28
+
29
+ ### Adding Your Instance
30
+
31
+ To add your own instance to this list, please open a pull request or issue, see below.
22
32
 
23
33
  ## Opening Issues
24
34
 
@@ -61,6 +71,17 @@ Of course, you can also join our [Matrix room](https://matrix.pcof.fi/#/#structa
61
71
  5. Run `structables`
62
72
  6. Connect to http://localhost:8002
63
73
 
74
+ ### Environment Variables
75
+
76
+ Structables supports the use of the following environment variables for configuration:
77
+
78
+ - `STRUCTABLES_PORT`: The port to listen on (default: 8002)
79
+ - `STRUCTABLES_LISTEN_HOST`: The host/IP address to listen on (default: 127.0.0.1)
80
+ - `STRUCTABLES_INVIDIOUS`: The hostname of an Invidious instance to use for embedded YouTube videos (currently not recommended due to YouTube blocks)
81
+ - `STRUCTABLES_UNSAFE`: If set, allow embedding untrusted iframes (if unset, display a warning and allow loading the content manually)
82
+ - `STRUCTABLES_PRIVACY_FILE`: The path to a text file or Markdown file (with .md suffix) to use for the Privacy Policy page (if unset, try `privacy.txt` or `privacy.md` in the working directory, or fall back to a generic message)
83
+ - `STRUCTABLES_DEBUG`: If set, log additional debug information to stdout
84
+
64
85
  ## License
65
86
 
66
87
  This project, as well as the two projects it is based on, are licensed under the GNU Affero General Public License v3. See the [LICENSE](LICENSE) file for more information.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "structables"
7
- version = "0.3.14"
7
+ version = "0.3.16"
8
8
  authors = [
9
9
  { name="Private.coffee Team", email="support@private.coffee" },
10
10
  ]
@@ -4,6 +4,7 @@ from bs4 import BeautifulSoup
4
4
  import re
5
5
  import logging
6
6
  import json
7
+ import math
7
8
  from flask import request, render_template, abort
8
9
 
9
10
  logging.basicConfig(level=logging.DEBUG)
@@ -414,7 +415,7 @@ def projects_search(
414
415
 
415
416
  logging.debug(f"Got {len(project_ibles)} projects")
416
417
 
417
- return project_ibles, project_obj["out_of"]
418
+ return project_ibles, math.ceil(project_obj["found"] / per_page)
418
419
 
419
420
 
420
421
  def update_data(app):
File without changes
File without changes
File without changes
File without changes
File without changes