Produce charts of component availability at JLCPCB from a BOM Mirrored from https://github.com/gavanfantom/jlc-chart
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Gavan Fantom ea2dd4cccb Add some installation instructions, and acknowledgement 3 years ago
jlcchart Use pysqlite3 if available 3 years ago
.gitignore Initial commit 3 years ago
COPYRIGHT Create COPYRIGHT 3 years ago
LICENSE Create LICENSE 3 years ago
README.md Add some installation instructions, and acknowledgement 3 years ago
config.py Add jlc-chart app 3 years ago
poll Add poll file to enable cron magic 3 years ago
wsgi.py Ensure app is found in the right directory 3 years ago

README.md

jlc-chart

Flask app to chart component stock levels from JLCPCB

Installation

This app can be deployed in the same way as any other WSGI application.

With Apache, that looks something like this:

WSGIDaemonProcess jlc-chart user=... group=... threads=2
WSGIScriptAlias /jlc-chart /path/to/jlc-chart/wsgi.py
WSGIScriptReloading On

<Directory /path/to/jlc-chart>
    WSGIProcessGroup jlc-chart
    WSGIApplicationGroup %{GLOBAL}
    AuthType Basic
    AuthName "Restricted Content"
    AuthUserFile /path/to/.htpasswd
    Require valid-user
</Directory>

Once configuration is complete, the database must be initialised:

flask init-db

Once up and running, a cron job must be created to perform the poll:

crontab -e
1   9       *       *       *       /path/to/jlc-chart/poll

Acknowledgements

With thanks to Unipart Digital for graciously allowing me to retain copyright of this project after it was initially developed as an in-house tool.