Giter VIP home page Giter VIP logo

ascii-qr-code-generator's Introduction

ASCII QR code generator

Application demo

Description

A QR code generator that generates QR codes in ASCII format using qrcode-terminal.

Features

  • 🎀 Live preview
  • πŸ–₯ API
  • πŸ’Ύ Sample data
  • βœ‚οΈ Fast copy & paste

API

For everyone

πŸ’¬ Get QR code

curl {SCHEME}://{HOST}:{PORT}/api/get-qr?data={DATA}

For example, data=https://github.com/christofferEkblom/ascii-qr-code-generator will give this response:

β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„
β–ˆ β–„β–„β–„β–„β–„ β–ˆβ–€β–€ β–ˆβ–ˆβ–€β–ˆ β–ˆβ–€β–ˆβ–„β–€β–ˆβ–„ β–ˆβ–ˆ β–„β–„β–„β–„β–„ β–ˆ
β–ˆ β–ˆ   β–ˆ β–ˆβ–„β–€β–ˆβ–ˆβ–€β–€β–ˆβ–„β–ˆβ–„β–€β–ˆβ–„β–ˆ β–€β–ˆβ–ˆ β–ˆ   β–ˆ β–ˆ
β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ β–„ β–ˆ β–ˆβ–„ β–„β–€β–ˆβ–€β–„β–€β–€β–„β–€β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ
β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆ β–ˆ β–€β–„β–€β–„β–€β–„β–€β–„β–ˆβ–„β–€β–„β–ˆ β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆ
β–ˆβ–„ β–ˆ β–ˆβ–€β–„ β–€β–€β–ˆ  β–€β–„β–ˆβ–€β–ˆβ–„β–„β–€ β–€β–ˆ β–€ β–„β–„β–€β–„β–„β–€β–ˆ
β–ˆ β–€β–ˆ β–€β–„β–„β–„ β–€β–€   β–„β–€β–„β–ˆβ–€ β–€ β–ˆβ–ˆ β–„β–„β–ˆ β–„β–ˆβ–€ β–ˆ
β–ˆβ–€ β–„ β–„β–€β–„β–ˆβ–€β–€β–„ β–ˆβ–€ β–ˆβ–„ β–ˆ  β–€β–€β–ˆβ–€β–„ β–€β–€ β–€β–€ β–ˆ
β–ˆβ–ˆβ–ˆβ–€β–„  β–„β–ˆ β–ˆβ–ˆ β–ˆβ–„β–„β–ˆβ–„β–€ β–ˆβ–„β–€β–€β–„β–ˆβ–„ β–€β–ˆ β–ˆ β–ˆβ–ˆ
β–ˆβ–€β–„β–ˆβ–€β–ˆβ–€β–„ β–€β–„β–ˆβ–ˆ  β–€β–ˆ  β–ˆβ–„β–„β–„β–„β–€β–€β–€β–„β–ˆβ–„β–€β–€β–ˆβ–„β–ˆ
β–ˆβ–ˆβ–„β–€ β–€ β–„β–ˆβ–„β–„β–€β–„ β–ˆ β–€β–ˆ β–€β–€β–ˆ β–„β–€β–ˆ β–ˆβ–„  β–ˆβ–„β–„β–ˆ
β–ˆβ–ˆβ–ˆβ–€  β–€β–„β–„β–€ β–ˆβ–€β–ˆβ–ˆβ–€β–ˆ β–€β–ˆβ–ˆ  β–ˆβ–ˆ β–€β–€β–„β–ˆβ–„β–€β–„β–€β–ˆ
β–ˆβ–„ β–€   β–„  β–€β–ˆβ–ˆβ–ˆβ–ˆβ–€β–ˆβ–€β–ˆβ–ˆ β–€ β–ˆβ–€β–„β–ˆβ–ˆβ–€β–€ β–ˆβ–€ β–ˆ
β–ˆβ–„β–ˆβ–ˆβ–„β–„β–„β–„β–ˆβ–€β–ˆ β–€ β–ˆβ–ˆβ–„β–„ β–ˆβ–€ β–„β–€β–ˆ β–„β–„β–„ β–ˆβ–ˆβ–ˆβ–€β–ˆ
β–ˆ β–„β–„β–„β–„β–„ β–ˆβ–„β–€β–ˆβ–ˆ β–€β–€β–€β–€ β–€β–ˆ β–€β–ˆβ–ˆ β–ˆβ–„β–ˆ β–ˆβ–ˆ β–ˆβ–ˆ
β–ˆ β–ˆ   β–ˆ β–ˆβ–€β–„ β–„β–ˆβ–„β–„β–ˆβ–€ β–„β–ˆ β–„β–„β–ˆβ–„β–„   β–ˆβ–€β–ˆβ–ˆβ–ˆ
β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆβ–€β–€β–„β–€β–ˆ β–ˆβ–ˆβ–ˆβ–€β–€β–ˆβ–€ β–ˆβ–€β–€β–ˆβ–ˆ  β–„β–„β–ˆβ–„β–ˆ
β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆβ–„β–„β–„β–„β–„β–ˆβ–„β–ˆβ–„β–ˆβ–ˆβ–„β–ˆβ–„β–ˆβ–ˆβ–„β–„β–„β–„β–„β–ˆβ–ˆβ–„β–ˆβ–ˆ

🎲 Get random sample data post

curl {SCHEME}://{HOST}:{PORT}/api/get-random-sample-data

πŸ‘ Get sample data list

curl {SCHEME}://{HOST}:{PORT}/api/get-sample-data-list

For administrator

πŸ” Obtain an access token

curl {SCHEME}://{HOST}:{PORT}/oauth/token \
  -d "grant_type=client_credentials" \
  -H "Authorization: Basic base64({CLIENT ID}:{CLIENT SECRET})" \
  -H "Content-Type: application/x-www-form-urlencoded"

For example, to use user:secretcode, you can type the following (if you have OpenSSL installed):

echo -n 'user:secretcode' | openssl base64

The output should be dXNlcjpzZWNyZXRjb2Rl. Therefore, you should send:

Authorization: Basic dXNlcjpzZWNyZXRjb2Rl

πŸ“¬ Create new sample data post

curl --data "data={POST DATA}" {SCHEME}://{HOST}:{PORT}/api \
  -H "Authorization: Bearer {ACCESS TOKEN}"

πŸ—‘ Delete sample data post

curl -X "DELETE" {SCHEME}://{HOST}:{PORT}/api/{POST ID} \
  -H "Authorization: Bearer {ACCESS TOKEN}"

Installation guide

  1. Clone this repository
git clone https://github.com/christofferEkblom/ascii-qr-code-generator.git
  1. Go to the directory
cd ascii-qr-code-generator
  1. Create .env file for the environment variables
nano .env
  1. Set the following variables:
PORT = {APPLICATION PORT NUMBER}
MONGODB_CONNECTION_STRING = {MONGO DB CONNECTION STRING}
OAUTH2_CLIENT_ID = {CLIENT ID}
OAUTH2_CLIENT_SECRET = {CLIENT SECRET}
  1. Install the npm packages
npm install
  1. 🏁 Finish! To run the application, type:
npm start

Tech

  • Node.js
  • oauth2
  • SASS
  • MongoDB

Developer

πŸ‡ΈπŸ‡ͺChristoffer Ekblom

License

πŸ“š See license

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.