Commit graph

131 commits

Author SHA1 Message Date
67d8a0ca7a
Merge branch 'main' of git.private.coffee:PrivateCoffee/structables 2025-04-09 10:36:31 +02:00
9de12606a6
feat: Check in simplified CSS 2025-04-09 10:36:19 +02:00
5f44e65cb6 Merge pull request 'chore(deps): update node.js to v22' (#14) from renovate/node-22.x into main
Reviewed-on: #14
2025-03-04 17:32:52 +00:00
13a96c457f Merge branch 'main' into renovate/node-22.x 2025-03-04 17:31:56 +00:00
00b5b67d8f Merge pull request 'chore(deps): update alpine docker tag to v3.21' (#13) from renovate/alpine-3.x into main
Reviewed-on: #13
2025-03-04 17:13:05 +00:00
a206bc3794 Merge branch 'main' into renovate/alpine-3.x 2025-03-04 17:12:53 +00:00
2f9b2219d0 Merge pull request 'chore(deps): update docker/build-push-action action to v6' (#16) from renovate/docker-build-push-action-6.x into main
Reviewed-on: #16
2025-03-04 17:08:41 +00:00
8bca0def25 chore(deps): update docker/build-push-action action to v6 2025-03-04 17:03:02 +00:00
f78ab7c7ff chore(deps): update node.js to v22 2025-03-04 16:17:14 +00:00
399c233d67 chore(deps): update alpine docker tag to v3.21 2025-03-04 16:17:09 +00:00
50a3c7b150 Merge pull request 'chore: Configure Renovate' (#12) from renovate/configure into main
Reviewed-on: #12
2025-03-04 16:11:21 +00:00
f6f49f5130 Add renovate.json 2025-03-04 16:09:20 +00:00
b5f3ddc4d7
chore: Refactor instance list, add JSON
Reformats instance tables with HTML markers and updated details,
including country flags and notes for main instances.
Adds a JSON file for structured instance configuration.
2025-03-02 19:41:23 +01:00
a9da549333
chore: Bumps project version to 0.3.16
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 6m22s
Python Package CI/CD / Publish to PyPI (push) Successful in 2m11s
2025-01-31 08:45:48 +01:00
289240161c
fix: Improve pagination calculation in projects search
Uses ceiling division to ensure complete pages are accounted
for when returning project results. This prevents loss of data
when the total number of projects is not perfectly divisible
by the results per page.
2025-01-31 08:40:19 +01:00
9f22361aa9
fix: Fix table alignment in README
Corrects formatting in the Instances and Tor Hidden Services tables
of README by aligning the columns properly.

This improves readability and maintains consistency with
Markdown table formatting standards.
2024-11-25 09:02:52 +01:00
d5e7771e70
feat(README): Adds Tor Hidden Services section to README
Introduces a new section listing Tor hidden services for added privacy options.

Actually fixes #11.
2024-11-25 08:34:02 +01:00
0dfe7c1707
feat(README): Add new instance to README
Includes structables.darkness.services as a new instance
hosted in the USA by Darkness.services. Closes #11.
2024-11-25 08:19:07 +01:00
a075372daf
docs: add config options via environment variables
Expanded the README.md to document new environment variables for configuring Structables. This includes specifying the server's port and host, using an Invidious instance for YouTube content, and options for embedding untrusted iframes and setting up a custom Privacy Policy. Also introduced a debug mode for additional logging. These enhancements facilitate greater flexibility and customization for users.
2024-10-04 16:58:51 +02:00
84567090be
chore(release): bump version to 0.3.15
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m38s
Python Package CI/CD / Publish to PyPI (push) Successful in 1m10s
Increased the project version from 0.3.14 to 0.3.15 in preparation for the latest release. This version update signifies the incorporation of minor changes or improvements since the last release.
2024-10-04 16:32:31 +02:00
803d41a417
feat(Dockerfile): optimize Python package installation
Some checks failed
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m33s
Python Package CI/CD / Publish to PyPI (push) Failing after 1m11s
Refactor Dockerfile to install project dependencies directly from the app directory. This change ensures the installed version matches the source code, potentially reducing mismatches between dependencies and code. Also separates the virtual environment creation step for better clarity.
2024-10-04 16:16:43 +02:00
1d534cf3d3
chore(release): bump version to 0.3.14
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m16s
Python Package CI/CD / Publish to PyPI (push) Successful in 1m11s
Updated the project version to 0.3.14 in preparation for the upcoming release. This version increment reflects new changes or bug fixes since the previous release and ensures its availability for package managers and dependency updates.
2024-10-04 15:24:42 +02:00
be9de88eeb
fix: ensure data update runs during app init
Moved `update_data` invocation to the initialization phase of the application rather than relying on the condition of running as the main module. This change ensures data is updated consistently, regardless of whether the app is run via a WSGI server or directly. This addresses initialization issues encountered in certain deployment scenarios.
2024-10-04 15:24:16 +02:00
7682f4ba7f
fix: ensure privacy policy read only if path exists
Moved path file opening and reading logic inside a conditional block to prevent attempts to access a file when no valid path is assigned. This avoids potential errors and ensures only existing files are processed.
2024-10-04 15:23:59 +02:00
065738eea2
chore: bump version to 0.3.13
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m42s
Python Package CI/CD / Publish to PyPI (push) Successful in 1m17s
Updated the project version to 0.3.13 to reflect recent changes or improvements. This prepares the package for a new release, ensuring that versioning remains consistent and up-to-date.

This release ensures that contests are loaded again, fixing #9.
2024-10-04 07:08:43 +02:00
dbfcb24fbb
feat(contest): enhance contest data handling and UI
Refactored endpoint for contest details to improve data fetching by introducing a dedicated function for retrieving contest entries via API calls. Replaced static URL strings with dynamic `url_for` to enhance routing flexibility. Updated HTML template and stylesheet to improve layout and maintainability, shifting to a more modern and responsive design. Reduced CSS complexity by removing unnecessary styles. These changes enhance usability and prepare for future layout enhancements.
2024-10-04 07:06:26 +02:00
4bf5ac680d
refactor(UI): update contest routes and styles
Simplified contest route URLs by removing the domain, now using relative paths. Utilized a proxy function for banner URLs for enhanced handling. Revamped CSS styling for a darker theme, improving readability and updating contest display to be more flexible and mobile-friendly. Removed deprecated elements from the template to streamline the presentation.
2024-10-04 06:26:07 +02:00
c633a3ec47
feat: switch to JSON API for fetching contest data
Updated the contest data fetching logic to use the JSON API instead of scraping the HTML directly. This change improves the reliability and performance of data retrieval by utilizing a structured API endpoint.

- Replaced HTML parsing with JSON decoding
- Simplified the contest details extraction
- Updated template to display new data structure

Addresses issues with parsing inconsistencies and changes in HTML structure.
2024-10-02 13:48:25 +02:00
380041ec1b
feat(contests): revamp contest archive UX with pagination
Reworked contest archive retrieval and display to enhance user experience by implementing JSON API data fetch and pagination. Simplified archive layout with modern styling and improved error handling.

- Switched from BeautifulSoup to JSON API for data fetching
- Added pagination control with page limit and offset
- Refactored UI elements for a cleaner look in archives page
- Updated CSS for better visuals and responsiveness
2024-10-02 13:32:53 +02:00
837473fd7a
chore(release): bump version to 0.3.12
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m40s
Python Package CI/CD / Publish to PyPI (push) Successful in 1m13s
Incrementing project version to 0.3.12 for upcoming release, which includes recent fixes and enhancements. No functional changes in this commit.
2024-10-02 12:02:20 +02:00
ef0c0a5e89
feat: ensure periodic data updates for app stability
Added instructions to README for regularly triggering `/cron/` to keep the app's cached data updated. Modified `main.py` to initialize `global_ibles` even when using a WSGI server, ensuring data consistency. This change improves the reliability and performance of the app by maintaining up-to-date data.

Relates to #9
2024-10-02 11:54:03 +02:00
8356f71fc1
fix(docs): update country for structables.bloat.cat instance
Corrected the country listing for the structables.bloat.cat instance
from Romania to Germany in the README.md. This ensures geographical
accuracy and up-to-date information for users referencing the
instance list.

Closes #8.
2024-09-11 18:17:38 +02:00
31af94cb6f
chore(release): bump version to 0.3.11
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m40s
Python Package CI/CD / Publish to PyPI (push) Successful in 1m13s
Updated the project version to 0.3.11 to reflect recent changes.
2024-07-29 17:06:50 +02:00
e845caff0e
fix(routes): correct handling of embed files
Enhanced logic for handling file embeds to ensure proper processing of
both downloadable and embedded files. Fixed issues related to condition
checks and image embedding. This improves reliability and correctness
when rendering different types of content attachments.

Fixes issue with inconsistent file embed handling.
2024-07-29 17:06:24 +02:00
20c03bb4e0
feat: update gitignore and pyproject.toml
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m38s
Python Package CI/CD / Publish to PyPI (push) Successful in 1m10s
- .gitignore adjusted to handle Docker builds:
  - Added `/dist/*` to ignore all files in `dist/` except `css`.
- Increased library version to 0.3.10 in pyproject.toml.
- Removed unused bootstrap JS files.

This change ensures Docker builds exclude unnecessary files, while allowing necessary CSS files in `dist/`. Additionally, the version bump addresses new project improvements and the cleanup of orphaned files.
2024-07-21 17:12:09 +02:00
c82e0961b7
chore: update version to 0.3.9 and tweak .gitignore
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m21s
Python Package CI/CD / Publish to PyPI (push) Successful in 1m7s
Bumped the project version to 0.3.9 in preparation for the next release. Adjusted .gitignore to properly ignore /dist/ directory. No major functionality changes expected.
2024-07-07 14:44:40 +02:00
cfb81fada1
feat: encode member usernames in URLs and add docstrings
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m31s
Python Package CI/CD / Publish to PyPI (push) Successful in 1m9s
Added URL encoding for member usernames to prevent errors with special characters in profile and Instructables URLs. Improved code readability by including docstrings for route functions, and refined HTML templates to conditionally display member location only if it exists. Updated the project version to 0.3.8.
2024-07-01 15:27:23 +02:00
f576555005
feat(docker): add dev config and update prod image source
Introduce docker-compose-example-dev.yml for development environment, enabling local builds with stricter container settings (e.g., no-new-privileges, read-only).

Update docker-compose-example.yml to pull the latest version of the structables image from the registry instead of building it locally.

Ensures consistent deployment in production and better resource management during development.
2024-07-01 15:13:34 +02:00
7d81a65b2a
feat: add periodic background data update task
All checks were successful
Docker CI/CD / Docker Build and Push to Docker Hub (push) Successful in 2m34s
Python Package CI/CD / Publish to PyPI (push) Successful in 44s
Replaced the cron job for updating data with a background
thread that runs every 5 minutes within the Flask app. Updated
version to 0.3.7.

This change ensures data is refreshed regularly without
external dependencies like cron, improving deployment
simplicity and reliability.
2024-06-17 20:36:19 +02:00
556669d341
feat: add Docker CI/CD workflow for automated builds
Introduced a new Forgejo Actions workflow to automate the Docker image build and push process on tag creation. The workflow sets up the environment, including QEMU and Buildx, logs into Docker Hub, and pushes the built image. This improvement ensures consistent and efficient Docker image deployment.
2024-06-17 19:46:15 +02:00
98bc487d62
docs: update reverse proxy configuration path
Clarified the instruction for serving static files by specifying the exact path `structables/static` instead of the container's static directory. This aims to reduce confusion and ensure accurate configuration.
2024-06-17 19:12:59 +02:00
fc008032d3
docs: update README with Docker instructions and URL tweaks
Revised the URLs in the Instances section to be more concise by removing protocol prefixes. Added a new Production: Docker section to provide detailed instructions for running the application using Docker, enhancing deployment flexibility. Enhanced the Production section by renaming it to Production: Manual for clarity.

Addresses better readability and ease of use for setting up instances.
2024-06-17 19:10:38 +02:00
0f91a929d2
Merge pull request 'Add Docker' (#6) from vlnst/structables:docker into main
Reviewed-on: #6
2024-06-17 16:44:33 +00:00
2ca209042e
Add Docker support 2024-06-17 18:40:34 +03:00
923854c322
Add new instance structables.bloat.cat 2024-06-17 17:54:05 +03:00
cc450e10ff
feat: add markdown support for privacy policy
All checks were successful
Python Package CI/CD / Publish to PyPI (push) Successful in 39s
Introduced markdown rendering for the privacy policy alongside plain text support. This change enriches the presentation of the privacy policy by allowing markdown-formatted files. To facilitate this, the markdown2 library was added as a dependency, and the logic in the privacy policy route was adjusted to prioritize `.md` files over `.txt` when available. This update also includes a minor version bump and the addition of a markdown-related entry to `.gitignore`. These changes enhance the flexibility and user experience by supporting more visually structured privacy policies.

The removal of the default privacy file path (`privacy.txt`) from the environment configuration encourages explicit file path specification, accommodating the new markdown feature more seamlessly.
2024-06-08 20:07:58 +02:00
b2721c7de1
chore: bump structables version to 0.3.5
All checks were successful
Python Package CI/CD / Publish to PyPI (push) Successful in 37s
Incremented the project version in pyproject.toml to release new features and fixes. This version bump includes performance improvements and bug fixes that enhance the overall stability of the structables package.
2024-05-26 18:32:31 +02:00
6255587753
feat(privacy-policy): render HTML content safely
Some checks failed
Python Package CI/CD / Publish to PyPI (push) Failing after 36s
Updated the privacy policy template to render HTML content safely by applying the `safe` filter to the content variable. This change ensures that HTML content stored in the `content` variable is rendered correctly in the browser, without escaping HTML tags, enhancing the page's flexibility in displaying rich content. This approach assumes the content is pre-sanitized and safe to render, mitigating potential cross-site scripting (XSS) vulnerabilities.
2024-05-26 18:30:40 +02:00
9c8c9b6c17
feat: dynamic privacy policy loading
Enhanced the privacy policy display functionality to dynamically load content from a configurable file path. The path is specified via the `STRUCTABLES_PRIVACY_FILE` environment variable, allowing for greater flexibility and easier updates to the privacy policy without needing to redeploy the application. If the specified file is unreachable or the environment variable is unset, the system gracefully falls back to a default message, ensuring the site remains compliant with privacy policy disclosures under various circumstances. This change streamlines content management and improves the adaptability of the application to legal and policy requirements.
2024-05-26 18:28:38 +02:00
2d4df9bae1
feat: Add PyPI publishing workflow
Introduced a Forgejo Actions workflow for automatically publishing new versions to PyPI upon pushing tags. This enhancement automates the release process for Python packages, ensuring that tagged commits trigger a build and publish sequence in a controlled, containerized environment. The workflow includes steps for setting up the environment, installing dependencies, and securely uploading the package using stored PyPI tokens.

By automating the release pipeline, this change aims to reduce manual errors, streamline version releases, and support continuous delivery practices for Python projects.
2024-05-26 08:57:14 +02:00