π± QR Code Generator π³ Welcome to the QR Code Generator, a handy Python tool to create QR codes from text or URLs! π This command-line application uses the qrcode library to generate customizable QR code images, perfect for sharing links or data quickly. π
π Features
π Generate QR codes from any text or URL input. πΌοΈ Save QR codes as PNG images with a unique filename. βοΈ Customizable QR code size and error correction. β Error handling for robust operation. π Option to create multiple QR codes in one session.
π οΈ Requirements
Python 3.x π qrcode library (pip install qrcode)
π¦ Installation
Clone this repository:git clone https://github.com/parsa-developer/qr-code-generator.git
Navigate to the project directory:cd qr-code-generator
Install the required library:pip install qrcode
π― Usage
Run the script:python qr_code_generator.py
Enter the text or URL you want to encode into a QR code. π² The QR code is generated and saved as a PNG file in the current directory. Choose to create another QR code or exit.
πΈ Example Welcome to the QR Code Generator! π± This tool creates QR codes from text or URLs and saves them as images.
Enter text or URL to encode (or 'exit' to quit): https://example.com β QR code generated and saved as 'qr_code_https://example_com.png'!
Generate another QR code? (yes/no): yes
Enter text or URL to encode (or 'exit' to quit): Hello World β QR code generated and saved as 'qr_code_Hello_World.png'!
Generate another QR code? (yes/no): no Goodbye! π
π§ Notes
Filename: QR codes are saved with a prefix qr_code_ followed by a truncated version of the input (up to 10 characters, spaces replaced with underscores) and .png. Customization: Adjust box_size and border in generate_qr_code for larger or smaller QR codes. Change error_correction for higher resilience (e.g., ERROR_CORRECT_H). Dependencies: Requires the qrcode library. Install it with pip install qrcode.
π Future Improvements
π¨ Add a GUI with tkinter or PyQt for a visual interface. π Allow users to specify a custom save location. π¨ Support color customization for QR codes. π Display a preview of the QR code in the terminal (via ASCII art). π₯ Add an option to scan and decode QR codes.
π€ Contributing Want to enhance this QR code generator? π Fork the repo, submit pull requests, or open issues for bugs or feature ideas. Letβs make QR codes even cooler! πͺ
π License This project is licensed under the MIT License. See the LICENSE file for details.
Generate QR codes today! π± Give this repo a β if it helps you share data easily!