{"id":4941,"date":"2015-01-11T01:37:01","date_gmt":"2015-01-11T00:37:01","guid":{"rendered":"http:\/\/blog.wenzlaff.de\/?p=4941"},"modified":"2021-11-22T17:15:06","modified_gmt":"2021-11-22T16:15:06","slug":"raspberry-pi-qr-codes-mit-qrencode-generieren","status":"publish","type":"post","link":"http:\/\/blog.wenzlaff.de\/?p=4941","title":{"rendered":"Raspberry Pi: QR-Codes mit qrencode generieren"},"content":{"rendered":"<p>Vor einem <a href=\"http:\/\/blog.wenzlaff.de\/?p=900\" title=\"qr\" target=\"_blank\" rel=\"noopener noreferrer\">Jahr<\/a> hatte ich schon mal \u00fcber <a href=\"https:\/\/de.wikipedia.org\/wiki\/QR-Code\" title=\"qr-codes\" target=\"_blank\" rel=\"noopener noreferrer\">QR-Codes<\/a> geschrieben, wie Quick Response online erzeugt werden k\u00f6nnen.<\/p>\n<p>Jetzt wolle ich mal QR-Codes mit dem Raspberry Pi selbst erstellen. Das geht auch sehr einfach. Wie?<br \/>\nErste das System auf den aktuellen Stand bringen und dann das <a href=\"https:\/\/fukuchi.org\/works\/qrencode\/\" title=\"qrencode\" target=\"_blank\" rel=\"noopener noreferrer\">qrencode<\/a> Package installieren:<\/p>\n<pre class=\"lang:default decode:true \" >sudo apt-get update\r\nsudo apt-get upgrade\r\n# installieren von qrencode\r\nsudo apt-get install qrencode<\/pre>\n<p>Eine Mindmap der installierten Abh\u00e4ngikeiten:<br \/>\n<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/qrencode.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/qrencode.png\" alt=\"qrencode\" width=\"437\" height=\"131\" class=\"aligncenter size-full wp-image-4959\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/qrencode.png 437w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/qrencode-300x90.png 300w\" sizes=\"auto, (max-width: 437px) 100vw, 437px\" \/><\/a><\/p>\n<p>Nun ist die Version <strong>3.3<\/strong> installiert. Wer die neuere 3.4.4 braucht, muss sie halt selbst compilieren (wget, .\/configure, make, make install) <\/p>\n<p>So nun wollen wir gleich mal ein paar QR-Cods generieren. Zuerst einen mit einer URL<\/p>\n<pre class=\"lang:default decode:true \" >qrencode -l H -o qr-www.wenzlaff.info.png 'http:\/\/www.wenzlaff.info'<\/pre>\n<p><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/qr-www.wenzlaff.info_.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/qr-www.wenzlaff.info_.png\" alt=\"qr-www.wenzlaff.info\" width=\"111\" height=\"111\" class=\"aligncenter size-full wp-image-4942\" \/><\/a><\/p>\n<p>dabei ist der Parameter -l der Korrekturlevel ( L ~7%, M ~15%, Q ~25%, H ~30% ) und ein QR-Code mit einem Text:<!--more--><\/p>\n<pre class=\"lang:default decode:true \" >qrencode -l H -o qr-text.png 'wie findest du den Blog'<\/pre>\n<p><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/qr-text.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/qr-text.png\" alt=\"qr-text\" width=\"111\" height=\"111\" class=\"aligncenter size-full wp-image-4943\" \/><\/a><\/p>\n<p>es gehen aber auch Kontaktdaten (vcard). Dazu eine Textdate erstellen mit Namen vcard.txt:<\/p>\n<pre class=\"lang:default decode:true \" >BEGIN:VCARD\r\nVERSION:3.0\r\nN:Wenzlaff, Thomas\r\nORG:wenzlaff.de\r\nTITLE:Webmaster und Author\r\nEMAIL;TYPE=PREF,INTERNET: info-anfrage@wenzlaff.de\r\nEND:VCARD<\/pre>\n<p>und dann das generieren mit:<\/p>\n<pre class=\"lang:default decode:true \" >qrencode -o tw-vcard-low.png &lt; vcard.txt<\/pre>\n<p><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard-low.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard-low-150x150.png\" alt=\"tw-vcard-low\" width=\"150\" height=\"150\" class=\"aligncenter size-thumbnail wp-image-4948\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard-low-150x150.png 150w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard-low-144x144.png 144w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard-low.png 159w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><br \/>\noder etwas Fehlertoleranter:<\/p>\n<pre class=\"lang:default decode:true \" >qrencode -l H -o tw-vcard.png &lt; vcard.txt<\/pre>\n<p><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard.png\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard-150x150.png\" alt=\"tw-vcard\" width=\"150\" height=\"150\" class=\"aligncenter size-thumbnail wp-image-4946\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard-150x150.png 150w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard-144x144.png 144w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/tw-vcard.png 219w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>Die Anleitung mit allen Optionen gibt es wie immer mit:<\/p>\n<pre class=\"lang:default decode:true \" >qrencode --help\r\n# oder auch mit\r\nman qrencode\r\n<\/pre>\n<p>Ausgabe:<\/p>\n<pre class=\"lang:default decode:true \" >qrencode version 3.3.0\r\nCopyright (C) 2006-2012 Kentaro Fukuchi\r\nUsage: qrencode [OPTION]... [STRING]\r\nEncode input data in a QR Code and save as a PNG or EPS image.\r\n\r\n  -h, --help   display the help message. -h displays only the help of short\r\n               options.\r\n\r\n  -o FILENAME, --output=FILENAME\r\n               write image to FILENAME. If '-' is specified, the result\r\n               will be output to standard output. If -S is given, structured\r\n               symbols are written to FILENAME-01.png, FILENAME-02.png, ...\r\n               (suffix is removed from FILENAME, if specified)\r\n  -s NUMBER, --size=NUMBER\r\n               specify module size in dots (pixels). (default=3)\r\n\r\n  -l {LMQH}, --level={LMQH}\r\n               specify error correction level from L (lowest) to H (highest).\r\n               (default=L)\r\n\r\n  -v NUMBER, --symversion=NUMBER\r\n               specify the version of the symbol. See SYMBOL VERSIONS for more\r\n               information. (default=auto)\r\n\r\n  -m NUMBER, --margin=NUMBER\r\n               specify the width of the margins. (default=4 (2 for Micro QR)))\r\n\r\n  -d NUMBER, --dpi=NUMBER\r\n               specify the DPI of the generated PNG. (default=72)\r\n\r\n  -t {PNG,EPS,SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}, --type={PNG,EPS,\r\n               SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}\r\n               specify the type of the generated image. (default=PNG)\r\n\r\n  -S, --structured\r\n               make structured symbols. Version must be specified.\r\n\r\n  -k, --kanji  assume that the input text contains kanji (shift-jis).\r\n\r\n  -c, --casesensitive\r\n               encode lower-case alphabet characters in 8-bit mode. (default)\r\n\r\n  -i, --ignorecase\r\n               ignore case distinctions and use only upper-case characters.\r\n\r\n  -8, --8bit   encode entire data in 8-bit mode. -k, -c and -i will be ignored.\r\n\r\n      --rle    enable run-length encoding for SVG.\r\n\r\n  -M, --micro  encode in a Micro QR Code. (experimental)\r\n\r\n      --foreground=RRGGBB[AA]\r\n      --background=RRGGBB[AA]\r\n               specify foreground\/background color in hexadecimal notation.\r\n               6-digit (RGB) or 8-digit (RGBA) form are supported.\r\n               Color output support available only in PNG and SVG.\r\n  -V, --version\r\n               display the version number and copyrights of the qrencode.\r\n\r\n      --verbose\r\n               display verbose information to stderr.\r\n\r\n  [STRING]     input data. If it is not specified, data will be taken from\r\n               standard input.\r\n\r\n*SYMBOL VERSIONS\r\n               The symbol versions of QR Code range from Version 1 to Version\r\n               40. Each version has a different module configuration or number\r\n               of modules, ranging from Version 1 (21 x 21 modules) up to\r\n               Version 40 (177 x 177 modules). Each higher version number\r\n               comprises 4 additional modules per side by default. See\r\n               http:\/\/www.qrcode.com\/en\/about\/version.html for a detailed\r\n               version list.<\/pre>\n<p>Ok, in diesem Sinne, oder &#8230;<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/zitat.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/zitat.png\" alt=\"zitat\" width=\"255\" height=\"255\" class=\"aligncenter size-full wp-image-4950\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/zitat.png 255w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/zitat-150x150.png 150w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/01\/zitat-144x144.png 144w\" sizes=\"auto, (max-width: 255px) 100vw, 255px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vor einem Jahr hatte ich schon mal \u00fcber QR-Codes geschrieben, wie Quick Response online erzeugt werden k\u00f6nnen. Jetzt wolle ich mal QR-Codes mit dem Raspberry Pi selbst erstellen. Das geht auch sehr einfach. Wie? Erste das System auf den aktuellen Stand bringen und dann das qrencode Package installieren: sudo apt-get update sudo apt-get upgrade # &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/blog.wenzlaff.de\/?p=4941\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eRaspberry Pi: QR-Codes mit qrencode generieren\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1023],"tags":[428,1907,426,555,1906,1905],"class_list":["post-4941","post","type-post","status-publish","format-standard","hentry","category-allgemein","category-raspberry-pi","tag-barcode","tag-codes-erzeugen","tag-qr","tag-qr-code","tag-qr-erzeugen","tag-qrencode"],"_links":{"self":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/4941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4941"}],"version-history":[{"count":0,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/4941\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4941"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}