qrgen

Generate a QR code in ther terminal from stdin

MIT License

Stars
8
Committers
1

qrgen

qrgen lets you generate a QR code in the terminal, from stdin.

Why?

I use a file-sharing service (share.schollz.com) I wrote called share. It lets you share files directly from the command-line. I wanted a way to generate a QR in the terminal so that I can just take a picture with my phone to go to the resulting link.

Now I can share directly from my terminal to my phone easily.

Usage

First install with

> go get github.com/schollz/qrgen

Then, I have an alias in my ~/.zshrc for sharing files to https://share.schollz.com:

alias share='f() { curl --progress-bar --upload-file "$1" https://share.schollz.com | qrgen };f'

Website

The html code in this repo is for a super simple QR code reader webpage. You can host it yourself or use the one I'm hosting at https://schollz.com/qr/.

Acknowledgements

Code here was forked from github.com/mdp/qrterminal, and adopted for stdin (under MIT, Copyright 2019 Mark Percival [email protected]).

License

MIT