Torchio 是一个原型静态站点引擎,将 TEI P5 XML 文本转换为可访问的多页数字学术版本(含校勘、索引、地图和数据导出),无需服务器或数据库,可从 git 仓库发布。

Stars

3

7 天增长

暂无数据

Fork 数

1

开放 Issue

0

开源协议

MIT

最近更新

2026-07-31

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它采用以 TEI 为本的原则:渲染行为由 TEI 模型类驱动,版本的 ODD 定制作为配置,并针对整个 P5 元素集进行覆盖测试,在每次 TEI 发布时自动检查。

适合谁使用

  • 处理 TEI P5 文本的学术编辑和数字人文研究者
  • 出版校勘版或数字学术版本的图书馆、档案馆与研究项目
  • 负责静态数字版本站点维护与开发的开发者

典型使用场景

  • 将 TEI XML 校勘文本发布为静态多页学术站点
  • 从版本模型生成索引、地图以及 XML/CSV/JSON 数据导出
  • 通过 TEI ODD 声明定制渲染行为
  • 在基于 git 的 CI 工作流中运行版本构建和自动检查

项目优势

  • 无运行时依赖,无需服务器/数据库
  • 通过 TEI 模型类分配渲染行为,并对整个 P5 元素集进行明确覆盖检查
  • 以 ODD 定制为配置来源,并生成有文档的 JSON 数据模型
  • 生成页面通过 WCAG AA 对比度断言,且支持键盘访问

使用前须知

  • 仍为原型开发,尚未稳定发布
  • 可选功能会调用外部服务(OSM 地图瓦片、UDPipe 词形还原),需注意归属声明与用户同意
  • 使用环境需要 Node >=18,并依赖 git、静态托管和 CI 流程

README 快速开始

Torchio

Torchio turns XML-TEI P5 encoded texts into static digital scholarly editions: multi-page sites with reading text, critical apparatus, indices, maps and data exports, published from a git repository (GitHub Pages or any static host), with no server and no database.

Project home: , where the press runs in the browser and wishes can be filed.

Demo editions: , kept in their own repository, emmcarbe/torchio-demos, so that materials with limited rights stay apart from the engine.

Status: prototype under development. How to use it: USAGE.md. The principles, the method and the origin of the project are in PRINCIPLES.md; corrections required by real editions are recorded in CORRECTIONS.md; wishes go in DESIDERATA.md.

Design constraints

  1. Every well-formed TEI document is always displayed in full. Unknown or custom constructs receive a base rendering.
  2. Rendering behaviour is assigned to TEI model classes, not to individual elements. The class data is generated from the official p5subset (currently 588 elements, 127 model classes); coverage of the whole P5 element set is checked by the test suite at every TEI release.
  3. The edition's ODD customization is the configuration. Custom elements declared memberOf a TEI class inherit its behaviour. Following the Guidelines' conformance chapter, extensions concern phenomena P5 does not already cover.
  4. The engine produces a documented data model (JSON); pages and exports (XML, CSV, JSON) are generated from the model, not from ad hoc transformations of the XML.
  5. No runtime services. The same code runs in the browser and in Node; hosting, versioning and CI (continuous integration, the automated checks a repository runs at every change) belong to the edition's repository.
  6. The markup decides which pages and functions exist; the optional manifest (torchio.json) decides their presence, order and labels.
  7. Generated pages meet WCAG AA contrast (asserted per theme in the test suite) and are keyboard-accessible.
  8. Interface language: English or Italian, set in the manifest or derived from the edition's langUsage.

Layout

  • src/xml.js — XML parser (no dependencies; validation belongs to the edition's CI)
  • src/classes.js, `data/p5-classes.jso

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

S40911120
精选
S40911120 GitHub avatar

recensa

Recensa is a self-hosted web viewer that indexes Claude Code session transcripts into a local SQLite database, enabling full-text search, replay, and audit of all past agent conversations without uploading data anywhere.

AI 与机器学习大语言模型
67
deerwork-ai
精选
deerwork-ai GitHub avatar

deer-workflow

An open-source Dynamic Workflow runtime that combines deterministic TypeScript orchestration with replaceable Agent runtimes.

AI 与机器学习大语言模型
312
programmersd21
精选
programmersd21 GitHub avatar

flow

flow is a minimalist terminal dashboard that displays real-time network throughput with smooth animations, multiple responsive modes, and zero configuration.

开发者工具CLI 与终端
277