Raspberry Pi: QR-Codes mit qrencode generieren

Vor einem Jahr hatte ich schon mal über QR-Codes geschrieben, wie Quick Response online erzeugt werden können.

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
# installieren von qrencode
sudo apt-get install qrencode

Eine Mindmap der installierten Abhängikeiten:
qrencode

Nun ist die Version 3.3 installiert. Wer die neuere 3.4.4 braucht, muss sie halt selbst compilieren (wget, ./configure, make, make install)

So nun wollen wir gleich mal ein paar QR-Cods generieren. Zuerst einen mit einer URL

qrencode -l H -o qr-www.wenzlaff.info.png 'http://www.wenzlaff.info'

qr-www.wenzlaff.info

dabei ist der Parameter -l der Korrekturlevel ( L ~7%, M ~15%, Q ~25%, H ~30% ) und ein QR-Code mit einem Text:

qrencode -l H -o qr-text.png 'wie findest du den Blog'

qr-text

es gehen aber auch Kontaktdaten (vcard). Dazu eine Textdate erstellen mit Namen vcard.txt:

BEGIN:VCARD
VERSION:3.0
N:Wenzlaff, Thomas
ORG:wenzlaff.de
TITLE:Webmaster und Author
EMAIL;TYPE=PREF,INTERNET: [email protected]
END:VCARD

und dann das generieren mit:

qrencode -o tw-vcard-low.png < vcard.txt

tw-vcard-low
oder etwas Fehlertoleranter:

qrencode -l H -o tw-vcard.png < vcard.txt

tw-vcard

Die Anleitung mit allen Optionen gibt es wie immer mit:

qrencode --help
# oder auch mit
man qrencode

Ausgabe:

qrencode version 3.3.0
Copyright (C) 2006-2012 Kentaro Fukuchi
Usage: qrencode [OPTION]... [STRING]
Encode input data in a QR Code and save as a PNG or EPS image.

  -h, --help   display the help message. -h displays only the help of short
               options.

  -o FILENAME, --output=FILENAME
               write image to FILENAME. If '-' is specified, the result
               will be output to standard output. If -S is given, structured
               symbols are written to FILENAME-01.png, FILENAME-02.png, ...
               (suffix is removed from FILENAME, if specified)
  -s NUMBER, --size=NUMBER
               specify module size in dots (pixels). (default=3)

  -l {LMQH}, --level={LMQH}
               specify error correction level from L (lowest) to H (highest).
               (default=L)

  -v NUMBER, --symversion=NUMBER
               specify the version of the symbol. See SYMBOL VERSIONS for more
               information. (default=auto)

  -m NUMBER, --margin=NUMBER
               specify the width of the margins. (default=4 (2 for Micro QR)))

  -d NUMBER, --dpi=NUMBER
               specify the DPI of the generated PNG. (default=72)

  -t {PNG,EPS,SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}, --type={PNG,EPS,
               SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}
               specify the type of the generated image. (default=PNG)

  -S, --structured
               make structured symbols. Version must be specified.

  -k, --kanji  assume that the input text contains kanji (shift-jis).

  -c, --casesensitive
               encode lower-case alphabet characters in 8-bit mode. (default)

  -i, --ignorecase
               ignore case distinctions and use only upper-case characters.

  -8, --8bit   encode entire data in 8-bit mode. -k, -c and -i will be ignored.

      --rle    enable run-length encoding for SVG.

  -M, --micro  encode in a Micro QR Code. (experimental)

      --foreground=RRGGBB[AA]
      --background=RRGGBB[AA]
               specify foreground/background color in hexadecimal notation.
               6-digit (RGB) or 8-digit (RGBA) form are supported.
               Color output support available only in PNG and SVG.
  -V, --version
               display the version number and copyrights of the qrencode.

      --verbose
               display verbose information to stderr.

  [STRING]     input data. If it is not specified, data will be taken from
               standard input.

*SYMBOL VERSIONS
               The symbol versions of QR Code range from Version 1 to Version
               40. Each version has a different module configuration or number
               of modules, ranging from Version 1 (21 x 21 modules) up to
               Version 40 (177 x 177 modules). Each higher version number
               comprises 4 additional modules per side by default. See
               http://www.qrcode.com/en/about/version.html for a detailed
               version list.

Ok, in diesem Sinne, oder …zitat

Ähnliche Artikel:

  1. HTML und CSV #Kismet Reports auf dem #Raspberry Pi generieren
  2. Wie kann man einfach QR-Codes erstellen?
  3. Wie wird auf dem Raspberry Pi die aktuell installierte Debian Version angezeigt?

wallpaper-1019588
KiVVON: Der Game-Changer für Content-Creators
wallpaper-1019588
Mexikanische Burrito Bowl mit Pico de Gallo (Vegan)
wallpaper-1019588
The Great Cleric: Serie wird auf Disc erscheinen
wallpaper-1019588
Why Raeliana Ended Up at the Duke’s Mansion: Disc-Release geplant