Code Monkey home page Code Monkey logo

qr-code-generator's Introduction

QR Code Generator

DEMO This project is a simple QR Code generator built with Node.js. It uses the inquirer package for command line user inputs and the qr-image package for generating QR codes.

Features

  • Prompt the user to enter a URL.
  • Generate a QR code based on the input URL.
  • Save the generated QR code as a PNG image.
  • Save the input URL to a text file.

Installation

Before running the application, make sure you have Node.js installed on your system.

  1. Clone the repository or download the source code.
  2. Navigate to the project directory in your terminal.
  3. Run the following command to install the required dependencies:
npm install inquirer qr-image fs

...

Usage

  1. Running the Script: Navigate to the project directory in your terminal and execute the following command:
    node index.js
  2. Entering URL: Follow the on-screen prompt and enter the URL for which you want to generate the QR code.
  3. Output: After entering the URL, the script will generate a QR code and save it as qr_image.png in the project directory. Additionally, the entered URL will be saved in a text file named url.txt.

Note: Make sure you have the necessary Node.js packages installed by running npm install before executing the script.

...

Follow the on-screen prompt and enter the URL for which you want to generate the QR code. The QR code will be saved as qr_image.png in the project directory, and the URL will be saved in a text file named url.txt.

Error Handling

If an error occurs during the execution, the error will be logged to the console. If the prompt couldn't be rendered, it might be due to the current environment not supporting TTY.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page for any outstanding issues or to open a new one.

License

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

Acknowledgements

qr-code-generator's People

Contributors

domenicocentrone avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.