Skip to content

CLI tool for decoding/encoding from common formats

License

Notifications You must be signed in to change notification settings

earthboundkid/decoder-ring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

decoder-ring GoDoc Go Report Card

Decoder-ring is a CLI tool for decoding/encoding from common formats.

Installation

First install Go.

If you just want to install the binary to your current directory and don't care about the source code, run

GOBIN="$(pwd)" go install github.com/carlmjohnson/decoder-ring@latest

Screenshots

$ decoder-ring -h
Usage of decoder-ring v0.21.1:

    decoder-ring [-encode] <MODE>

MODE choices are base32, base32-crockford, base32-hex, base64, base64-url,
codepoint*, go, hex, hex-extended*, html, json, qp, rot13, url-path, url-query,
or an IANA encoding name. Modes marked with * are encode only.

As a convenience feature, when this executable is symlinked as 'encoder-ring', -e defaults to true.

  -e    shortcut for -encode
  -emit
        emit trailing newline (UTF-8) (default true)
  -encode
        encode rather than decode
  -s    shortcut for -strip (default true)
  -strip
        strip trailing newlines from input (default true)
  -t    shortcut for -emit (default true)


$ echo 'Hello, World!' | decoder-ring -e base64
SGVsbG8sIFdvcmxkIQ==

$ echo SGVsbG8sIFdvcmxkIQ== | decoder-ring base64
Hello, World!

$ echo 'Hello, World!' | decoder-ring rot13
Uryyb, Jbeyq!

$ echo 'Hello, World!' | decoder-ring -e ebcdic-cp-us | decoder-ring -e hex-extended
00000000  c8 85 93 93 96 6b 40 e6  96 99 93 84 5a           |.....k@.....Z|

$ echo 'Hello, こんにちはワールド!' | decoder-ring -e codepoint
U+0048  H       LATIN CAPITAL LETTER H
U+0065  e       LATIN SMALL LETTER E
U+006C  l       LATIN SMALL LETTER L
U+006C  l       LATIN SMALL LETTER L
U+006F  o       LATIN SMALL LETTER O
U+002C  ,       COMMA
U+0020          SPACE
U+3053  こ      HIRAGANA LETTER KO
U+3093  ん      HIRAGANA LETTER N
U+306B  に      HIRAGANA LETTER NI
U+3061  ち      HIRAGANA LETTER TI
U+306F  は      HIRAGANA LETTER HA
U+30EF  ワ      KATAKANA LETTER WA
U+30FC  ー      KATAKANA-HIRAGANA PROLONGED SOUND MARK
U+30EB  ル      KATAKANA LETTER RU
U+30C9  ド      KATAKANA LETTER DO
U+0021  !       EXCLAMATION MARK

Endorsements

Useful

barryzxb

About

CLI tool for decoding/encoding from common formats

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Languages