Skip to content

poojithacsef/QR_CODE-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QR Code Generator 🔲

A simple and efficient command-line tool to generate QR codes from text or URLs using Python.

✨ Features

  • Generate QR codes from any text or URL
  • Customizable size and border settings
  • Auto-generated filenames or custom output names
  • Clean command-line interface
  • Cross-platform compatibility

🚀 Installation

  1. Clone the repository:

    git clone https://github.com/YOUR_USERNAME/qr-code-generator.git
    cd qr-code-generator
  2. (Recommended) Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # for macOS/Linux
    .\venv\Scripts\activate   # for Windows
  3. Install requirements:

    pip install -r requirements.txt

⌨️ Usage

You can run the tool from the command line with the python generate_qr.py command.

Basic Usage:

python generate_qr.py "https://www.google.com"

Advanced Usage:

# Custom output filename
python generate_qr.py "Hello World" --output hello.png

# Custom size and border
python generate_qr.py "Contact Info" --size 15 --border 2

# Full example with all options
python generate_qr.py "https://github.com" -o github_qr.png -s 12 -b 3

📋 Command Line Options

Option Short Description Default
--output -o Output filename Auto-generated
--size -s Size of each box in pixels 10
--border -b Border size in boxes 4
--help -h Show help message -

📁 Output

  • QR codes are saved as PNG images
  • Default filename format: [first_20_chars]_qr.png
  • Files are saved in the current directory

🔧 Requirements

  • Python 3.6+
  • qrcode library with PIL support
  • Pillow (PIL) for image processing

📝 Examples

Generate a QR code for a website:

python generate_qr.py "https://www.example.com"
# Output: https___www_example_com_qr.png

Create a QR code with custom settings:

python generate_qr.py "WiFi Password: MySecretPass" -o wifi_qr.png -s 8 -b 2
# Output: wifi_qr.png

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

📄 License

This project is open source and available under the MIT License.

🐛 Issues

If you encounter any issues or have suggestions, please open an issue on GitHub.

About

A simple and efficient command-line tool to generate QR codes from text or URLs using Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages