{"id":13635555,"url":"https://github.com/sorairolake/qrtool","last_synced_at":"2025-05-16T03:05:40.941Z","repository":{"id":56843592,"uuid":"526218502","full_name":"sorairolake/qrtool","owner":"sorairolake","description":"An utility for encoding or decoding QR code","archived":false,"fork":false,"pushed_at":"2025-05-15T05:53:14.000Z","size":1658,"stargazers_count":190,"open_issues_count":1,"forks_count":8,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-05-15T06:36:23.449Z","etag":null,"topics":["cli","command-line","command-line-tool","qrcode","qrcode-generator","qrcode-reader","qrcode-scanner","rust","rust-lang","terminal","tool"],"latest_commit_sha":null,"homepage":"https://sorairolake.github.io/qrtool/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sorairolake.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.adoc","contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.adoc","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-18T13:15:08.000Z","updated_at":"2025-05-15T05:53:17.000Z","dependencies_parsed_at":"2023-12-02T09:24:21.495Z","dependency_job_id":"45835e83-a41b-471d-a190-2b85f15fde7c","html_url":"https://github.com/sorairolake/qrtool","commit_stats":{"total_commits":185,"total_committers":2,"mean_commits":92.5,"dds":0.3567567567567568,"last_synced_commit":"862a983584549728b447a3815d7b9c7d3df0460b"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorairolake%2Fqrtool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorairolake%2Fqrtool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorairolake%2Fqrtool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorairolake%2Fqrtool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sorairolake","download_url":"https://codeload.github.com/sorairolake/qrtool/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459088,"owners_count":22074605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","command-line-tool","qrcode","qrcode-generator","qrcode-reader","qrcode-scanner","rust","rust-lang","terminal","tool"],"created_at":"2024-08-02T00:00:47.205Z","updated_at":"2025-05-16T03:05:35.932Z","avatar_url":"https://github.com/sorairolake.png","language":"Rust","readme":"\u003c!--\nSPDX-FileCopyrightText: 2022 Shun Sakai\nSPDX-FileCopyrightText: 2024 Orhun Parmaksız\n\nSPDX-License-Identifier: Apache-2.0 OR MIT\n--\u003e\n\n# qrtool\n\n[![CI][ci-badge]][ci-url]\n[![Version][version-badge]][version-url]\n![MSRV][msrv-badge]\n![License][license-badge]\n[![REUSE status][reuse-badge]][reuse-url]\n\n**qrtool** is a command-line utility for encoding or decoding QR code.\n\n![Demo animation](assets/demo.gif)\n\n## Installation\n\n### From source\n\n```sh\ncargo install qrtool\n```\n\n### Via a package manager\n\n[![Packaging status][repology-badge]][repology-versions]\n\n| OS             | Package manager | Command                      |\n| -------------- | --------------- | ---------------------------- |\n| _Any_          | [Homebrew]      | `brew install qrtool`        |\n| _Any_          | [Nix]           | `nix-env -iA nixpkgs.qrtool` |\n| [_Arch Linux_] | [Pacman]        | `pacman -S qrtool`           |\n| [_openSUSE_]   | Zypper          | `zypper install qrtool`      |\n\n### From binaries\n\nThe [release page] contains pre-built binaries for Linux, macOS and Windows.\n\n### How to build\n\nPlease see [BUILD.adoc].\n\n## Usage\n\n### Basic usage\n\nEncode a string in a QR code:\n\n```sh\nqrtool encode \"QR code\" \u003e output.png\n```\n\nGenerate this image:\n\n![Output](tests/data/basic/basic.png)\n\nDecode a QR code from this image:\n\n```sh\n$ qrtool decode output.png\nQR code\n```\n\n### Output formats\n\nUse `-t` option to change the format of the generated image.\n\nThe format is:\n\n- `png` (default)\n- `svg`\n- `pic` ([PIC] markup language)\n- `ansi` (to the terminal using 4-bit ANSI escape sequences)\n- `ansi256` (to the terminal using 8-bit ANSI escape sequences)\n- `ansi-true-color` (to the terminal using 24-bit ANSI escape sequences)\n- `ascii` (to the terminal as ASCII string)\n- `ascii-invert`\n- `unicode` (to the terminal as UTF-8 string)\n- `unicode-invert`\n\nEncode to a SVG image:\n\n```sh\nqrtool encode -o output.svg -t svg \"QR code\"\n```\n\nGenerate this image:\n\n![Output](tests/data/decode/decode.svg)\n\nGenerate a PDF file from the PIC code:\n\n```sh\nqrtool encode -t pic \"QR code\" \\\n    | awk 'BEGIN { print \".vs 0\\n.po 0\\n.PS\" } END { print \"scale = 25.4 * 3\\n.PE\" } { print }' \\\n    | groff -Tpdf -p -P-p3i,3i \\\n    \u003e output.pdf\n```\n\nOutput to the terminal as UTF-8 string:\n\n```sh\nqrtool encode -t unicode \"QR code\"\n```\n\n### Micro QR code generation\n\nUse `--variant` option to change the variant of the generated QR code. The\nvariant is `normal` (default) or `micro` (Micro QR code).\n\n```sh\nqrtool encode -v 3 --variant micro \"QR code\" \u003e output.png\n```\n\nGenerate this image:\n\n![Output](tests/data/variant/micro.png)\n\n### Colored output\n\nUse `--foreground` and `--background` options to change the foreground and\nbackground colors of the generated image. These options takes a\n[CSS color string] such as `brown`, `#a52a2a` or `rgb(165 42 42)`. The default\nforeground color is black and the background color is white of CSS's named\ncolors.\n\n```sh\nqrtool encode --foreground brown --background lightslategray \"QR code\" \u003e output.png\n```\n\nGenerate this image:\n\n![Output](tests/data/colored/rgb.png)\n\nColored output is also available when the output format is any ANSI escape\nsequences:\n\n```sh\nqrtool encode -t ansi-true-color --foreground brown --background lightslategray \"QR code\"\n```\n\nNote that lossy conversion may be performed depending on the color space\nsupported by the method to specify a color, the color depth supported by the\noutput format, etc.\n\n### Supported input image formats\n\n`qrtool decode` supports decoding a QR code from the following image formats:\n\n- [BMP]\n- [DDS]\n- [Farbfeld]\n- [GIF]\n- [Radiance RGBE]\n- [ICO][][^ico-note]\n- [JPEG]\n- [OpenEXR]\n- [PNG]\n- [PNM]\n- [QOI]\n- [SVG][][^svg-note]\n- [TGA]\n- [TIFF]\n- [WebP]\n- [XBM]\n\nTo support decoding from SVG image, the `decode-from-svg` feature must be\nenabled at compile time. Note that the SVG image is rasterized before scanning.\n\nImage formats other than PNG can be disabled by disabling the `default`\nfeature, and can be enabled individually.\n\nUse `-t` option to specify the image format. If this option is not specified,\nthe image format is determined based on the extension or the magic number.\n\nInput this WebP image:\n\n![Input](tests/data/decode/lossless.webp)\n\nDecode a QR code from the WebP image:\n\n```sh\n$ qrtool decode input.webp\nQR code\n# or\n$ qrtool decode -t webp input.webp\nQR code\n```\n\n[^ico-note]: CUR is also supported.\n\n[^svg-note]: SVGZ is also supported.\n\n### Generate shell completion\n\n`--generate-completion` option generates shell completions to standard output.\n\nThe following shells are supported:\n\n- `bash`\n- `elvish`\n- `fish`\n- `nushell`\n- `powershell`\n- `zsh`\n\nExample:\n\n```sh\nqrtool --generate-completion bash \u003e qrtool.bash\n```\n\n### Integration with other programs\n\nBoth `qrtool encode` and `qrtool decode` can read from standard input and\noutput to standard output.\n\n#### Optimize the output image\n\nThe image output by `qrtool encode` is not optimized. For example, a PNG image\nis always output as the 32-bit RGBA format. If you want to reduce the image\nsize or optimize the image, use an optimizer such as [`oxipng`] or\n[`svgcleaner`].\n\nOptimize the output PNG image:\n\n```sh\nqrtool encode \"QR code\" | oxipng - \u003e output.png\n```\n\nOptimize the output SVG image:\n\n```sh\nqrtool encode -t svg \"QR code\" | svgcleaner -c - \u003e output.svg\n```\n\nIf the `optimize-output-png` feature is enabled, you can also use\n`--optimize-png` option and `--zopfli` option of this command to optimize\noutput PNG image.\n\n#### Reading and writing unsupported image formats\n\nIf you want to save the encoded image in an image format other than PNG or SVG,\nor decode an image in an unsupported image format, convert it using a converter\nsuch as [ImageMagick].\n\n##### Raster formats\n\nRead `Cargo.toml` from standard input and save the encoded result as a XPM\nimage:\n\n```sh\ncat Cargo.toml | qrtool encode | magick png:- output.xpm\n```\n\nDecode this image and print the result using `bat`:\n\n```sh\nmagick output.xpm png:- | qrtool decode | bat -l toml\n```\n\n##### Vector formats\n\nRead a string from standard input and save the encoded result as an EPS image:\n\n```sh\necho \"The quick brown fox jumps over the lazy dog.\" \\\n    | qrtool encode -t svg \\\n    | inkscape -p -o output.eps\n```\n\nDecode this image and print the result to standard output:\n\n```sh\n$ inkscape -o - --export-type svg output.eps | qrtool decode\nThe quick brown fox jumps over the lazy dog.\n```\n\n## Command-line options\n\nPlease see the following:\n\n- [`qrtool(1)`]\n- [`qrtool-encode(1)`]\n- [`qrtool-decode(1)`]\n- [`qrtool-help(1)`]\n\n## Source code\n\nThe upstream repository is available at\n\u003chttps://github.com/sorairolake/qrtool.git\u003e.\n\nThe source code is also available at:\n\n- \u003chttps://gitlab.com/sorairolake/qrtool.git\u003e\n- \u003chttps://codeberg.org/sorairolake/qrtool.git\u003e\n\n## Changelog\n\nPlease see [CHANGELOG.adoc].\n\n## Contributing\n\nPlease see [CONTRIBUTING.adoc].\n\n## Acknowledgment\n\nThis program is inspired by [`qrencode`] and [`zbarimg`].\n\n## Home page\n\n\u003chttps://sorairolake.github.io/qrtool/\u003e\n\n## License\n\nCopyright (C) 2022 Shun Sakai and other contributors (see [AUTHORS.adoc])\n\n1.  This program is distributed under the terms of either the _Apache License\n    2.0_ or the _MIT License_.\n2.  Some files are distributed under the terms of the _Creative Commons\n    Attribution 4.0 International Public License_.\n\nThis project is compliant with version 3.3 of the [_REUSE Specification_]. See\ncopyright notices of individual files for more details on copyright and\nlicensing information.\n\n[ci-badge]: https://img.shields.io/github/actions/workflow/status/sorairolake/qrtool/CI.yaml?branch=develop\u0026style=for-the-badge\u0026logo=github\u0026label=CI\n[ci-url]: https://github.com/sorairolake/qrtool/actions?query=branch%3Adevelop+workflow%3ACI++\n[version-badge]: https://img.shields.io/crates/v/qrtool?style=for-the-badge\u0026logo=rust\n[version-url]: https://crates.io/crates/qrtool\n[msrv-badge]: https://img.shields.io/crates/msrv/qrtool?style=for-the-badge\u0026logo=rust\n[license-badge]: https://img.shields.io/crates/l/qrtool?style=for-the-badge\n[reuse-badge]: https://img.shields.io/reuse/compliance/github.com%2Fsorairolake%2Fqrtool?style=for-the-badge\n[reuse-url]: https://api.reuse.software/info/github.com/sorairolake/qrtool\n[repology-badge]: https://repology.org/badge/vertical-allrepos/qrtool.svg?columns=3\n[repology-versions]: https://repology.org/project/qrtool/versions\n[Homebrew]: https://brew.sh/\n[Nix]: https://nixos.org/\n[_Arch Linux_]: https://archlinux.org/\n[Pacman]: https://wiki.archlinux.org/title/pacman\n[_openSUSE_]: https://www.opensuse.org/\n[release page]: https://github.com/sorairolake/qrtool/releases\n[BUILD.adoc]: BUILD.adoc\n[PIC]: https://en.wikipedia.org/wiki/PIC_(markup_language)\n[CSS color string]: https://www.w3.org/TR/css-color-4/\n[BMP]: https://en.wikipedia.org/wiki/BMP_file_format\n[DDS]: https://en.wikipedia.org/wiki/DirectDraw_Surface\n[Farbfeld]: https://tools.suckless.org/farbfeld/\n[GIF]: https://en.wikipedia.org/wiki/GIF\n[Radiance RGBE]: https://en.wikipedia.org/wiki/RGBE_image_format\n[ICO]: https://en.wikipedia.org/wiki/ICO_(file_format)\n[JPEG]: https://jpeg.org/jpeg/\n[OpenEXR]: https://openexr.com/\n[PNG]: https://en.wikipedia.org/wiki/PNG\n[PNM]: https://netpbm.sourceforge.net/doc/pnm.html\n[QOI]: https://qoiformat.org/\n[SVG]: https://www.w3.org/Graphics/SVG/\n[TGA]: https://en.wikipedia.org/wiki/Truevision_TGA\n[TIFF]: https://en.wikipedia.org/wiki/TIFF\n[WebP]: https://developers.google.com/speed/webp/\n[XBM]: https://en.wikipedia.org/wiki/X_BitMap\n[`oxipng`]: https://github.com/shssoichiro/oxipng\n[`svgcleaner`]: https://github.com/RazrFalcon/svgcleaner\n[ImageMagick]: https://imagemagick.org/\n[`qrtool(1)`]: https://sorairolake.github.io/qrtool/book/man/man1/qrtool.1.html\n[`qrtool-encode(1)`]: https://sorairolake.github.io/qrtool/book/man/man1/qrtool-encode.1.html\n[`qrtool-decode(1)`]: https://sorairolake.github.io/qrtool/book/man/man1/qrtool-decode.1.html\n[`qrtool-help(1)`]: https://sorairolake.github.io/qrtool/book/man/man1/qrtool-help.1.html\n[CHANGELOG.adoc]: CHANGELOG.adoc\n[CONTRIBUTING.adoc]: CONTRIBUTING.adoc\n[`qrencode`]: https://fukuchi.org/works/qrencode/\n[`zbarimg`]: https://github.com/mchehab/zbar\n[AUTHORS.adoc]: AUTHORS.adoc\n[_REUSE Specification_]: https://reuse.software/spec-3.3/\n","funding_links":[],"categories":["Applications"],"sub_categories":["Utilities"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsorairolake%2Fqrtool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsorairolake%2Fqrtool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsorairolake%2Fqrtool/lists"}