Project: the Automatic #plotloop Machine

Deep dive into the internals of my Automatic #plotloop Machine.

December 22, 2022

Batch processing SVGs with DoIt and vpype

doit (a.k.a. PyDoIt) is a fantastic Python-based tool to automate repetitive workflows. It works particularly well alongside vpype to address mundane plotting-related tasks. This article explains in details how to automate an SVG optimisation and conversion workflow. ...

November 10, 2022 · Last updated on December 22, 2022

TIL: use Plausible.io with a Sphinx documentation hosted on RTD

Although Google Analytics is very easy to setup on a Read the Docs-based documentation website, it requires a cookie banner to be GDPR-compliant and is otherwise questionable from a privacy-preservation point-of-view. As a result, I much prefer to use and support the excellent EU-based Plausible.io for traffic metrics instead. This article explains how to setup a Read the Docs-based documentation with Plausible.io such that metrics are enabled only on “production” builds — e....

October 9, 2022

TIL: using Sphinx substitutions to generate text snippets from code

Often, technical documentations include lists or other snippets of text that are strongly related to some of the project’s code. vpype’s documentation is no exception to this. For instance, the Built-in symbols section lists the units available to expressions: These units are related to the following piece of code: # vpype/utils.py UNITS = { "px": 1.0, "in": 96.0, "inch": 96.0, "ft": 12.0 * 96.0, "yd": 36.0 * 96.0, "mi": 1760.0 * 36....

September 30, 2022
close-up shot of a rotring .35mm pen on a plotted hatch fill test chart

Generating beautiful Python API documentation with Sphinx AutoAPI

Following a recent discussion on Twitter, I decided to take yet another deep dive in my Python projects' documentation and fix once and for all the issues I had with it. I first focused on the automatically-generated API reference section and this article details the results of my finding. Specifically, I’m using vsketch’s API reference, which I recently updated, as an example (documentation source. This article addresses the following objectives:...

May 10, 2022 · Last updated on May 11, 2022

TIL: aligning horizontal or vertical lines to the pixel grid with OpenGL

When I started using my new M1 Max MacBook Pro in December, a bunch of vpype’s tests started to fail. The failing tests were all image-based: an image is rendered and then compared to a previously-generated, reference image. This process is made easy thanks to this Pytest fixture. In this case, the reference images were generated long ago on my previous, Intel/AMD-based MacBook Pro. This GIF highlights the discrepancy I’d get with images generated on my new computer (notice how the ruler’s thickness varies):...

April 5, 2022