← 返回
开发者工具 中文

flashformat

Provide five repository-local format conversion scripts (yaml-to-json, json-to-yaml, markdown-to-text, json-minify, yaml-auto-fix) for offline CLI and pipeli...
提供五个本地仓库格式转换脚本(yaml转json、json转yaml、markdown转文本、json压缩、yaml自动修复),适用于离线CLI和管道。
phantom5125
开发者工具 clawhub v1.0.0 1 版本 99852.9 Key: 无需
★ 0
Stars
📥 679
下载
💾 12
安装
1
版本
#latest

概述

FlashFormat Local Converters

Overview

Run local format conversion directly from Python scripts under skills/flashformat-local-converters/scripts/.

Avoid calling /api/v2/*; execute conversion in local shell, CI, or offline pipelines.

Quick Start

  1. Install runtime dependency:

python -m pip install PyYAML

  1. Run any converter script with one input channel:

--input or --input-file or stdin

  1. Choose output mode:

plain text (default) or --json

  1. Optionally write result to file:

--output-file

Script Map

  • scripts/yaml_to_json.py: Convert YAML to JSON, support --indent and --compact
  • scripts/json_to_yaml.py: Convert JSON to YAML, support --sort-keys and --compact
  • scripts/markdown_to_text.py: Strip Markdown syntax into readable text
  • scripts/json_minify.py: Minify JSON to one-line payload
  • scripts/yaml_auto_fix.py: Apply conservative YAML whitespace/indent fixes with validation

Unified CLI Contract

  • Input priority: --input > --input-file > stdin
  • Output target: stdout by default, or --output-file
  • JSON mode payloads:

{"ok": true, "tool": "...", "output": "..."}

{"ok": false, "tool": "...", "error": "..."}

  • Plain mode failures write error text to stderr and return non-zero exit code

Usage Examples

  • YAML to JSON:

python skills/flashformat-local-converters/scripts/yaml_to_json.py --input-file in.yaml --output-file out.json

  • JSON to YAML (sorted keys):

python skills/flashformat-local-converters/scripts/json_to_yaml.py --input '{"b":2,"a":1}' --sort-keys

  • Markdown to text (stdin pipeline):

cat draft.md | python skills/flashformat-local-converters/scripts/markdown_to_text.py

  • JSON minify with structured output:

python skills/flashformat-local-converters/scripts/json_minify.py --input-file data.json --json

  • YAML auto-fix:

python skills/flashformat-local-converters/scripts/yaml_auto_fix.py --input-file broken.yaml --indent-step 2 --fix-tabs --fix-odd-indent

References

Read references/io-contracts.md when exact options, error messages, and backend logic mapping are needed.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 09:57 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,528
developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 427 📥 118,384
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,926