1 个不稳定版本
0.1.0 | 2021年11月26日 |
---|
#12 in #interpret
32KB
452 代码行
过多时间戳
简单的命令行工具,用于解释和转换 UNIX 时间戳
用法
当前时间
实际命令为 timestamps
。当不带参数运行时,它会打印当前时间的详细信息
时间戳解码
要解码时间戳,只需将其作为参数提供即可
$ timestamps 1637906683
您可以通过提供相应的选项来解码其他格式
-S, --seconds Interpret input as seconds (the default)
-M, --milliseconds Interpret input as milliseconds
-U, --microseconds Interpret input as microseconds
-N, --nanoseconds Interpret input as nanoseconds
雪花 ID 解码
此工具还支持使用这些选项解码 Discord 和 Twitter ID("雪花"格式)
-D, --discord Interpret input as a Discord ID
-T, --twitter Interpret input as a Twitter Snowflake
雪花中可用的非时间信息特定于生成该信息的平台。
构建和安装
要构建此工具,您不需要除了最新的 Rust 工具链之外的其他任何东西,只需在存储库中运行 cargo build
即可。
我没有测试的方法,但它似乎与 rust 支持的所有非嵌入式平台都完全兼容。
要安装,将二进制文件复制到系统中的任何位置,并可选地安装您的 shell 的补全。
版权
版权(C)2021 0x5c
本程序根据 魁北克自由和开源许可 - 强制互惠(LiLiQ-R+) 的条款发布,版本 1.1。
请参阅 LICENCE
以获取完整的许可文本(法语/英语)。
依赖项
~4.5MB
~77K SLoC