Skip to content

arnautm-dev/qr-code-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

QR Code Generator

This project is a simple tool to generate QR codes from text or URLs and save them to the downloads folder.

It also attempts to copy the generated image to the system clipboard automatically.

Features

  • Generates a PNG file containing the QR code.
  • Saves the QR image to the downloads folder (Downloads or similar).
  • Copies the image to the clipboard when possible.
  • Automatically installs missing Python dependencies.

Requirements

  • Python 3.7 or newer
  • Python packages:
    • qrcode[pil]
    • pillow
    • pywin32 (Windows only, required for clipboard support via win32clipboard)

Installation

pip install qrcode[pil] pillow pyperclip

Note: the script may also try to install missing libraries automatically if they are not already present.

Usage

Run the script with Python:

py main.py

You can also pass the text or URL as command-line arguments:

py main.py https://example.com

If no argument is provided, the script will ask you to enter text manually.

How it works

  1. Checks for missing dependencies and installs them.
  2. Generates the QR code using qrcode and Pillow.
  3. Saves the image to the downloads folder.
  4. Attempts to copy the image to the system clipboard.

Notes

  • On Windows, clipboard copying can work with win32clipboard or PowerShell.
  • On Linux, xclip, xsel, or wl-copy must be installed to copy the image to the clipboard.
  • If the QR code cannot be copied to the clipboard, the PNG file will still be saved.

View the project

To save it locally, you can download the latest version from GitHub.

QR code generator © 2026 by Arnau TM. is licensed under Creative Commons Attribution 4.0 International

About

Simple QR code generator. Save as .png, open the file and copy the image.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages