-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathREADME.txt
149 lines (103 loc) · 4.55 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
QRcode.show
Generate QR code easily for free - QR Code Generation as a Service
INPUT:
$ curl qrcode.show/INPUT
$ curl qrcode.show -d INPUT
$ curl qrcode.show -d @/PATH/TO/INPUT
$ echo INPUT | curl qrcode.show -d @-
INPUT EXAMPLES:
$ curl qrcode.show/https://example.com
$ curl qrcode.show -d https://example.com
$ curl qrcode.show -d @/path/to/input.txt
$ echo https://example.com | curl qrcode.show -d @-
PARAMETERS:
Accept Specify the output type
Options:
application/octet-stream
text/plain
text/html
image/svg+xml
image/png
image/jpeg
Default: application/octet-stream
X-QR-Width Specify the default width
X-QR-Height Specify the default height
X-QR-Min-Width Specify the minimum width
X-QR-Min-Height Specify the minimum height
X-QR-Max-Width Specify the maximum width
X-QR-Max-Height Specify the maximum height
X-QR-Dark-Color Specify the dark color (hex)
Format: rrggbb
X-QR-Light-Color Specify the light color (hex)
Format: rrggbb
X-QR-Version-Type Specify the QR version type
Options:
normal
micro
Default: auto detect
X-QR-Version-Number Specify the QR version number
Options:
1..40 for normal
1..4 for micro
Default: auto detect
X-QR-EC-Level Specify the error checking level
Options:
L
M
Q
H
Default: L
X-QR-Quiet-Zone Specify whether the quiet zone is added
Options:
true
false
Default: true
PARAMETER EXAMPLES:
$ curl qrcode.show/INPUT -H "Accept: image/svg+xml"
SHELL FUNCTIONS:
Shell functions that can be added to `.bashrc` or `.bash_profle` for
quickly generating QR codes from the command line. The command takes the
argument as input or reads from stdin if none was supplied and outputs the
QR code to stdout: `qrcode INPUT` or `echo INPUT | qrcode`
qrcode () {
local input="$*"
[ -z "$input" ] && local input="@/dev/stdin"
curl -d "$input" https://qrcode.show
}
qrsvg () {
local input="$*"
[ -z "$input" ] && local input="@/dev/stdin"
curl -d "${input}" https://qrcode.show -H "Accept: image/svg+xml"
}
qrserve () {
local port=${1:-8080}
local dir=${2:-.}
local ip="$(ifconfig | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | fzf --prompt IP:)" \
&& echo http://$ip:$port | qrcode \
&& python -m http.server $port -b $ip -d $dir
}
FEATURES:
* No data collection or retention
* Fast and simple API that works on both web and terminal
* Supports GET and POST requests
* Supports `Accept` header to control the output format
TODO:
* Support more parameters
* Get a logo
* Support dynamic QR codes
* Generate premium/branded QR codes
SPONSORS:
1. Nolan Rumble - https://nolanrumble.com - $5
Top 5 sponsors get mentioned here (updated monthly)
Visit https://opencollective.com/qrcodeshow
CREDITS:
Main Library https://github.com/kennytm/qrcode-rust
Cloudflare Worker https://github.com/cloudflare/workers-rs
Alternate Web Server https://github.com/tokio-rs/axum
*Only the direct dependencies for the main business logic are listed here
Please contact the project maintainer if you are missing from the list
RELATED LINKS:
Project Repository https://github.com/sayanarijit/qrcode.show
Project Maintainer https://arijitbasu.in
COPYRIGHT:
© Arijit Basu 2021