#base64 #echo #added #gnu #exe #hello-world #decode-base64

app recho

A Rust 版本的 GNU ECHO,增加了 Base64 功能

4 个版本 (稳定版)

1.0.2 2023年1月7日
0.1.0 2023年1月2日

#18 in #decode-base64

MIT 许可证

7KB
59

Recho v1.0.0


摘要

一个具有 Base64 功能的 GNU UNIX 风格 "echo" 命令行工具。Recho 提供了传统 ECHO 的所有功能,但允许用户将字符串编码/解码为 Base64。


用法

Recho 有三个可以从命令行使用的选项

选项 描述
-h 显示运行时帮助
-tb 将传入的字符串 "to-base64" 转换
-fb 将传入的字符串 "from-base64" 转换

示例

以下为 Recho 的示例用法

# By default does include newlines.
> recho.exe "Hello World!"
Hello world!

# To remove newlines after the string, pass the -n switch
> recho.exe -n "Hello World!"
Hello world!
# To encode something in base64, pass the -tb switch, which also removes newline character
> recho.exe -tb "Hello World!"
SGVsbG8gd29ybGQh
# To decode something in base64, pass the -fb switch, which also removes the newline character.
> recho.exe -fb "SGVsbG8gd29ybGQh"
Hello World!
# To display the inline help screen, pass the -h switch.
> recho.exe -h 
recho: GNU ECHO re-written in Rust with added functionality
Usage and Examples:
Switches:
    -h : help, displays this
    -n : no new line character added at the end
    -tb : to-base64, encodes the string in base64, automatically passes the (n) switch as well.
    -fb : from-base64, decodes the string from base64, automatically passes the (n) switch as well.
Usage:
    NOTE: Strings containing spaces need to be wrapped in quotes.
    recho.exe <SWITCHES> <TEXT>
    recho.exe -n 'hello world'
    recho.exe 'hello world'
    recho.exe -tb 'hello world' (Will print out aGVsbG8gd29ybGQ=)

依赖项

~255KB