updating generation code to straight JS
This commit is contained in:
77
CLAUDE.md
77
CLAUDE.md
@@ -1,49 +1,50 @@
|
||||
# CLAUDE.md
|
||||
# Resume Generator with docx-js
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
## Overview
|
||||
This project generates professional Word documents (.docx) from JSON Resume format using the `docx` npm package.
|
||||
|
||||
## Repository Purpose
|
||||
|
||||
This repository generates resumes based on existing resume documents and recent work history. Resumes can be general-purpose or tailored for specific job roles/titles.
|
||||
|
||||
## Output Structure
|
||||
|
||||
All generated resumes must follow this folder structure:
|
||||
```
|
||||
YEAR/ROLE/Resume.md
|
||||
YEAR/ROLE/Resume.pdf (or Resume.docx if PDF not possible)
|
||||
## Setup
|
||||
```bash
|
||||
npm install docx
|
||||
```
|
||||
|
||||
Example: `2025/Security-Director/Resume.md`
|
||||
## Usage
|
||||
1. Place your resume data in `resume.json` following the JSON Resume schema (https://jsonresume.org/schema/)
|
||||
2. Run: `node generate_resume.js`
|
||||
3. Output: `Phillip_Tarrant_Resume_{YEAR}.docx`
|
||||
|
||||
## Output Formats
|
||||
## Key docx-js Patterns
|
||||
|
||||
Every resume generation requires two outputs:
|
||||
1. **Markdown version** - Primary editable format
|
||||
2. **PDF version** - Preferred final format (use MS Word .docx if PDF generation is not possible)
|
||||
### Page Setup
|
||||
- Always set explicit page size (US Letter: 12240 x 15840 DXA, where 1440 DXA = 1 inch)
|
||||
- Set margins in DXA units
|
||||
|
||||
## Source Materials
|
||||
### Text Formatting
|
||||
- Use `TextRun` for text with formatting (bold, italic, size, font)
|
||||
- Size is in half-points (22 = 11pt, 24 = 12pt, 32 = 16pt)
|
||||
- Always specify font explicitly for consistency
|
||||
|
||||
Reference these files in `sources/` when generating resumes:
|
||||
### Lists/Bullets
|
||||
- Never use unicode bullets manually (like "•" in text)
|
||||
- Use `numbering` config with `LevelFormat.BULLET`
|
||||
- Reference the numbering config in paragraphs
|
||||
|
||||
**Resume Documents:**
|
||||
- `sources/Phillip_Tarrant_Resume_2024.docx` - Most recent general resume
|
||||
- `sources/Phillip_Tarrant_Resume_2024_c_level.docx` - Executive/C-level focused version
|
||||
- `sources/Phillip_Tarrant_Resume_2023.docx` - Previous year resume
|
||||
### Critical Rules
|
||||
1. Never use `\n` for line breaks - use separate Paragraph elements
|
||||
2. Always set table `width` when using tables
|
||||
3. PageBreak must be inside a Paragraph
|
||||
4. Use Arial as default font (universally supported)
|
||||
|
||||
**Work History Details:**
|
||||
- `sources/compuquip.md` - Compuquip role accomplishments
|
||||
- `sources/contractor.md` - Recent contract roles
|
||||
- `sources/briarwood.md` - Briarwood experience
|
||||
- `sources/ice.md` - ICE experience
|
||||
- `sources/morgan.md` - Morgan experience
|
||||
- `sources/nwtf.md` - NWTF experience
|
||||
- `sources/tst.md` - TST experience
|
||||
- `sources/older_experience.md` - Earlier career history
|
||||
## Customization
|
||||
- Modify margins in `sections[0].properties.page.margin`
|
||||
- Change fonts by updating the `font` property in TextRun objects
|
||||
- Adjust spacing with `spacing: { before: X, after: Y }` on Paragraphs
|
||||
|
||||
## Resume Generation Workflow
|
||||
|
||||
1. **General resume**: Use 2024 resume as base, incorporate recent history from markdown files
|
||||
2. **Role-specific resume**: Tailor content to emphasize relevant experience for the target role/title
|
||||
3. Create the YEAR/ROLE directory structure before generating files
|
||||
4. Generate both Markdown and PDF/Word outputs
|
||||
## JSON Resume Schema
|
||||
The input JSON should follow the standard JSON Resume format with these sections:
|
||||
- `basics`: name, label, email, phone, url, summary, location, profiles
|
||||
- `work`: array of positions with name, position, startDate, endDate, summary, highlights
|
||||
- `education`: institution, area, studyType, startDate, endDate, score
|
||||
- `certificates`: name, issuer, date
|
||||
- `awards`: title, awarder, date, summary
|
||||
- `skills`: array of skill categories with name, level, keywords
|
||||
|
||||
Reference in New Issue
Block a user