An open source alternative front-end to Instructables.
Find a file
Kumi 29592de90a
Refactor data fetching logic using stdlib
Removed dependencies on external libraries such as `requests`, `requests-html`, and `playwright` in favor of Python's standard libraries like `urllib` for HTTP requests and parsing functionality. A more robust and efficient data update function was introduced to scrape API keys and fetch project data using Typesense. Transitioned from a manual browser-based scraping approach to an API-based one for improved stability and performance. Added logging for better monitoring and debuggability. Error-handling now leverages `HTTPError` from `urllib.error`. Shifted the configuration of debug mode to rely on an environment variable, aligning with Twelve-Factor principles. Removed unused functions and streamlined the handling of various routes within the Flask app. This change shifts the project towards a more maintainable code base by using built-in libraries, reduces external dependencies, and improves resilience and scalability of the web scraping components.
2024-01-16 17:13:59 +01:00
static/img Merge remote-tracking branch 'upstream/main' 2023-06-04 08:06:54 +02:00
templates Improve error handling 2023-07-19 08:26:45 +02:00
.gitignore Merge remote-tracking branch 'upstream/main' 2023-06-03 23:04:34 +02:00
cronjob.txt add cronjob text file 2023-06-03 17:44:44 -04:00
LICENSE first commit 2023-06-01 17:25:13 -04:00
main.py Refactor data fetching logic using stdlib 2024-01-16 17:13:59 +01:00
README.md Add Destructables mention 2023-07-19 08:25:41 +02:00
requirements.txt Refactor data fetching logic using stdlib 2024-01-16 17:13:59 +01:00

Indestructables

An open source alternative front-end to Instructables. This is a fork of snowcatridge10's Indestructables to use Playwright instead of Selenium, which itself is a fork of Cobra's Destructables.

Instances

URL Provided by Country Comments
https://indestructables.private.coffee/ Private.coffee Austria

Run your own instance

Dependencies

First, create a virtual environment with python3 -m venv venv and activate it with source venv/bin/activate. Then, install the dependencies with:

pip3 install -r requirements.txt.

For the production environment, you also need the uWSGI Python3 plugin. On Debian, it can be installed via apt install uwsgi-plugin-python3

Furthermore, you need to install the Chromium binary used by Playwright. You can do this by running playwright install chromium.

Production

  1. Clone the repository
  2. Run uwsgi --plugin python3 --http-socket 0.0.0.0:8002 --wsgi-file main.py --callable app --processes 4 --threads 2
  3. Point your reverse proxy to http://localhost:8002

Development

  1. Clone the repository
  2. Run python3 main.py
  3. Connect to http://localhost:8002

License

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 file for more information.