Skip to main content

QR code generator for terminal output

Project description

qrcode_term

QR code generator for terminal output

Screenshot

From a terminal:

alt text

CLI

> python src/qrcode_term/qrcode_term.py
███████████████████████████
███▀▀▀▀▀▀▀████▀▀█▀▀▀▀▀▀▀███
███ █▀▀▀█ ██▄▀█ █ █▀▀▀█ ███
███ █   █ ███ ▀▀█ █   █ ███
███ ▀▀▀▀▀ █ █▀█▀█ ▀▀▀▀▀ ███
███▀██▀█▀▀█▀█ ▀▀▀█▀████████
███▄▄ ▄▀▄▀▀▀▄▄ ██▄ ▄▀▀▄ ███
████▄██▀▄▀   ▀▀▄▀▄▀ ▄█▄▄███
███▀▀▀▀▀▀▀█▄█▀ ▀█▀▀▀▀ ▀████
███ █▀▀▀█ █▄ ▄█▀▀█▄███▄████
███ █   █ █▄ ▀█ █▀▄ ▄ ▄ ███
███ ▀▀▀▀▀ █▀█ ▄▀▄▀▀█▀█▀████
███████████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Hello world!

> python src/qrcode_term/qrcode_term.py --data "mydata" -f5
███████████████████████████████
███████████████████████████████
█████▀▀▀▀▀▀▀██▀████▀▀▀▀▀▀▀█████
█████ █▀▀▀█ █▄  █ █ █▀▀▀█ █████
█████ █   █ █▀▀▄▀▀█ █   █ █████
█████ ▀▀▀▀▀ █▀▄▀▄▀█ ▀▀▀▀▀ █████
█████▀█▀█▀█▀██▀██▀███▀██▀██████
██████ ▀▀  ▀█  █ █ ▀ █  ▀ █████
█████ ▄█▄▀▄▀ ▀█▄ ▄ ▀ ▄██▀██████
█████▀▀▀▀▀▀▀█▄▄ █▀█▄▄▀█▀  █████
█████ █▀▀▀█ █▀█ █▀█ █▀██  █████
█████ █   █ █▀█▄ █ ▀   ▀▄▀█████
█████ ▀▀▀▀▀ █▀ ▀ ▄ ▀ ▀▀█ ▀█████
███████████████████████████████
███████████████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
mydata

> python src/qrcode_term/qrcode_term.py --data "mydata 2" -f3 -i
                           
   ▄▄▄▄▄▄▄ ▄ ▄▄  ▄▄▄▄▄▄▄   
   █ ▄▄▄ █ ██▀█▀ █ ▄▄▄ █   
   █ ███ █ ▄▀▀▀▄ █ ███ █   
   █▄▄▄▄▄█ ▄ ▄▀█ █▄▄▄▄▄█   
   ▄  ▄▄▄▄▄▄██▀█▄  ▄ ▄▄▄   
    ▀▄▄█▀▄ ▄▀█ ▀ ▀█  ▄█▄   
   ▀▄▄ ▀▀▄▄▄▀ ▀ ▄▄▄█▄▀▀    
   ▄▄▄▄▄▄▄ █  ▀█▄▄▄█▀█▀    
   █ ▄▄▄ █ ██▀██▀▄█▀█▀ ▀   
   █ ███ █ ▀ █▀▀ ▄ ▄▀█▄▄   
   █▄▄▄▄▄█ ▄▀▄▄ ▀▀ ▄█▀▀▀   
                           
                           
mydata 2

> python src/qrcode_term/qrcode_term.py --data "mydata 3" -f10 -n
█████████████████████████████████████████
█████████████████████████████████████████
█████████████████████████████████████████
█████████████████████████████████████████
█████████████████████████████████████████
██████████ ▄▄▄▄▄ ██▄ ▀ █ ▄▄▄▄▄ ██████████
██████████ █   █ █ ▄ █▀█ █   █ ██████████
██████████ █▄▄▄█ █  ▄▄ █ █▄▄▄█ ██████████
██████████▄▄▄▄▄▄▄█ ▀▄▀ █▄▄▄▄▄▄▄██████████
██████████▄█▄▄▄▄▄█▀▄ █ █▄▄ ▄▄▀▀██████████
██████████▄ ▀  ▀▄▀█ ▄▄█▄▄ █   ███████████
██████████████▄▄▄█ █  ▀▀▀ ▀▀▀▄ ██████████
██████████ ▄▄▄▄▄ █▀▄▄▀ ▀ ▄█▀ ▄███████████
██████████ █   █ █ ▀██ ██ ▀█▀█▄██████████
██████████ █▄▄▄█ █▄▄▄▄█▄█▀█  ████████████
██████████▄▄▄▄▄▄▄█▄██▄█▄███▄█▄███████████
█████████████████████████████████████████
█████████████████████████████████████████
█████████████████████████████████████████
█████████████████████████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
mydata 3

API

Examples:

from qrcode_term import qrcode_string

a = qrcode_string("Is there anybody out there?")
b = qrcode_string("It's just another brick in the wall", frame_width=1)
c = qrcode_string("Vera! Vera!", version=5, inverse=True, frame_width=5, ansi_white=False)

print(a)
print(b)
print(c)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qrcode_term-0.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qrcode_term-0.0.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file qrcode_term-0.0.1.tar.gz.

File metadata

  • Download URL: qrcode_term-0.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0

File hashes

Hashes for qrcode_term-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9b66c14ee936bfbfbdcc8ba6d476debfd57e40822d566d59b144bc70aca28440
MD5 bb20ce5ac61276a9627dde536c87f172
BLAKE2b-256 80f5dd868579c34219417828c989c0a1e94918f3cc443f42497d610a80b32d1b

See more details on using hashes here.

File details

Details for the file qrcode_term-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: qrcode_term-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0

File hashes

Hashes for qrcode_term-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8148b678d20ee4a15eb971310acbcce9f378f224b975ca4046d14132e17cf38
MD5 c25f612dc5878039b75836134611b1b9
BLAKE2b-256 9d1ad3bc3c5a10a7c868f314c6048b44c31a40f2482d1f58ce9698b130538f4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page