Skip to content

v0.1.0

Choose a tag to compare

@Edgar-311 Edgar-311 released this 26 Oct 04:38
· 18 commits to main since this release
b54602f

ofdkit 的第一个版本:用 Python 读取 OFD 文件(GB/T 33190),提取文字和电子发票字段,并接入 AI 工具。
The first release: read OFD documents (GB/T 33190) in Python, extract text and e-invoice fields, and use them from AI tools.

pip install ofdkit                 # 核心,无依赖 / core, no dependencies
pip install "ofdkit[mcp]"          # MCP 服务器 / MCP server
pip install "ofdkit[markitdown]"   # MarkItDown 插件 / MarkItDown plugin

Added

  • Read OFD documents with only the Python standard library: pages, templates, page blocks and composite graphic units, tolerant of common producer bugs (absolute or wrongly cased paths, GBK names and encodings, broken XML prefixes).
  • Text extraction in reading order, as plain text or Markdown.
  • Invoice fields from e-invoices (数电票 and 增值税电子发票), from XML attachments, custom tags and OFD.xml metadata, with amounts and dates normalised and a warning when totals do not add up.
  • Command line: ofdkit info, text, invoice, batch (CSV for Excel, duplicate invoice numbers flagged) and mcp.
  • MCP server for AI tools, read-only, with an optional folder restriction.
  • MarkItDown plugin.
  • The ofd-reader Agent Skill.

Tested on every commit against the shared ofd-samples files. Most of the code was written with AI assistance (Claude); see the README.