Skip to content

christofferEkblom/ascii-qr-code-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published