2021-12-02 15:01:19 +00:00
2021-12-02 11:40:22 +00:00
2021-12-02 12:34:36 +00:00
2021-12-23 16:29:16 +00:00
2021-12-23 16:28:21 +00:00
2021-12-02 15:02:06 +00:00

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.

Description
Produce charts of component availability at JLCPCB from a BOM Mirrored from https://github.com/gavanfantom/jlc-chart
Readme GPL-2.0 40 KiB
Languages
Python 61.1%
HTML 36.8%
TSQL 1.5%
Shell 0.6%