It can be convenient to include a QR code in the description of a calendar event. However, the three online calendar apps that I use1 do not provide a way to add images to the event descriptions. Here's a workaround that works with Google Calendar (so far), but it requires a QR code generator that outputs text (extended ASCII) as opposed to PNG, JPG or SVG.2
I invoke the generator from the CLI, entering
qr.exe https://www.fsf.org --ascii (where https://www.fsf.org is the
content to be encoded). It outputs directly to the CLI, as shown in
Figure 1. Why not redirect the output to a text
file, such as QRCode.txt? I tried, but the resulting file is in PNG
format, not text.
Since text output cannot be redirected to a file (at this time), I must do this manually by selecting and copying the text from the CLI to the clipboard. And I paste it into an HTML file, actually, and enclose it in a pre tag to ensure that it's rendered in a monospace font family, as shown in the listing below.
<pre style="font-family: monospace, monospace; font-size: small;"> █▀▀▀▀▀█ ▄▀ ▀▀█ ▄ █▀▀▀▀▀█ █ ███ █ █▄ █▄ ▄█ █ ███ █ █ ▀▀▀ █ ▄▀ ▄▄ ▀ █ ▀▀▀ █ ▀▀▀▀▀▀▀ █ ▀▄█ █▄█ ▀▀▀▀▀▀▀ █ ▄ ▄▀ █▄▀ ▄▄▄▄█▀▄▄███ ▄▀ ▄▀ ▀▄ █ █▀█▀█▄█▀█▀█ ▀█ ███▀ ▀▀ ▀ ▀▀ ██▄▀▄ ▄▀ █ █▀▀ ▀▀▀ ▄█▀ ███▀█▀█▄▀█ ▀ ▀▀▀ ▀ █ ▄▀▄▄▄██▀▀▀█ ▀ █▀▀▀▀▀█ ▀▀▀▄▄ ▄█ ▀ █ ▄▀ █ ███ █ ▄▀ ▀ █▀▀▀█▀▀ ▀▄█ █ ▀▀▀ █ ▀▄█▀ ▄ ▄▄ ▄▄▀▀ █ ▀▀▀▀▀▀▀ ▀▀▀ ▀▀ ▀▀ ▀ ▀ </pre>
I open qrcode.html in my web browser, as shown in Figure 2.
I select the rendered HTML and copy it to the clipboard. Then I paste it into the event description, as shown in Figure 3.
In real life I'd encode an access code that allows me to enter the meeting venue. The FSF URL is used here as an example.
How is this related to Emacs? I never claimed that this blog is devoted entirely to Emacs. But if it helps, I wrote the HTML for this post with Emacs, as well as the qrcode.html file.
I'm just curious if anyone else finds this useful or if you have other workarounds to go beyond the limitations of pedestrian apps.
1The calendar apps are from Google, Yahoo, Proton.
2QRCode is a Python module that provides an executable, qr.exe. It can be obtained from PyPi: https://pypi.org/project/qrcode/8.2/.


