ZenTable Skill
Render structured table data into high-quality PNG images.
TL;DR
ZenTable turns messy table-like content into readable, decision-ready table outputs for both mobile (Discord-first) and desktop.
Accepted inputs
- - text-based content (raw text tables, long agent responses)
- structured JSON
- screenshots / real-world photos (via OCR-assisted extraction when needed)
Core capabilities
- - CSS + PIL rendering
- sorting / filtering / pagination
- threshold-based highlighting
- optional PNG + TXT dual output (
--both)
Runtime & security note
This skill runs local scripts and depends on local runtime binaries (python3, google-chrome).
Review code and dependencies before running in sensitive environments.
Naming convention
- - Canonical code name:
zentable (lowercase) - UI / brand label: INLINECODE4
- INLINECODE5 /
zenble* are legacy compatibility aliases - Reference:
NAMING_MIGRATION.md (repository document)
When to use
✅ Use this skill when:
- - You need a visual table image instead of plain text
- You need polished output for chat/report/social sharing
- The dataset is large enough that plain text is hard to read
- You need a specific visual theme (iOS-like, dark, compact, etc.)
❌ Do not use this skill when:
- - The table is tiny and plain text is enough
- The user explicitly asks for no image output
- The user needs an editable spreadsheet format (CSV/Excel)
Capability matrix (SkillHub release)
| Capability | Status | Notes |
|---|
| CSS output | ✅ Stable | Primary release path; default INLINECODE8 |
| PIL output |
✅ Stable | Safe fallback when Chrome is unavailable |
| ASCII output | ⚠️ Beta / Experimental | Works, but alignment can drift cross-platform due to font and whitespace behavior |
Known limitations
- - ASCII output is sensitive to platform font fallback and whitespace handling.
- Create separate calibration profiles per platform; do not share blindly.
- INLINECODE9 already includes text-theme fallback to
default when no text theme exists. - Discord plain text collapses repeated normal spaces; Unicode spacing characters may be required for spacing preservation.
- This beta was validated primarily on Discord; other chat platforms may require agent-side output adaptation (image/message formatting differences).
Zx shorthand policy (project rule)
When user input is Zx, treat it as a strong render intent:
- 1. Execute rendering directly by default (no preliminary Q&A).
- Default path: CSS +
minimal_ios_mobile + width=450. - Ask follow-up only under high uncertainty:
- no usable source data in current/previous context,
- intent does not look like table rendering,
- critical fields are missing and output would likely be wrong.
- 4. If platform supports images, return the image directly (not link-only).
Data source priority for Zx:
1) current message image OCR
2) current message text-to-table
3) previous message image OCR
4) previous message text-to-table
Syntax sugar → canonical mapping
| Sugar | Canonical key | Normalization | Final renderer args |
|---|
| INLINECODE15 / INLINECODE16 | INLINECODE17 | positive int | INLINECODE18 |
| INLINECODE19 / INLINECODE20 |
transpose | boolean |
--transpose |
|
--tt |
keep_theme_alpha | boolean |
--tt |
|
--per-page N /
--pp N |
per_page | positive int |
--per-page N |
|
--page ... /
--p ... |
page_spec |
N /
A-B /
A- /
all | expanded by
table_renderer.py |
|
--all |
page_spec | equivalent to
all | expanded by
table_renderer.py |
|
--text-scale V /
--ts V |
text_scale | enum/ratio |
--text-scale V |
|
--sort SPEC |
sort_spec | single/multi-key |
--sort SPEC |
|
--asc /
--desc |
sort_default_dir | default direction |
--asc /
--desc |
|
--f SPEC /
--filter SPEC |
filters | repeatable filter |
--f SPEC |
|
--smart-wrap |
smart_wrap | true |
--smart-wrap |
|
--no-smart-wrap /
--nosw |
smart_wrap | false |
--no-smart-wrap |
|
--theme NAME /
-t NAME |
theme | theme id |
--theme NAME |
|
--both /
--bo |
output_both | boolean |
--both |
|
--pin KEYS |
pin_keys | persist defaults |
--pin |
|
--pin-reset |
pin_reset | reset pinned defaults |
--pin-reset |
Pinned default baseline:
- - INLINECODE79
- INLINECODE80
- INLINECODE81
- INLINECODE82
page_spec rules
- -
N: page N only - INLINECODE85 : inclusive range A..B
- INLINECODE86 : from A to last page
- INLINECODE87 : all pages
- if omitted: default preview pages INLINECODE88
Canonical payload example
CODEBLOCK0
Command examples
CODEBLOCK1
Validation checklist (minimum)
- - INLINECODE89
- CSS smoke output succeeds
- PIL smoke output succeeds
- INLINECODE90 ,
--pin-reset, --both verified - Golden tests pass when relevant
Release positioning
Current channel: beta.
ASCII remains beta/experimental for SkillHub release.
Support / Contact
- - GitHub Issues: https://github.com/con2000us/zenTable/issues
- Maintainer: @con2000us (Discord)
- Bug report checklist:
- input type (text / screenshot / photo / json)
- expected vs actual output
- platform (Discord/mobile/desktop)
- command/options used
ZenTable 技能
将结构化表格数据渲染为高质量PNG图像。
概要
ZenTable将杂乱的表格类内容转化为可读性强、便于决策的表格输出,适用于移动端(优先适配Discord)和桌面端。
可接受的输入
- - 文本内容(原始文本表格、长篇幅智能体响应)
- 结构化JSON
- 截图/实拍照片(必要时通过OCR辅助提取)
核心能力
- - CSS + PIL渲染
- 排序/筛选/分页
- 基于阈值的突出显示
- 可选的PNG + TXT双输出(--both)
运行时与安全说明
本技能运行本地脚本,依赖本地运行时二进制文件(python3、google-chrome)。
在敏感环境中运行前,请审查代码及依赖项。
命名规范
- - 规范代码名称:zentable(小写)
- UI/品牌标签:ZenTable
- zeble / zenble 为旧版兼容别名
- 参考文档:NAMING_MIGRATION.md(仓库文档)
使用时机
✅ 以下情况应使用本技能:
- - 需要可视化表格图像而非纯文本
- 需要为聊天/报告/社交分享生成精美输出
- 数据集较大,纯文本难以阅读
- 需要特定视觉主题(iOS风格、深色、紧凑等)
❌ 以下情况不应使用本技能:
- - 表格很小,纯文本已足够
- 用户明确要求不输出图像
- 用户需要可编辑的电子表格格式(CSV/Excel)
能力矩阵(SkillHub版本)
| 能力 | 状态 | 备注 |
|---|
| CSS输出 | ✅ 稳定 | 主要发布路径;默认minimaliosmobile + width=450 |
| PIL输出 |
✅ 稳定 | Chrome不可用时的安全回退方案 |
| ASCII输出 | ⚠️ 测试版/实验性 | 可用,但因字体和空白符行为,跨平台时对齐可能偏移 |
已知限制
- - ASCII输出对平台字体回退和空白符处理敏感。
- 需为每个平台创建独立的校准配置文件,不可盲目共享。
- --both 在无文本主题时已包含回退至default文本主题。
- Discord纯文本会折叠重复的普通空格;可能需要使用Unicode间距字符来保持间距。
- 本测试版主要在Discord上验证;其他聊天平台可能需要智能体端进行输出适配(图像/消息格式差异)。
Zx速记策略(项目规则)
当用户输入为Zx时,视为强渲染意图:
- 1. 默认直接执行渲染(无需初步问答)。
- 默认路径:CSS + minimaliosmobile + width=450。
- 仅在高度不确定时追问:
- 当前/上下文中无可用源数据,
- 意图看起来不像是表格渲染,
- 关键字段缺失且输出很可能错误。
- 4. 若平台支持图像,直接返回图像(而非仅链接)。
Zx的数据源优先级:
1) 当前消息图像OCR
2) 当前消息文本转表格
3) 上一条消息图像OCR
4) 上一条消息文本转表格
语法糖 → 规范映射
| 语法糖 | 规范键 | 规范化 | 最终渲染参数 |
|---|
| --width N / --w N | width | 正整数 | --width N |
| --transpose / --cc |
transpose | 布尔值 | --transpose |
| --tt | keep
themealpha | 布尔值 | --tt |
| --per-page N / --pp N | per_page | 正整数 | --per-page N |
| --page ... / --p ... | page
spec | N / A-B / A- / all | 由tablerenderer.py展开 |
| --all | page
spec | 等同于all | 由tablerenderer.py展开 |
| --text-scale V / --ts V | text_scale | 枚举/比例 | --text-scale V |
| --sort SPEC | sort_spec | 单键/多键 | --sort SPEC |
| --asc / --desc | sort
defaultdir | 默认方向 | --asc / --desc |
| --f SPEC / --filter SPEC | filters | 可重复筛选 | --f SPEC |
| --smart-wrap | smart_wrap | true | --smart-wrap |
| --no-smart-wrap / --nosw | smart_wrap | false | --no-smart-wrap |
| --theme NAME / -t NAME | theme | 主题ID | --theme NAME |
| --both / --bo | output_both | 布尔值 | --both |
| --pin KEYS | pin_keys | 持久化默认值 | --pin |
| --pin-reset | pin_reset | 重置持久化默认值 | --pin-reset |
持久化默认基线:
- - theme=minimaliosmobile
- width=450
- smartwrap=true
- perpage=15
page_spec规则
- - N:仅第N页
- A-B:包含A到B的范围
- A-:从A到最后一页
- all:所有页
- 若省略:默认预览页1-3
规范负载示例
json
{
theme: minimaliosmobile,
width: 900,
transpose: false,
keepthemealpha: false,
per_page: 15,
page_spec: 2-,
sort_spec: score:desc,name:asc,
sortdefaultdir: asc,
filters: [col:!note,attachment, row:status!=disabled;score>=60],
text_scale: auto,
smart_wrap: true,
output_both: false
}
命令示例
bash
从仓库根目录运行
基础CSS输出
python3 skills/zentable/table
renderer.py - /tmp/out.png --theme minimalios_mobile --width 900 --text-scale large --page 1
转置 + 禁用智能换行
python3 skills/zentable/table
renderer.py - /tmp/out.png --theme compactclean --transpose --no-smart-wrap --page 1
页码范围展开(2-4)
python3 skills/zentable/table_renderer.py - /tmp/out.p2.png --per-page 12 --page 2
python3 skills/zentable/table_renderer.py - /tmp/out.p3.png --per-page 12 --page 3
python3 skills/zentable/table_renderer.py - /tmp/out.p4.png --per-page 12 --page 4
PNG + ASCII侧边输出
python3 skills/zentable/table
renderer.py - /tmp/out.png --theme mobilechat --both
验证清单(最低要求)
- - python3 -m pycompile scripts/zentablerender.py
- CSS冒烟测试输出成功
- PIL冒烟测试输出成功
- --pin、--pin-reset、--both已验证
- 相关黄金测试通过
发布定位
当前渠道:测试版。
ASCII在SkillHub版本中仍为测试版/实验性。
支持/联系
- - GitHub Issues:https://github.com/con2000us/zenTable/issues
- 维护者:@con2000us(Discord)
- 错误报告清单:
- 输入类型(文本/截图/照片/JSON)
- 预期输出与实际输出
- 平台(Discord/移动端/桌面端)
- 使用的命令/选项