Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

emptyinkpot/thesis-format-checker

Repository files navigation

thesis-format-checker

DOCX 论文格式合规校验器,支持自定义规则集 (preset) 和自动微调。

安装

pip install -e .

依赖 pandoc 用于内容提取(需确保 pandoc 在 PATH 中)。

用法

# 校验(默认使用 ncwu preset)
thesis-check 论文.docx
# 指定规则集
thesis-check 论文.docx --preset ncwu
# 使用自定义规则文件
thesis-check 论文.docx --rules my-school.yaml
# JSON 输出(CI 友好)
thesis-check 论文.docx --json
# 自动修正可修项,输出到新文件
thesis-check 论文.docx --fix 论文_fixed.docx
# 列出所有规则
thesis-check list-rules --preset ncwu

退出码

Code 含义
0 全部通过
1 有 warning
2 有 error
3 工具/输入错误

内置规则

ID 说明 可自动修正
page-margins 页边距 Y
header-text-match 页眉文本 Y
header-on-all-sections 所有节有页眉 -
body-font-size 正文字号 Y
body-east-asia-font 正文中文字体 Y
body-line-spacing 正文行距 Y
heading1-style 一级标题样式 Y
heading2-style 二级标题样式 Y
heading3-style 三级标题样式 Y
heading-style-applied 标题段落使用正确 Heading Y
chapter-page-break 章前分页 -
abstract-zh-length 中文摘要字数 -
abstract-en-length 英文摘要词数 -
foreign-translation-length 外文译文字数 -
toc-present 目录存在 -
cover-fields 封面字段完整 -

自定义规则

参考 presets/ncwu.yamlexamples/custom-school.yaml 编写你自己学校的规则集。

License

MIT

About

DOCX thesis format compliance checker with rule presets and auto-fix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /