Skip to content

Instantly share code, notes, and snippets.

Last active October 23, 2019 15:34
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mgedmin/4686862 to your computer and use it in GitHub Desktop.
Daily cron script that updates dynamic data at
# update dynamic files in /var/www/
# /opt/ztk-py3-status/ is a checkout of
# /opt/ztk-py3-status/*.py require python3
# sponge requires moreutils
# convert requires imagemagick
# dot and neato require graphviz
cd /opt/ztk-py3-status || exit 1
git pull -q
cd /var/www/ || exit 1
/opt/ztk-py3-status/ >
test -s && mv packages.json
test -s packages.json || exit 1
/opt/ztk-py3-status/ < packages.json | sponge move-status.json
# NB: github performs rate limiting, so don't go nuts running this script over and over again
/opt/ztk-py3-status/ --cache-max-age=300 < move-status.json | sponge status.json
# pypi metadata will be cached in ./.cache/meta, which is fine by me, for now
/opt/ztk-py3-status/ --cache-dir=$cache_dir < status.json | sponge deps.json
/opt/ztk-py3-status/ < deps.json | sponge data.json
/opt/ztk-py3-status/ < data.json | sponge
neato -Tsvg | sponge deps.svg
neato -Tpng | sponge deps.png
convert deps.png -resize 128x128 - | sponge deps-thumb.png
mkdir -p deps/
mkdir -p deps-with-extras/
packages=$(/opt/ztk-py3-status/ < data.json)
for pkg in $packages; do
/opt/ztk-py3-status/ $pkg -b < data.json | sponge deps/$
/opt/ztk-py3-status/ $pkg -a -e < data.json | sponge deps-with-extras/$
for pkg in $packages; do
dot -Tsvg deps/$ | sponge deps/$pkg.svg
dot -Tsvg deps-with-extras/$ | sponge deps-with-extras/$pkg.svg
for pkg in $packages; do
dot -Tpng deps/$ | sponge deps/$pkg.png
dot -Tpng deps-with-extras/$ | sponge deps-with-extras/$pkg.png
Copy link

icemac commented Jul 6, 2016

@mgedmin: Thank you for this great status page. It would be nice to display whether a package supports Python 3.5. Instead the columns rendering Python 2.6 and 3.2 support can be dropped.

Copy link

@mgedmin: is the HTML for available somewhere as well?

Copy link

@mgedmin: I noticed that is all there already, which license has though? The python scripts nor the HTML and related files have a license.

I would try to adapt it for Plone if allowed.

Copy link

mgedmin commented Sep 12, 2016

I don't get notification emails about comments written here :(

@gforcada: the HTML is at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment