Metadata-Version: 2.5
Name: qrcode-pretty
Version: 1.1.2
Summary: A tool which generates pretty QR codes
Project-URL: Homepage, https://www.afkdev8.com/
Project-URL: Repository, https://github.com/mrinfinidy/qrcode-pretty
Project-URL: Issues, https://github.com/mrinfinidy/qrcode-pretty/issues
Author-email: afkdev8 <mail@afkdev8.com>
License: MIT
License-File: LICENSE
Keywords: customizable,generator,pretty,qr,qrcode
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: pillow>=9.0
Requires-Dist: qrcode[pil]>=7.0
Description-Content-Type: text/markdown

# QR Code Pretty

![Banner](./samples/banner.png)

## Overview

Generate pretty QR codes.

QR Code Pretty uses the [python-qrcode](https://github.com/lincolnloop/python-qrcode) library to generate qr codes
and provides various options to customize the qrcode.
You can adjust style, color and add an image in the middle.
Check out the usage for all available options.

## Table of Contents

- [Installation](#installation)
  - [NixOS](#nixos)
  - [Debian/Ubuntu](#debianubuntu)
  - [Arch Linux (AUR)](#arch-linux-aur)
  - [uv](#uv)
  - [pipx](#pipx)
- [Usage](#usage)
  - [Command-Line Options](#command-line-options)
  - [Sample Gallery](#sample-gallery)
- [Contributing](#contributing)
- [Package Information](#package-information)

## Installation

### NixOS

This tool is packaged as a NixOS package. You can install it using the following flake input:

```nix
qrcode-pretty = {
  url = "github:mrinfinidy/qrcode-pretty";
  inputs.nixpkgs.follows = "nixpkgs";
};
```

Add the flake input to the outputs:

```nix
outputs = {
  # your other outputs
  qrcode-pretty,
  ...
}@inputs:
```

Then add to your home-manager config:

```nix
home-manager.users.<your-user> = {
    home.packages = [
        (inputs.qrcode-pretty.packages.${pkgs.system}.default)
    ];
};
```

Or build and run directly:

```bash
# Build with Nix
nix build github:mrinfinidy/qrcode-pretty

# Run from local checkout
nix run .#qrcode-pretty -- -d "your data here"
```

Or to test without permanent installation:

```bash
nix run github:mrinfinidy/qrcode-pretty --override-input nixpkgs nixpkgs
```

### Debian/Ubuntu

For releases produced by the coordinated pipeline, download the `.deb` matching
**Debian 13** (`+deb13`) or **Ubuntu 24.04 LTS** (`+ubuntu24.04`) from the
[releases page](https://github.com/mrinfinidy/qrcode-pretty/releases).
Legacy releases through **1.1.1** have no `.deb` assets; choose a release that
includes the package for your distribution.

Download `SHA256SUMS` from the same release and verify the package before installing:

```bash
# Keep only the package matching your distribution in this directory.
sha256sum --ignore-missing --check SHA256SUMS
sudo apt install ./qrcode-pretty_*.deb
qrcode-pretty --help
qrcode-pretty --data 'https://example.com' --image default --output /tmp/qr-test
```

To uninstall, run `sudo apt purge qrcode-pretty`.

There is no APT repository or PPA. For local builds and package testing, see
[PACKAGING.md](PACKAGING.md); maintainers should use the
[coordinated release process](docs/RELEASING.md).

### Arch Linux (AUR)

Install from the AUR using your preferred AUR helper:

```bash
# Using yay
yay -S qrcode-pretty

# Using paru
paru -S qrcode-pretty

# Or manually with makepkg
git clone https://aur.archlinux.org/qrcode-pretty.git
cd qrcode-pretty
makepkg -si
```

### uv

[uv](https://github.com/astral-sh/uv) is a fast Python package installer and resolver, which I prefer over pip/pipx:

```bash
uv tool install qrcode-pretty
```

### pipx

For installing as a standalone command-line tool:

```bash
pipx install qrcode-pretty
```

## Usage

QR Code Pretty provides the `qrcode-pretty` command-line tool.

### Basic Usage

Generate a QR code with minimal options:

```bash
qrcode-pretty -d "https://github.com/mrinfinidy/qrcode-pretty"
```

### Command-Line Options

Use `qrcode-pretty -h` to print all available options:

```
Options:
  -h, --help                              Show this help message and exit
  -d, --data <data>                       Data to encode in QR code (required)
  -i, --image <image>                     Input image file name
  -s, --style <style>                     Style for the QR code modules
      --style-inner <style>               Style for the inner eyes
      --style-outer <style>               Style for the outer eyes
  -b, --base <hex>                        Base color hex code (e.g. #000000)
  -n, --color-inner <hex>                 Inner eye color hex code
  -r, --color-outer <hex>                 Outer eye color hex code
  -o, --output <directory or filename>    Output directory path or filename (default: ~/Pictures/qrcode-pretty/qrcode.png)
      --svg                               Also generate SVG output
      --transparent                       Transparent QR code background
      --version <int>                     QR version (default: 5)
      --box-size <int>                    Box size in pixels (default: 10)
      --border <int>                      Border size in boxes (default: 4)
      --error-correction <L|M|Q|H>        Error correction level (default: H)

Available styles: square, gapped-square, circle, round, vertical-bars, horizontal-bars
```

**Note:** When embedding a center image (logo), it is recommended to use a high error correction level (default: H).

**About the `--image` option:**

- Use `--image /path/to/your/logo.png` to embed your own image in the QR code center
- Use `--image default` to use the bundled demonstration image
- Omit `--image` to generate a QR code without a center image

The **1.1.1** Python distributions do not bundle the default image. With that
version, supply your own image path; bundled-image support is included in Python
releases produced by the new pipeline.

### Sample Gallery

#### QR Code Github

![qrcode github cat](./samples/qrcode-cat.png)

`qrcode-pretty --data "https://github.com/mrinfinidy/qrcode-pretty" --image default --style round --style-inner round --style-outer round --base "#000000" --color-inner "#d3869b" --color-outer "#458588" --output "~/Pictures/"`

![qrcode github cat 2](./samples/qrcode-cat-2.png)

`qrcode-pretty --data "https://github.com/mrinfinidy/qrcode-pretty" --image default --style circle --style-inner round --style-outer round --base "#1d2021" --color-inner "#666341" --color-outer "#1d2021" --output "~/Pictures/"`

![qrcode github](./samples/qrcode-purple.png)

`qrcode-pretty --data "https://github.com/mrinfinidy/qrcode-pretty" --style round --style-inner round --style-outer round --base "#8e8ece" --color-inner "#6cf2e5" --color-outer "#40E0D0" --output "~/Pictures/"`

#### QR Code afkdev8 (my homepage)

![qrcode afkdev8 vertical-bars](./samples/qrcode-afkdev8-vertical.png)

`qrcode-pretty --data "https://www.afkdev8.com/" --image "~/Pictures/afkdev8-logo.png" --style vertical-bars --style-inner round --style-outer round --base "#000000" --color-inner "#000000" --color-outer "#000000" --output "~/Pictures/"`

![qrcode afkdev8 horizontal-bars](./samples/qrcode-afkdev-horizontal.png)

`qrcode-pretty --data "https://www.afkdev8.com/" --image "~/Pictures/afkdev8-logo-dark.png" --style horizontal-bars --style-inner round --style-outer round --base "#000000" --color-inner "#000000" --color-outer "#000000" --output "~/Pictures/"`

#### QR Code lemons

![qrcode lemons](./samples/qrcode-lemons.png)

`qrcode-pretty --data "lemons" --image "~/Pictures/lemons.png" --style square --style-inner circle --style-outer gapped-square --base "#000000" --color-inner "#000000" --color-outer "#000000" --output "~/Pictures/"`

## Contributing

See [CONTRIBUTING.md](./docs/CONTRIBUTING.md) for development requirements, setup and testing guide.

## Package Information

This package follows modern Python packaging standards:

- **Package Name**: `qrcode-pretty`
- **Module Name**: `qrcode_pretty`
- **Build System**: [Hatchling](https://hatch.pypa.io/)
- **Configuration**: `pyproject.toml` (PEP 621 compliant)
- **Minimum Python**: 3.10+

## Author

afkdev8 `<mail@afkdev8.com>`
