Skip to content

Quick and easy script to paste a large ammount of QR codes to a single background, i.e for tickets creation.

Notifications You must be signed in to change notification settings

Kaz-ookid/simple-qr-paste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Ticket Generation Script

This script is designed to generate festival tickets with a given background and unique QR codes for each ticket. It uses the Pillow library for image processing.

Requirements

  • Python 3.x
  • Pillow library (Install using pip install Pillow)

Usage

  1. Prepare the folder structure:
  • Create an output folder where the generated tickets will be saved.
  • Create an input folder containing:
  • A background file (e.g., ticket.png)
  • All the QR codes to print (PNG or JPG files, names do not matter)
  1. Edit the script:
  • Set the blank_ticket_file_name to the name of your background file.
  • Set input_folder_abs_path to the absolute path of your input folder.
  • Set output_folder_abs_path to the absolute path of your output folder.
  1. Adjust QR code size and position:
  • The size of the QR code is defined by sq_fit_size (default is 300 pixels).
  • Adjust paste_x and paste_y to find the right coordinates for pasting the QR code on the ticket background. These coordinates are calculated in pixels.
  1. Run the script:
  • Execute the script using python QRPaster.py.
  • The generated tickets will be saved in the output folder with filenames qr_0.png, qr_1.png, etc.

Example

If you have the following files in your input folder:

  • ticket.png (background file)
  • qr1.png (QR code file)
  • qr2.png (QR code file)

After running the script, you will get:

  • qr_0.png in the output folder (ticket with qr1.png)
  • qr_1.png in the output folder (ticket with qr2.png)

Credits

Script by Maxime Teuber (@Kaz), 2022.

About

Quick and easy script to paste a large ammount of QR codes to a single background, i.e for tickets creation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages