~ Quick In Quick Out ~
Magic Box parses user input into two parts: input
and options
.
For example, when Magic Box receives the following user input:
The input will be https://youtu.be/dQw4w9WgXcQ
and the option key is shorten
with the value document
.
https://youtu.be/dQw4w9WgXcQ
::shorten=document
Based on matching methods, we can roughly classify Boxes into two types:
- match by the
input
string - match by
options
Base64Box
match rule | description | output |
---|---|---|
valid string | base64 encode | ![]() |
can be decode to valid string | base64 decode | ![]() |
CronExpressionBox
match rule | description | output |
---|---|---|
valid cron expression | convert to human language | ![]() |
options | description | example |
---|---|---|
l , lang , locate |
select while human language | ::locale=tw |
tz , timezone , tzOffset |
shift to the base timezone | ::tz=8 |
GenerateQRCodeBox
match rule | description | output |
---|---|---|
contains option qr or qrcode |
generate QR Code | ![]() |
options | description | example |
---|---|---|
qr , qrcode |
-- | ::QRCode |
NowBox
match rule | description | output |
---|---|---|
input matches now |
show current time in 3 difference formats: RFC 3339 , RFC 3339 (UTC+8) , and Timestamp (s) |
![]() |
ShortenURLBox
match rule | description | output |
---|---|---|
contains option surl or shorten |
generate a shorten URL | ![]() |
options | description | example |
---|---|---|
surl , shorten |
desired short URL result, if not set, a random string will be used | ::surl=foo |
TimeFormat
match rule | description | output |
---|---|---|
valid RFC 3339 time string | timestamp in second and millisecond | ![]() |
TimestampBox
match rule | description | output |
---|---|---|
valid timestamp. to avoid match all of number string, it only receive 1600 AD to 2500 AD | the time of timestamp in RFC 3339 format |
![]() |
It is recommended to use Node.js version 20.x
yarn install
yarn start
Initial Deployment Preparation
npm install -g firebase-tools
firebase login
firebase init
firebase deploy
Magic Box is licensed under MIT and Apache 2.0 dual-licensed.
You may obtain a copy of the License at LICENSE-MIT and LICENSE-APACHE