Skip to main content

论文格式自动化处理工具

Project description

WordFormat

论文格式自动化处理工具

License Python PyPI Platform

项目简介

WordFormat 是一个基于 Python 开发的 Word 文档自动化格式检查与修正工具,专为学术论文(本科/硕士/博士毕业论文、期刊论文等)的格式合规性审查设计。该工具能够智能解析 Word 文档结构,识别标题、摘要、正文、参考文献等不同段落类型,并依据自定义的格式规范自动校验文档格式,支持在违规位置添加批注或直接修正格式问题,大幅提升论文格式审核效率。

点击 WordFormatUI 查看带有GUI界面的项目

功能特性

核心能力

  • 智能文档结构解析:基于 ONNX 模型自动识别文档中的标题、摘要、正文、关键词、参考文献等段落类型,生成结构化 JSON 配置文件
  • 精细化格式校验:支持段落格式(对齐、行距、缩进、段间距)和字符格式(字体、字号、颜色、加粗/斜体/下划线)的全维度检查
  • 多级别标题管理:精准识别一级/二级/三级标题,支持自定义标题格式规范校验
  • 多语言适配:区分中英文字体/格式规则,完美支持中英文混合文档的格式检查
  • 灵活的交互方式:支持「生成结构文件→手动调整→执行校验」的分步流程,兼顾自动化与灵活性

实用功能

  • 自动批注生成:在格式违规位置自动添加 Word 批注,标注问题类型和修正建议
  • 格式一键修正:支持根据规范自动修正部分常见格式问题(如标题字号、正文行距)
  • 自定义配置:通过 YAML 配置文件灵活定义格式规范,适配不同学校/期刊的格式要求
  • 跨平台兼容:支持 Windows/macOS/Linux 系统,基于 python-docx 实现跨平台 Word 文档处理

视频教程

点击直达B站视频

普通用户请看这里

  • 如果你是普通用户,请点击WordFormatUI下载带有GUI界面的安装包直接使用,并参考安装指南进行安装。
  • 如果你是开发人员,请按照以下步骤进行安装和运行

快速开始

环境要求

  • Python 3.10+(推荐 3.11 及以上版本)
  • 依赖管理工具:uv(推荐)或 pip

安装步骤

  1. 克隆项目

    git clone https://github.com/AfishInLake/WordFormat.git
    cd WordFormat
    
  2. 安装依赖

    make install
    # 或使用 pip
    pip install -e .
    
  3. 配置环境变量 创建 .env 文件,配置 HOST、PORT 等必要参数:

    HOST="127.0.0.1"
    # 配置服务端口
    PORT="8000"
    
  4. 启动API服务

    # 在虚拟环境下运行
    make server
    
  5. 构建.exe程序

    # 在虚拟环境下运行
    make build
    

核心使用方法

命令行使用(推荐)

WordFormat 提供三种核心执行模式:

  1. 生成文档结构 JSON

  2. 执行格式校验

  3. 执行格式格式化

具体请看

详细文档

更多详细文档请查看 docs/ 目录:

许可证

Apache License 2.0 - 允许自由使用、修改和分发,需保留原作者声明。

联系方式

  • 反馈渠道:GitHub Issues(优先推荐,方便问题跟踪和交流)
  • 联系邮箱:1593699665@qq.com

项目贡献者

待补充,欢迎各位开发者提交PR贡献代码,一起完善这个工具!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wordformat-1.0.0.tar.gz (185.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wordformat-1.0.0-py3-none-any.whl (192.2 kB view details)

Uploaded Python 3

File details

Details for the file wordformat-1.0.0.tar.gz.

File metadata

  • Download URL: wordformat-1.0.0.tar.gz
  • Upload date:
  • Size: 185.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wordformat-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bb215fe79418a8062ea372f477d5627532587d3fcf45855ecde211441c6b3fd1
MD5 ecec45b4aa80c2df3ef25df7f8a84ed1
BLAKE2b-256 6d8fff546044289644259054b97b769d2a2270d8ec437761b4473b59e6ae0295

See more details on using hashes here.

Provenance

The following attestation bundles were made for wordformat-1.0.0.tar.gz:

Publisher: ci.yml on AfishInLake/WordFormat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wordformat-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: wordformat-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 192.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wordformat-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f99afab2275ccac05f12d0fca5f9659a6488207c972a936362a278e0e0461f78
MD5 3d73f96e6aa77a1ad8f5f9d84575b90b
BLAKE2b-256 ec4a64fa7c07588869aa134c483a5b4d66516843611523dedab77c284ce05dd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for wordformat-1.0.0-py3-none-any.whl:

Publisher: ci.yml on AfishInLake/WordFormat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page