2 个不稳定版本
0.2.0 | 2024年6月28日 |
---|---|
0.1.0 | 2024年6月28日 |
#2216 in 解析实现
每月49次下载
19KB
420 行
ligotab
几种格式的表格
ligotab 是一个库和命令行工具,用于将分隔值(CSV等)格式化为轻量级标记表格的几种格式。目前,支持基本的 Markdown、Confluence Wiki Markup、Org 和 reStructuredText 表格(仅网格语法适用于 rst)。命令行工具 lt
可以从标准输入或单个文件中读取。
ligotab 是一个正在进行的实验性工作。
命令行使用
Format delimited data with lightweight markup
Usage: lt [OPTIONS] [PATH]
Arguments:
[PATH] Path to delimiter-separated value file [default: -]
Options:
-d, --delimiter <DELIMITER> Set the delimiter character. Expand escape characters in the shell, e.g., `$'\t'` [default: ,]
-t, --terminator <TERMINATOR> (Optional) Set the record terminator character
-c, --comment-char <COMMENT_CHAR> (Optional) Set the file commenting character
-q, --quoting Disable quoting when reading file
-u, --quote-char <QUOTE_CHAR> Set the quoting character [default: "]
-b, --double-quote Disable interpreting double quote as escape
-o, --output-format <OUTPUT_FORMAT> Set the output format for the table [default: markdown]
-h, --help Print help
-V, --version Print version
依赖项
~2.3–3MB
~50K SLoC