diff --git a/qrcodes.ipynb b/qrcodes.ipynb new file mode 100644 index 0000000..8e7461d --- /dev/null +++ b/qrcodes.ipynb @@ -0,0 +1,81 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.\n", + "Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.\n", + "To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.\n", + "Requirement already satisfied: qrcode[pil] in /Users/1037729/Library/Python/3.8/lib/python/site-packages (7.3.1)\n", + "Requirement already satisfied: pillow in /Users/1037729/Library/Python/3.8/lib/python/site-packages (from qrcode[pil]) (9.0.1)\n" + ] + } + ], + "source": [ + "!pip3 install qrcode[pil] --user" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "import qrcode\n", + "import qrcode.image.svg\n", + "\n", + "def make_qr(title, url):\n", + " factory = qrcode.image.svg.SvgImage\n", + " qrgode = qrcode.make(url, image_factory=factory)\n", + " qrgode.save(f\"{title}.svg\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "make_qr('exquisite', 'https://hub.xpub.nl/soupboat/xquisite/')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "interpreter": { + "hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6" + }, + "kernelspec": { + "display_name": "Python 3.8.2 64-bit", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.2" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/xquisite/exquisite.svg b/xquisite/exquisite.svg new file mode 100644 index 0000000..448bf12 --- /dev/null +++ b/xquisite/exquisite.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file