paperfmt 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- paperfmt-1.0.0/LICENSE +21 -0
- paperfmt-1.0.0/PKG-INFO +94 -0
- paperfmt-1.0.0/README.md +72 -0
- paperfmt-1.0.0/paperfmt/__init__.py +3 -0
- paperfmt-1.0.0/paperfmt/__main__.py +4 -0
- paperfmt-1.0.0/paperfmt/cli.py +559 -0
- paperfmt-1.0.0/paperfmt/core/__init__.py +0 -0
- paperfmt-1.0.0/paperfmt/core/checker.py +88 -0
- paperfmt-1.0.0/paperfmt/core/models.py +63 -0
- paperfmt-1.0.0/paperfmt/core/paperfmt_config.py +81 -0
- paperfmt-1.0.0/paperfmt/core/registry.py +24 -0
- paperfmt-1.0.0/paperfmt/core/rules/__init__.py +25 -0
- paperfmt-1.0.0/paperfmt/core/rules/acl.py +327 -0
- paperfmt-1.0.0/paperfmt/core/rules/acm.py +284 -0
- paperfmt-1.0.0/paperfmt/core/rules/base.py +16 -0
- paperfmt-1.0.0/paperfmt/core/rules/common.py +576 -0
- paperfmt-1.0.0/paperfmt/core/rules/ieee_conf.py +471 -0
- paperfmt-1.0.0/paperfmt/core/rules/neurips.py +348 -0
- paperfmt-1.0.0/paperfmt/core/scaffold.py +54 -0
- paperfmt-1.0.0/paperfmt/core/tex_utils.py +32 -0
- paperfmt-1.0.0/paperfmt.egg-info/PKG-INFO +94 -0
- paperfmt-1.0.0/paperfmt.egg-info/SOURCES.txt +28 -0
- paperfmt-1.0.0/paperfmt.egg-info/dependency_links.txt +1 -0
- paperfmt-1.0.0/paperfmt.egg-info/entry_points.txt +2 -0
- paperfmt-1.0.0/paperfmt.egg-info/requires.txt +17 -0
- paperfmt-1.0.0/paperfmt.egg-info/top_level.txt +1 -0
- paperfmt-1.0.0/pyproject.toml +56 -0
- paperfmt-1.0.0/setup.cfg +4 -0
- paperfmt-1.0.0/tests/test_cli.py +215 -0
- paperfmt-1.0.0/tests/test_workflow.py +1434 -0
paperfmt-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shionyori
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
paperfmt-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: paperfmt
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Template compliance checker and safe formatter for academic papers
|
|
5
|
+
Author: paperfmt contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: click>=8.1.7
|
|
11
|
+
Requires-Dist: tomli>=2.0.1; python_version < "3.11"
|
|
12
|
+
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: pytest>=8.2.0; extra == "dev"
|
|
14
|
+
Requires-Dist: ruff>=0.11.0; extra == "dev"
|
|
15
|
+
Provides-Extra: image
|
|
16
|
+
Requires-Dist: Pillow>=10.0; extra == "image"
|
|
17
|
+
Provides-Extra: link
|
|
18
|
+
Requires-Dist: httpx>=0.27; extra == "link"
|
|
19
|
+
Provides-Extra: full
|
|
20
|
+
Requires-Dist: paperfmt[image,link]; extra == "full"
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
简体中文 | [English](./README.en.md)
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<img src="docs/icon.png" alt="paperfmt" width="128">
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<h1 align="center">paperfmt</h1>
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
学术论文模板合规检查与安全修复工具。
|
|
33
|
+
<br>
|
|
34
|
+
解析 <code>.tex</code> 多文件项目,生成可读报告,一键修复格式问题。
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<img src="https://img.shields.io/badge/version-1.0.0-blue" alt="version">
|
|
39
|
+
<img src="https://img.shields.io/badge/python-%E2%89%A53.10-blue" alt="python">
|
|
40
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="license">
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
## 快速开始
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# 在论文项目目录下初始化
|
|
47
|
+
paperfmt init --template ieee-conf
|
|
48
|
+
|
|
49
|
+
# 运行检查
|
|
50
|
+
paperfmt check
|
|
51
|
+
|
|
52
|
+
# 一键修复
|
|
53
|
+
paperfmt fix
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 支持模板
|
|
57
|
+
|
|
58
|
+
| 模板 | 标识 | 规则数 | 说明 |
|
|
59
|
+
|------|------|--------|------|
|
|
60
|
+
| IEEE 会议 | `ieee-conf` | 12 | IEEE 会议论文格式 |
|
|
61
|
+
| ACM 会议 | `acm-conf` | 12 | ACM 会议论文格式 |
|
|
62
|
+
| NeurIPS | `neurips` | 12 | NeurIPS 会议论文格式 |
|
|
63
|
+
| ACL 会议 | `acl-conf` | 12 | ACL 会议论文格式 |
|
|
64
|
+
|
|
65
|
+
所有模板均包含 10 项通用规则(引用检查、标签验证、分辨率检查等)。
|
|
66
|
+
|
|
67
|
+
> 详细内容见 [规则列表](./docs/rules.md)。
|
|
68
|
+
|
|
69
|
+
## 命令一览
|
|
70
|
+
|
|
71
|
+
| 命令 | 用途 |
|
|
72
|
+
|------|------|
|
|
73
|
+
| `paperfmt init` | 初始化项目,创建 `paperfmt.toml` 和 `.paperfmt/` |
|
|
74
|
+
| `paperfmt check` | 检查 `.tex` 文件,支持 `--strict` CI 模式、`--format json` 等 |
|
|
75
|
+
| `paperfmt fix` | 安全修复,支持 `--dry-run` 预览、`--interactive` 逐条确认 |
|
|
76
|
+
|
|
77
|
+
> 详细用法见 [命令参考](./docs/cli.md)。
|
|
78
|
+
|
|
79
|
+
## 配置
|
|
80
|
+
|
|
81
|
+
`paperfmt.toml` 示例:
|
|
82
|
+
|
|
83
|
+
```toml
|
|
84
|
+
main_tex = "paper.tex"
|
|
85
|
+
bibliography = "refs.bib"
|
|
86
|
+
|
|
87
|
+
[rules.IEEE006]
|
|
88
|
+
enabled = false # 关闭匿名泄露检查
|
|
89
|
+
|
|
90
|
+
[rules.IEEE007]
|
|
91
|
+
severity = "warning" # DOI 缺失降级为警告
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
执行记录自动追加至 `.paperfmt/report.txt`。
|
paperfmt-1.0.0/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
简体中文 | [English](./README.en.md)
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/icon.png" alt="paperfmt" width="128">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">paperfmt</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
学术论文模板合规检查与安全修复工具。
|
|
11
|
+
<br>
|
|
12
|
+
解析 <code>.tex</code> 多文件项目,生成可读报告,一键修复格式问题。
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<img src="https://img.shields.io/badge/version-1.0.0-blue" alt="version">
|
|
17
|
+
<img src="https://img.shields.io/badge/python-%E2%89%A53.10-blue" alt="python">
|
|
18
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="license">
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
## 快速开始
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# 在论文项目目录下初始化
|
|
25
|
+
paperfmt init --template ieee-conf
|
|
26
|
+
|
|
27
|
+
# 运行检查
|
|
28
|
+
paperfmt check
|
|
29
|
+
|
|
30
|
+
# 一键修复
|
|
31
|
+
paperfmt fix
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 支持模板
|
|
35
|
+
|
|
36
|
+
| 模板 | 标识 | 规则数 | 说明 |
|
|
37
|
+
|------|------|--------|------|
|
|
38
|
+
| IEEE 会议 | `ieee-conf` | 12 | IEEE 会议论文格式 |
|
|
39
|
+
| ACM 会议 | `acm-conf` | 12 | ACM 会议论文格式 |
|
|
40
|
+
| NeurIPS | `neurips` | 12 | NeurIPS 会议论文格式 |
|
|
41
|
+
| ACL 会议 | `acl-conf` | 12 | ACL 会议论文格式 |
|
|
42
|
+
|
|
43
|
+
所有模板均包含 10 项通用规则(引用检查、标签验证、分辨率检查等)。
|
|
44
|
+
|
|
45
|
+
> 详细内容见 [规则列表](./docs/rules.md)。
|
|
46
|
+
|
|
47
|
+
## 命令一览
|
|
48
|
+
|
|
49
|
+
| 命令 | 用途 |
|
|
50
|
+
|------|------|
|
|
51
|
+
| `paperfmt init` | 初始化项目,创建 `paperfmt.toml` 和 `.paperfmt/` |
|
|
52
|
+
| `paperfmt check` | 检查 `.tex` 文件,支持 `--strict` CI 模式、`--format json` 等 |
|
|
53
|
+
| `paperfmt fix` | 安全修复,支持 `--dry-run` 预览、`--interactive` 逐条确认 |
|
|
54
|
+
|
|
55
|
+
> 详细用法见 [命令参考](./docs/cli.md)。
|
|
56
|
+
|
|
57
|
+
## 配置
|
|
58
|
+
|
|
59
|
+
`paperfmt.toml` 示例:
|
|
60
|
+
|
|
61
|
+
```toml
|
|
62
|
+
main_tex = "paper.tex"
|
|
63
|
+
bibliography = "refs.bib"
|
|
64
|
+
|
|
65
|
+
[rules.IEEE006]
|
|
66
|
+
enabled = false # 关闭匿名泄露检查
|
|
67
|
+
|
|
68
|
+
[rules.IEEE007]
|
|
69
|
+
severity = "warning" # DOI 缺失降级为警告
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
执行记录自动追加至 `.paperfmt/report.txt`。
|