segno¶
Synopsis¶
segno [options] content
Description¶
segno creates QR Codes and Micro QR Codes.
It can be used to print the codes to a terminal or to serialize them in several output formats (like SVG and PNG).
Command Line Options¶
-
--ver
,
-V
¶
Shows Segno’s version and exit
-
-h
,
--help
¶
Show a help message which lists all commands and exit
QR Code Options
-
--version
VERSION
,
-v
VERSION
¶ QR Code version: 1 .. 40 or Micro Code Version “M1”, “M2”, “M3”, “M4”
-
--error
{L,M,Q,H,-}
,
-e
{L,M,Q,H,-}
¶ Error correction level: “L”: 7% (default), “M”: 15%, “Q”: 25%, “H”: 30%, “-“: no error correction (used for M1 symbols)
-
--mode
{numeric,alphanumeric,byte,kanji}
,
-m
{numeric,alphanumeric,byte,kanji}
¶ Mode. If unspecified (default), an optimal mode is choosen for the given input.
-
--pattern
PATTERN
,
-p
PATTERN
¶ Mask pattern to use. If unspecified (default), an optimal mask pattern is used. Valid values for QR Codes: 0 .. 7 Valid values for Micro QR Codes: 0 .. 3
-
--micro
¶
Allow the creation of Micro QR Codes
-
--no-micro
¶
Disallow creation of Micro QR Codes (default)
-
--no-error-boost
¶
Disables the automatic error correction level incrementation. By default, the maximal error correction level is used (without changing the version).
-
--seq
¶
Creates a sequence of QR Codes (Structured Append mode). The
--version
or--symbol-count
must be provided
-
--symbol-count
SYMBOL_COUNT
,
-sc
SYMBOL_COUNT
¶ Number of symbols to create
Output Options
-
--scale
SCALE
,
-s
SCALE
¶ Scaling factor of the output. By default, a scaling factor of 1 is used which can result into too small images. Some output formats, i.e. SVG, accept a decimal value.
-
--border
BORDER
,
-b
BORDER
¶ Size of the border / quiet zone of the output. By default, the standard border (4 modules for QR Codes, 2 modules for Micro QR Codes) will be used. A value of 0 omits the border
-
--color
COLOR
¶ Color of the dark modules. The color may be specified as web color name, i.e. “red” or as hexadecimal value, i.e. “#0033cc”. Some serializers, i.e. SVG and PNG, support alpha channels (8-digit hexadecimal value) and some support “transparent” as color value. The standard color is black.
-
--background
BACKGROUND
,
-bg
BACKGROUND
¶ Color of the light modules. See
--color
for a description of possible values. The standard background color is white.
-
--output
OUTPUT
,
-o
OUTPUT
¶ Output file. If not specified, the QR Code is printed to the terminal
SVG Options
-
--no-classes
¶
Omits the (default) SVG classes
-
--no-xmldecl
¶
Omits the XML declaration header
-
--no-namespace
¶
Indicates that the SVG document should have no SVG namespace declaration
-
--no-newline
¶
Indicates that the SVG document should have no trailing newline
-
--title
TITLE
¶ Specifies the title of the SVG document
-
--desc
DESC
¶ Specifies the description of the SVG document
-
--svgid
SVGID
¶ Indicates the ID of the <svg/> element
-
--svgclass
SVGCLASS
¶ Indicates the CSS class of the <svg/> element
-
--lineclass
LINECLASS
¶ Indicates the CSS class of the <path/> element (the dark modules)
-
--no-size
¶
Indicates that the SVG document should not have “width” and “height” attributes
-
--unit
UNIT
¶ Indicates SVG coordinate system unit
-
--svgversion
SVGVERSION
¶ Indicates the SVG version
-
--encoding
ENCODING
¶ Specifies the encoding of the document
PNG Options
-
--dpi
DPI
¶ Sets the DPI value of the PNG file
Exit Status¶
segno exits 0 on success, and >0 if an error occurs.
Examples¶
$ segno "Up jumped the devil"
Prints a 2-Q QR code to the terminal
$ segno -o=yesterday.png "Yesterday"
Saves the 1-Q QR code as PNG image.
$ segno -o=fool.svg --title="Example QR code" "The Fool on the Hill"
Saves the 2-Q QR code as SVG document with the given title.
$ segno -o=number.svg --scale=10 --color="darkblue" "A Day in the Life"
Saves the 1-L QR code as SVG document, using a scaling factor of 10 and the dark modules use the color “darkblue” instead of black.
$ segno -o rain.png -s 10 --color="#003399" --micro RAIN
Saves the Micro QR Code (M2-M) as PNG image, using the color #003399 for dark modules. Each module corresponds to 10 x 10 pixels because the scaling factor was set to a value of 10.