json-resume 1.1.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.
- json_resume-1.1.0/LICENSE +21 -0
- json_resume-1.1.0/MANIFEST.in +2 -0
- json_resume-1.1.0/PKG-INFO +281 -0
- json_resume-1.1.0/README.md +255 -0
- json_resume-1.1.0/README_EN.md +254 -0
- json_resume-1.1.0/json_resume.egg-info/PKG-INFO +281 -0
- json_resume-1.1.0/json_resume.egg-info/SOURCES.txt +23 -0
- json_resume-1.1.0/json_resume.egg-info/dependency_links.txt +1 -0
- json_resume-1.1.0/json_resume.egg-info/entry_points.txt +2 -0
- json_resume-1.1.0/json_resume.egg-info/requires.txt +3 -0
- json_resume-1.1.0/json_resume.egg-info/top_level.txt +1 -0
- json_resume-1.1.0/pyproject.toml +43 -0
- json_resume-1.1.0/resume_generator/__init__.py +24 -0
- json_resume-1.1.0/resume_generator/cli.py +183 -0
- json_resume-1.1.0/resume_generator/config.py +34 -0
- json_resume-1.1.0/resume_generator/helpers.py +142 -0
- json_resume-1.1.0/resume_generator/layout.py +55 -0
- json_resume-1.1.0/resume_generator/models.py +56 -0
- json_resume-1.1.0/resume_generator/output.py +55 -0
- json_resume-1.1.0/resume_generator/pdf.py +96 -0
- json_resume-1.1.0/resume_generator/renderer.py +170 -0
- json_resume-1.1.0/resume_generator/service.py +77 -0
- json_resume-1.1.0/resume_generator/styles.py +316 -0
- json_resume-1.1.0/resume_generator/validator.py +252 -0
- json_resume-1.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Eric Zhou
|
|
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.
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: json-resume
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Strict JSON-to-DOCX resume generator with locale-aware Word layout
|
|
5
|
+
Author: Eric Zhou
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Eric-Zhou-0302/JSON-Resume
|
|
8
|
+
Project-URL: Repository, https://github.com/Eric-Zhou-0302/JSON-Resume.git
|
|
9
|
+
Project-URL: Issues, https://github.com/Eric-Zhou-0302/JSON-Resume/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/Eric-Zhou-0302/JSON-Resume/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: resume,json,docx,word,cv
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Office/Business
|
|
19
|
+
Classifier: Topic :: Text Processing :: Markup
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: python-docx==1.2.0
|
|
24
|
+
Requires-Dist: docx2pdf==0.1.8
|
|
25
|
+
Requires-Dist: pypdf==6.10.0
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
<h1 align="center">📄 JSON-Resume</h1>
|
|
29
|
+
|
|
30
|
+
<p align="center"><strong>Prepare JSON. Generate your resume.</strong></p>
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<sub>✦</sub>
|
|
34
|
+
<strong>Works with</strong>
|
|
35
|
+
<a href="SKILL.md"><kbd>🤖 AI Agent</kbd></a>
|
|
36
|
+
<sub>·</sub>
|
|
37
|
+
<code>Codex</code>
|
|
38
|
+
<code>OpenClaw</code>
|
|
39
|
+
<code>WorkBuddy</code>
|
|
40
|
+
<sub>✦</sub>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<img src="https://img.shields.io/badge/Python-3.11-3776AB?logo=python&logoColor=white" alt="Python 3.11" />
|
|
45
|
+
<img src="https://img.shields.io/badge/output-DOCX%20%2B%20PDF-2B579A" alt="DOCX and PDF output" />
|
|
46
|
+
<a href="SKILL.md"><img src="https://img.shields.io/badge/AI%20Agent-Skill-6E56CF" alt="AI Agent Skill" /></a>
|
|
47
|
+
<a href="https://github.com/Eric-Zhou-0302/Offer-Rain" title="Open Offer-Rain"><img src="https://img.shields.io/badge/Workflow-JSON--Resume%20%C3%97%20Offer--Rain-6E56CF" alt="JSON-Resume × Offer-Rain workflow" /></a>
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
<p align="center">
|
|
51
|
+
<a href="#resume-style">Resume style</a> ·
|
|
52
|
+
<a href="#how-to-use">How to use</a> ·
|
|
53
|
+
<a href="#project-structure">Project structure</a> ·
|
|
54
|
+
<a href="#workflow">Workflow</a> ·
|
|
55
|
+
<a href="#license">License</a> ·
|
|
56
|
+
<a href="#pair-with-offer-rain">Pair with Offer-Rain</a>
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
<p align="center"><a href="README.md">中文</a> | English</p>
|
|
60
|
+
|
|
61
|
+
<div align="center">
|
|
62
|
+
<img src="assets/json-resume-hero.png" width="480" alt="An abstract illustration of structured JSON becoming a professional resume" />
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
Writing a resume should not mean hand-tuning Word, copying formatting, or worrying about breaking the last good file. JSON-Resume stores resume content in strict JSON while the generator handles Word styles, bullets, links, and a two-column layout—then produces a composed, restrained DOCX resume.
|
|
68
|
+
|
|
69
|
+
# Resume style
|
|
70
|
+
|
|
71
|
+
- Minimal decoration, content first
|
|
72
|
+
- Monochrome and restrained
|
|
73
|
+
- High information density with a clear hierarchy
|
|
74
|
+
- Well suited to finance, academic research, technical roles, and similar applications
|
|
75
|
+
- See the [full style specification](docs/ARCHITECTURE.md#完整样式规范)
|
|
76
|
+
|
|
77
|
+
<div align="center">
|
|
78
|
+
<p>Generated resume preview</p>
|
|
79
|
+
<a href="assets/example/example_resume_en.pdf">
|
|
80
|
+
<img src="assets/example/example_resume_en.png" width="960" alt="English resume PDF preview; click to open the PDF" />
|
|
81
|
+
</a>
|
|
82
|
+
<p>
|
|
83
|
+
<a href="assets/example/example_resume_en.docx">View the DOCX</a> ·
|
|
84
|
+
<a href="assets/example/example_resume_en.json">View the JSON</a>
|
|
85
|
+
</p>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
# How to use
|
|
89
|
+
|
|
90
|
+
JSON-Resume offers three ways to work: have an Agent create a resume, generate one from the command line, or call it from a Python script.
|
|
91
|
+
|
|
92
|
+
## Agent-assisted resume workflow
|
|
93
|
+
|
|
94
|
+
The project includes `SKILL.md`, which Codex, OpenClaw, WorkBuddy, and other compatible Agents can use to create or render resumes.
|
|
95
|
+
|
|
96
|
+
- Give an existing JSON file to an Agent and have it render the resume.
|
|
97
|
+
- Give resume materials to an Agent and have it create the resume.
|
|
98
|
+
|
|
99
|
+
### Install the Skill
|
|
100
|
+
|
|
101
|
+
Send this directly to your Agent:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
Install this Skill to help me create my resume:
|
|
105
|
+
https://github.com/Eric-Zhou-0302/JSON-Resume
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### A better workflow
|
|
109
|
+
|
|
110
|
+
Do not repeatedly edit the previous resume. And do not cram every experience into one universal resume.
|
|
111
|
+
|
|
112
|
+
#### Career source
|
|
113
|
+
|
|
114
|
+
Maintain a complete personal Career Source in Markdown or plain text: education, employment, projects, and other career facts. It is the source material for each resume.
|
|
115
|
+
|
|
116
|
+
#### Role tailoring
|
|
117
|
+
|
|
118
|
+
For each application, give the target job description to the Agent. It will use only the facts in the Career Source, foregrounding your most relevant strengths to create the best-fitting resume for that role.
|
|
119
|
+
|
|
120
|
+
### Agent delivery standard
|
|
121
|
+
|
|
122
|
+
The Skill does more than put text into Word. It owns the complete delivery path from factual material to the final resume and follows these standards:
|
|
123
|
+
|
|
124
|
+
- **One-page resume standard:** In professional authoring mode, the Agent selects and refines content for the target role, producing a naturally dense resume of exactly one page. If content is excessive, it removes weaker or repetitive information first; if content is thin, it only adds facts from authorized source materials.
|
|
125
|
+
- **Full acceptance:** The Agent must generate the DOCX and PDF through the CLI, check the actual PDF page count, and inspect every page for clipping, overlap, table alignment, line breaks, characters, and whitespace. Creating files alone is not completion.
|
|
126
|
+
- **Factual boundary:** The Agent uses only materials you provide or explicitly authorize: Career Sources, prior resumes, and project records. It does not invent experience, dates, titles, grades, metrics, skills, or contact details. A job description may guide selection and wording, but is never evidence of personal facts.
|
|
127
|
+
- **File protection:** Without explicit authorization, the Agent does not overwrite existing JSON, DOCX, or PDF files.
|
|
128
|
+
- **When you provide JSON directly:** The Agent only renders it, preserving its content and order without rewriting or removing anything.
|
|
129
|
+
|
|
130
|
+
## Command line and Python
|
|
131
|
+
|
|
132
|
+
### Write the JSON
|
|
133
|
+
|
|
134
|
+
Create a JSON file and fill in your resume content according to the JSON contract. See the [example JSON file](assets/example/example_resume_en.json).
|
|
135
|
+
|
|
136
|
+
<details>
|
|
137
|
+
<summary><strong>Expand to view the JSON contract</strong></summary>
|
|
138
|
+
|
|
139
|
+
<br />
|
|
140
|
+
|
|
141
|
+
| Field | Rule |
|
|
142
|
+
| --- | --- |
|
|
143
|
+
| `locale` | Required: `zh-CN`, `en-US`, `en-GB`, or `en-EU`. It selects paper size only: `en-US` is Letter; the rest are A4. It does not translate content. |
|
|
144
|
+
| `basics` | Must contain exactly `name` and `contacts`. |
|
|
145
|
+
| `contacts` | At least one item. `label` is visible text and `href` is an optional link target; provide complete `mailto:` / `tel:` values yourself. |
|
|
146
|
+
| `sections` | Contains at least one section and renders in JSON order. Each section may contain only `title` and `entries`; `title` must be nonblank and `entries` needs at least one item. |
|
|
147
|
+
| `entries` | Each entry needs at least one nonblank `title`, `position`, `location`, `start_date` / `end_date`, or `bullets`. |
|
|
148
|
+
| `bullets` | Optional; when present, a flat `list[str]` with at least one nonblank string. Nested lists, objects, and hierarchy inferred from prefixes are not supported. |
|
|
149
|
+
|
|
150
|
+
Dates must be valid `YYYY-MM` values. `end_date` may also use status text such as `Present`; calendar date ranges render as `YYYY.MM - YYYY.MM`.
|
|
151
|
+
|
|
152
|
+
</details>
|
|
153
|
+
|
|
154
|
+
### Render the resume
|
|
155
|
+
|
|
156
|
+
You can generate a DOCX or PDF from a resume JSON in three ways.
|
|
157
|
+
|
|
158
|
+
#### Run the installed package from the command line
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
pip install json-resume
|
|
162
|
+
json-resume resume.json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
#### Render in a Python script
|
|
166
|
+
|
|
167
|
+
After installing the package, import `render_json_file_to_docx()` to render a resume in a Python script.
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
from resume_generator import render_json_file_to_docx
|
|
171
|
+
|
|
172
|
+
docx_path = render_json_file_to_docx(
|
|
173
|
+
"resume.json",
|
|
174
|
+
"resume.docx",
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
print(docx_path)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
#### `main.py` entry point
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
pip install -r requirements.txt
|
|
184
|
+
python main.py resume.json
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### Command-line options
|
|
188
|
+
|
|
189
|
+
Both `json-resume` and `python main.py` support:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
-o OUTPUT, --output OUTPUT # Set the output path and filename
|
|
193
|
+
--pdf # Generate a PDF
|
|
194
|
+
--force # Replace existing output files
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The Python API accepts the corresponding `output_path`, `pdf=True`, and `force=True` arguments.
|
|
198
|
+
|
|
199
|
+
# Project structure
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
JSON-Resume/
|
|
203
|
+
├── README.md # Chinese user documentation
|
|
204
|
+
├── README_EN.md # English user documentation
|
|
205
|
+
├── CHANGELOG.md # Release notes
|
|
206
|
+
├── SKILL.md # Built-in Skill for Agents
|
|
207
|
+
├── LICENSE # MIT License
|
|
208
|
+
├── MANIFEST.in # Source-distribution content boundary
|
|
209
|
+
├── main.py # Traditional CLI entry point
|
|
210
|
+
├── pyproject.toml # Package metadata, dependencies, and installed command
|
|
211
|
+
├── requirements.txt # Python dependencies
|
|
212
|
+
├── assets/
|
|
213
|
+
│ ├── example/ # Example JSON, DOCX, PDF, and preview images
|
|
214
|
+
│ ├── buy-me-a-coffee.jpg
|
|
215
|
+
│ └── json-resume-hero.png
|
|
216
|
+
├── docs/
|
|
217
|
+
│ └── ARCHITECTURE.md # Developer architecture documentation
|
|
218
|
+
├── resume_generator/
|
|
219
|
+
│ ├── cli.py # Command-line arguments and main flow
|
|
220
|
+
│ ├── validator.py # JSON validation and model parsing
|
|
221
|
+
│ ├── renderer.py # DOCX content rendering
|
|
222
|
+
│ ├── styles.py # Page, style, and table specifications
|
|
223
|
+
│ ├── layout.py # Two-column entry layout
|
|
224
|
+
│ ├── helpers.py # OOXML, link, and font helpers
|
|
225
|
+
│ ├── config.py # Locale and paper configuration
|
|
226
|
+
│ ├── models.py # Pure data models
|
|
227
|
+
│ ├── output.py # Output-target checks and atomic writes
|
|
228
|
+
│ ├── service.py # In-memory and file-level public service APIs
|
|
229
|
+
│ └── pdf.py # PDF export and page-count check
|
|
230
|
+
└── tests/ # Tests
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
# Workflow
|
|
234
|
+
|
|
235
|
+
```mermaid
|
|
236
|
+
flowchart TD
|
|
237
|
+
A[Prepare JSON yourself] --> B[Generate directly with the CLI]
|
|
238
|
+
B --> C[DOCX]
|
|
239
|
+
C --> D[Optional PDF]
|
|
240
|
+
|
|
241
|
+
E[Career Source + optional JD] --> F[Agent professional authoring]
|
|
242
|
+
F --> G[Generate JSON]
|
|
243
|
+
G --> H[CLI generates DOCX and PDF]
|
|
244
|
+
H --> I[Page-count check + PDF visual review]
|
|
245
|
+
I --> J[One-page tailored resume]
|
|
246
|
+
|
|
247
|
+
K[User provides JSON] --> L[Agent faithful rendering]
|
|
248
|
+
L --> M[Preserve content and order]
|
|
249
|
+
M --> H
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
# Pair with Offer-Rain
|
|
253
|
+
|
|
254
|
+
JSON-Resume focuses on creating resumes, not sending applications. If you need to apply by email, use [Offer-Rain](https://github.com/Eric-Zhou-0302/Offer-Rain).
|
|
255
|
+
|
|
256
|
+
# License
|
|
257
|
+
|
|
258
|
+
[MIT](./LICENSE) @ 2026 Eric Zhou
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
# Buy the author a coffee
|
|
263
|
+
|
|
264
|
+
<div align="center">
|
|
265
|
+
<p>
|
|
266
|
+
If this project helped you finish your first, fifth, or fiftieth resume,
|
|
267
|
+
<br />
|
|
268
|
+
consider buying the author a coffee.
|
|
269
|
+
</p>
|
|
270
|
+
<p>
|
|
271
|
+
May your next resume tell your real experience clearly and look great,
|
|
272
|
+
<br />
|
|
273
|
+
while my cup gets a small refill of hot Americano.
|
|
274
|
+
</p>
|
|
275
|
+
<img src="assets/buy-me-a-coffee.jpg" alt="Buy the author a coffee" width="320" />
|
|
276
|
+
<p>
|
|
277
|
+
<sub>Entirely optional. It does not affect features or your ability to keep generating resumes.</sub>
|
|
278
|
+
</p>
|
|
279
|
+
</div>
|
|
280
|
+
|
|
281
|
+
---
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
<h1 align="center">📄 JSON-Resume</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center"><strong>准备 JSON,生成你的简历。</strong></p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<sub>✦</sub>
|
|
7
|
+
<strong>支持接入</strong>
|
|
8
|
+
<a href="SKILL.md"><kbd>🤖 AI Agent</kbd></a>
|
|
9
|
+
<sub>·</sub>
|
|
10
|
+
<code>Codex</code>
|
|
11
|
+
<code>OpenClaw</code>
|
|
12
|
+
<code>WorkBuddy</code>
|
|
13
|
+
<sub>✦</sub>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<img src="https://img.shields.io/badge/Python-3.11-3776AB?logo=python&logoColor=white" alt="Python 3.11" />
|
|
18
|
+
<img src="https://img.shields.io/badge/output-DOCX%20%2B%20PDF-2B579A" alt="DOCX and PDF output" />
|
|
19
|
+
<a href="SKILL.md"><img src="https://img.shields.io/badge/AI%20Agent-Skill-6E56CF" alt="AI Agent Skill" /></a>
|
|
20
|
+
<a href="https://github.com/Eric-Zhou-0302/Offer-Rain" title="打开 Offer-Rain"><img src="https://img.shields.io/badge/Workflow-JSON--Resume%20%C3%97%20Offer--Rain-6E56CF" alt="JSON-Resume × Offer-Rain 工作流" /></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<a href="#简历风格">简历风格</a> ·
|
|
26
|
+
<a href="#如何使用">如何使用</a> ·
|
|
27
|
+
<a href="#项目结构">项目结构</a> ·
|
|
28
|
+
<a href="#工作流">工作流</a> ·
|
|
29
|
+
<a href="#协议">协议</a> ·
|
|
30
|
+
<a href="#搭配-offer-rain">搭配 Offer-Rain</a>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p align="center">中文 | <a href="README_EN.md">English</a></p>
|
|
34
|
+
|
|
35
|
+
<div align="center">
|
|
36
|
+
<img src="assets/json-resume-hero.png" width="480" alt="结构化 JSON 生成职业简历的抽象插画" />
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
写简历的麻烦不该是手调 Word、复制格式和担心改坏旧文件。JSON-Resume 把简历内容写成一份严格的 JSON,生成器负责 Word 的样式、项目符号、链接和双栏排版,最后生成沉稳克制风格的 DOCX 简历。
|
|
42
|
+
|
|
43
|
+
# 简历风格
|
|
44
|
+
|
|
45
|
+
- 低装饰、重内容
|
|
46
|
+
- 黑白、克制
|
|
47
|
+
- 高密度、强层级
|
|
48
|
+
- 适用:金融机构、学术研究、技术岗位等
|
|
49
|
+
- 简历所用样式详见 [完整样式规范](docs/ARCHITECTURE.md#完整样式规范)
|
|
50
|
+
|
|
51
|
+
<div align="center">
|
|
52
|
+
<p>生成简历预览</p>
|
|
53
|
+
<a href="assets/example/example_resume_zh.pdf">
|
|
54
|
+
<img src="assets/example/example_resume_zh.png" width="960" alt="中文简历 PDF 预览,点击打开 PDF" />
|
|
55
|
+
</a>
|
|
56
|
+
<p>
|
|
57
|
+
<a href="assets/example/example_resume_zh.docx">查看对应 DOCX</a> ·
|
|
58
|
+
<a href="assets/example/example_resume_zh.json">查看对应 JSON</a>
|
|
59
|
+
</p>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
# 如何使用
|
|
63
|
+
|
|
64
|
+
JSON-Resume 提供三种使用方式:让 Agent 制作、通过命令行生成,或在 Python 脚本中调用。
|
|
65
|
+
|
|
66
|
+
## 面向 Agent 的简历工作流
|
|
67
|
+
|
|
68
|
+
项目内置 `SKILL.md`,可供 Codex、OpenClaw、WorkBuddy 等 Agent 使用,用于制作或渲染简历。
|
|
69
|
+
|
|
70
|
+
- 提供已写好的 JSON,交给 Agent 渲染简历
|
|
71
|
+
- 提供简历内容,交给 Agent 制作简历
|
|
72
|
+
|
|
73
|
+
### 安装 Skill
|
|
74
|
+
|
|
75
|
+
直接把下面这段话发给 Agent:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
安装这个 Skill,用于帮我制作简历:
|
|
79
|
+
https://github.com/Eric-Zhou-0302/JSON-Resume
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 最佳工作流
|
|
83
|
+
|
|
84
|
+
不要反复在上一份简历上删改,更不要把所有经历塞进同一份“万能简历”。
|
|
85
|
+
|
|
86
|
+
#### 个人档案
|
|
87
|
+
|
|
88
|
+
先维护一份完整的 Markdown 或 txt 格式的个人档案,记录教育、工作、项目等个人信息,作为简历内容的来源。
|
|
89
|
+
|
|
90
|
+
#### 岗位匹配
|
|
91
|
+
|
|
92
|
+
每次投递时,再把目标岗位的 JD 交给 Agent,Agent 将严格按照档案的内容,最大化突出个人的优势,为这个岗位定制最贴合的一版简历。
|
|
93
|
+
|
|
94
|
+
### Agent 的交付标准
|
|
95
|
+
|
|
96
|
+
项目的 Skill 不只是把文字塞进 Word;它负责从事实材料到最终简历的完整交付,并遵守以下标准:
|
|
97
|
+
|
|
98
|
+
- **一页简历标准**:在专业创作模式下,Agent 会根据目标岗位筛选和精简内容,最终输出恰好一页、信息密度自然的简历;内容过多时优先删除较弱或重复的信息,内容不足时只从已授权的档案补充事实。
|
|
99
|
+
- **完整验收**:Agent 必须通过项目 CLI 生成 DOCX 和 PDF,先检查 PDF 实际页数,再逐页检查裁切、重叠、表格对齐、换行、字符和留白,不能只生成文件就宣称完成。
|
|
100
|
+
- **事实边界**:Agent 只使用你提供或明确授权读取的档案、旧简历和项目材料;不会捏造经历、日期、职位、成绩、指标、技能或联系方式。JD 只能帮助选择和表达,不能成为个人事实的来源。
|
|
101
|
+
- **文件保护**:未经明确授权,Agent 不会覆盖既有 JSON、DOCX 或 PDF。
|
|
102
|
+
- **直接提供 JSON 时**:Agent 只负责渲染,会保留内容和顺序,不会改写或删减。
|
|
103
|
+
|
|
104
|
+
## 命令行与 Python
|
|
105
|
+
|
|
106
|
+
### 填写 JSON
|
|
107
|
+
|
|
108
|
+
创建一份 JSON 文件,根据 JSON 契约填写简历内容,具体可参考 [示例 JSON 文件](assets/example/example_resume_zh.json)。
|
|
109
|
+
|
|
110
|
+
<details>
|
|
111
|
+
<summary><strong>展开查看 JSON 契约</strong></summary>
|
|
112
|
+
|
|
113
|
+
<br />
|
|
114
|
+
|
|
115
|
+
| 字段 | 规则 |
|
|
116
|
+
| --- |----------------------------------------------------------------------------------------------------------------------------|
|
|
117
|
+
| `locale` | 必填:`zh-CN`、`en-US`、`en-GB`、`en-EU`。仅决定纸张:`en-US` 为 Letter,其余为 A4;不会翻译内容。 |
|
|
118
|
+
| `basics` | 必须且只能包含 `name` 与 `contacts`。 |
|
|
119
|
+
| `contacts` | 至少一项。`label` 是显示文字,`href` 是可选链接目标;邮箱/电话需要自行写完整 `mailto:` / `tel:`。 |
|
|
120
|
+
| `sections` | 至少包含一个 section,按 JSON 顺序输出。每个 section 只能有 `title` 和 `entries`;`title` 必须非空白,`entries` 至少一项。 |
|
|
121
|
+
| `entries` | 每个条目至少包含一项非空的`title`、`position`、`location`、`start_date` / `end_date` 或 `bullets`。 |
|
|
122
|
+
| `bullets` | 可省略;提供时必须是至少包含一条非空字符串的扁平 `list[str]`。不支持嵌套列表、对象或从前缀推断层级。 |
|
|
123
|
+
|
|
124
|
+
日期必须是有效的 `YYYY-MM`。`end_date` 也可使用 `Present`、`至今` 等状态文本;真实日期范围会显示成 `YYYY.MM - YYYY.MM`。
|
|
125
|
+
|
|
126
|
+
</details>
|
|
127
|
+
|
|
128
|
+
### 渲染简历
|
|
129
|
+
|
|
130
|
+
简历 JSON 可以通过以下三种方式生成 DOCX 或 PDF。
|
|
131
|
+
|
|
132
|
+
#### 通过已安装的包在命令行生成
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pip install json-resume
|
|
136
|
+
json-resume resume.json
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### 脚本内渲染
|
|
140
|
+
|
|
141
|
+
安装 pip 包后,也可通过导入 `render_json_file_to_docx()` 在 Python 脚本中渲染简历。
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from resume_generator import render_json_file_to_docx
|
|
145
|
+
|
|
146
|
+
docx_path = render_json_file_to_docx(
|
|
147
|
+
"resume.json",
|
|
148
|
+
"resume.docx",
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
print(docx_path)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### `main.py` 入口
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
pip install -r requirements.txt
|
|
158
|
+
python main.py resume.json
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### 命令行参数
|
|
162
|
+
|
|
163
|
+
`json-resume` 与 `python main.py` 都支持以下参数:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
-o OUTPUT, --output OUTPUT # 指定输出位置与文件名
|
|
167
|
+
--pdf # 生成 PDF
|
|
168
|
+
--force # 覆盖已有文件
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Python 接口使用 `output_path`、`pdf=True` 和 `force=True` 传入对应设置。
|
|
172
|
+
|
|
173
|
+
# 项目结构
|
|
174
|
+
|
|
175
|
+
```text
|
|
176
|
+
JSON-Resume/
|
|
177
|
+
├── README.md # 中文用户文档
|
|
178
|
+
├── README_EN.md # English documentation
|
|
179
|
+
├── CHANGELOG.md # 版本更新记录
|
|
180
|
+
├── SKILL.md # 内置 SKILL,面向 Agent 使用
|
|
181
|
+
├── LICENSE # MIT 协议
|
|
182
|
+
├── MANIFEST.in # 源码发行包内容边界
|
|
183
|
+
├── main.py # CLI 入口
|
|
184
|
+
├── pyproject.toml # 包元数据、依赖与安装命令入口
|
|
185
|
+
├── requirements.txt # Python 依赖
|
|
186
|
+
├── assets/
|
|
187
|
+
│ ├── example/ # 示例 JSON、DOCX、PDF 与预览图
|
|
188
|
+
│ ├── buy-me-a-coffee.jpg
|
|
189
|
+
│ └── json-resume-hero.png
|
|
190
|
+
├── docs/
|
|
191
|
+
│ └── ARCHITECTURE.md # 开发者架构文档
|
|
192
|
+
├── resume_generator/
|
|
193
|
+
│ ├── cli.py # 命令行参数与主流程
|
|
194
|
+
│ ├── validator.py # JSON 校验与模型解析
|
|
195
|
+
│ ├── renderer.py # DOCX 内容渲染
|
|
196
|
+
│ ├── styles.py # 页面、样式和表格规范
|
|
197
|
+
│ ├── layout.py # 条目双栏版式
|
|
198
|
+
│ ├── helpers.py # OOXML、链接和字体工具
|
|
199
|
+
│ ├── config.py # locale 与纸张配置
|
|
200
|
+
│ ├── models.py # 纯数据模型
|
|
201
|
+
│ ├── output.py # 输出目标检查与原子写入
|
|
202
|
+
│ ├── service.py # 内存与文件级公共服务接口
|
|
203
|
+
│ └── pdf.py # PDF 导出与页数检测
|
|
204
|
+
└── tests/ # 测试
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
# 工作流
|
|
208
|
+
|
|
209
|
+
```mermaid
|
|
210
|
+
flowchart TD
|
|
211
|
+
A[自行准备 JSON] --> B[CLI 直接生成]
|
|
212
|
+
B --> C[DOCX]
|
|
213
|
+
C --> D[可选 PDF]
|
|
214
|
+
|
|
215
|
+
E[个人档案 + 可选 JD] --> F[Agent 专业创作]
|
|
216
|
+
F --> G[生成 JSON]
|
|
217
|
+
G --> H[CLI 生成 DOCX 和 PDF]
|
|
218
|
+
H --> I[页数检测 + PDF 视觉验收]
|
|
219
|
+
I --> J[一页定制简历]
|
|
220
|
+
|
|
221
|
+
K[用户提供 JSON] --> L[Agent 忠实渲染]
|
|
222
|
+
L --> M[保持原文与顺序]
|
|
223
|
+
M --> H
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
# 搭配 Offer-Rain
|
|
227
|
+
|
|
228
|
+
JSON-Resume 专注于制作简历,不负责投递。若你需要以邮箱方式投递你的简历,可使用 [Offer-Rain](https://github.com/Eric-Zhou-0302/Offer-Rain)。
|
|
229
|
+
|
|
230
|
+
# 协议
|
|
231
|
+
|
|
232
|
+
[MIT](./LICENSE) @ 2026 Eric Zhou
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
# 请作者喝杯咖啡
|
|
237
|
+
|
|
238
|
+
<div align="center">
|
|
239
|
+
<p>
|
|
240
|
+
如果这个项目帮你完成了第一份、第五份,或者第五十份简历,
|
|
241
|
+
<br />
|
|
242
|
+
欢迎请作者喝杯咖啡。
|
|
243
|
+
</p>
|
|
244
|
+
<p>
|
|
245
|
+
愿你的下一份简历,把真实经历讲得清楚、排得漂亮,
|
|
246
|
+
<br />
|
|
247
|
+
而我的杯子里也能顺便续上一点热美式。
|
|
248
|
+
</p>
|
|
249
|
+
<img src="assets/buy-me-a-coffee.jpg" alt="请作者喝杯咖啡" width="320" />
|
|
250
|
+
<p>
|
|
251
|
+
<sub>自愿支持,不影响功能使用,也不影响你继续生成简历。</sub>
|
|
252
|
+
</p>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
---
|