md-2-ats 0.1.0

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+ - Initial project scaffolding (`md-2-ats`): generate ATS-friendly CV/PDF from Markdown.
12
+ - Build tooling with `tsup`, `tsx`, ESLint, TypeScript, and Vitest.
13
+ - CLI binary `md-2-ats` (`md-2-ats <input.md> [options]`) with `--output`,
14
+ `--profile`, `--profile-size`, `--profile-position`, `--font-*`, `--help`,
15
+ and `--version` flags.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Iqmal
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.
package/README.md ADDED
@@ -0,0 +1,238 @@
1
+ <div align="center">
2
+
3
+ <img src="https://raw.githubusercontent.com/junian/commons-media/refs/heads/master/svg/markdown-mark-logo.svg" style="height: 96px;" alt="Markdown Logo" title="Markdown Logo" />
4
+
5
+ # Markdown 2 ATS
6
+
7
+ Write an ATS-friendly resume in Markdown, render it to PDF. Optimized for developers.
8
+
9
+ [![npm](https://img.shields.io/npm/v/md-2-ats?style=for-the-badge&logo=npm&logoColor=white "npm")][npm]
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge "MIT License")][license]
11
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18-339933?style=for-the-badge&logo=node.js&logoColor=white "Node.js")][node]
12
+ [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?&logo=buy-me-a-coffee&logoColor=black&style=for-the-badge "Buy me a Coffee")][coffee]
13
+
14
+ </div>
15
+
16
+ ## About
17
+
18
+ Markdown 2 ATS is a Node.js library that turns a Markdown resume into a clean,
19
+ ATS-friendly PDF. It parses Markdown into a structured document, validates it
20
+ against sensible resume rules, and renders a restrained single-column layout
21
+ that parses reliably through Applicant Tracking Systems.
22
+
23
+ The default template is based on the ATS Standard,
24
+ using a restrained layout, standard PDF fonts, and readable content structure
25
+ so a resume works well for both applicant tracking systems and people.
26
+
27
+ It is a **library**, not an editor or a web app: you call it from your own
28
+ script, CLI, or build step, and you stay in control of your files.
29
+
30
+ I can't guarantee that using this will improve your job search success rate.
31
+ But I hope it helps.
32
+
33
+ See the [Changelog](CHANGELOG.md) for the complete project history and latest changes.
34
+
35
+ ## Notice
36
+
37
+ Output uses standard PDF fonts (Helvetica) by default, which only cover Latin-1
38
+ characters. To render CJK/Kana/Hangul text, provide your own TTF font (see
39
+ [Custom Fonts](#custom-fonts)).
40
+
41
+ ## Features
42
+
43
+ - Write your resume in Markdown and render it to a clean PDF
44
+ - ATS-friendly single-column layout, based on the CareerCup template
45
+ - Automatic page breaking for multi-page resumes
46
+ - Profile photo support (PNG and JPEG)
47
+ - Custom TTF fonts for non-Latin text (e.g. Noto Sans CJK)
48
+ - Theming: font family, sizes, colors, and spacing
49
+ - Supports headings, lists (nested), blockquotes, thematic breaks, and inline formatting
50
+ - ESM and CommonJS builds with TypeScript types included
51
+ - CLI (`md-2-ats`) for one-off renders
52
+ - Works offline and never uploads your data anywhere
53
+
54
+ ## Install
55
+
56
+ ```bash
57
+ pnpm add md-2-ats
58
+ # or: npm install md-2-ats
59
+ ```
60
+
61
+ Requires [Node.js][node] >= 18.
62
+
63
+ ## Usage
64
+
65
+ ```ts
66
+ import { generateCV } from "md-2-ats";
67
+ import { readFile } from "node:fs/promises";
68
+
69
+ await generateCV({
70
+ input: "./cv.md",
71
+ output: "./cv.pdf",
72
+ profile: {
73
+ bytes: await readFile("./profile.png"),
74
+ size: 96,
75
+ position: "right",
76
+ },
77
+ });
78
+ ```
79
+
80
+ ### Options
81
+
82
+ | Option | Type | Description |
83
+ | --------- | -------------- | ----------------------------------------------------- |
84
+ | `input` | `string` | Path to the source Markdown file (required). |
85
+ | `output` | `string` | Path where the PDF is written (required). |
86
+ | `profile` | `ProfileImage` | Profile photo (`bytes`, optional `size`, `position`). |
87
+ | `fonts` | `FontSet` | Custom TTF fonts for non-Latin text (e.g. CJK). |
88
+ | `theme` | `Theme` | Customize fonts, colors, and spacing. |
89
+ | `page` | `PageConfig` | Page size and margins (default A4, 40pt margins). |
90
+
91
+ ### CLI
92
+
93
+ The package ships a `md-2-ats` binary:
94
+
95
+ ```bash
96
+ npx md-2-ats cv.md # after publish; runs the default bin
97
+ md-2-ats cv.md # if installed (local or global)
98
+ md-2-ats cv.md -o out.pdf -p photo.png
99
+ md-2-ats cv.md --profile-position left --profile-size 80
100
+ md-2-ats cv.md --font-regular NotoSansSC-Regular.ttf
101
+ ```
102
+
103
+ | Flag | Description |
104
+ | -------------------------- | ------------------------------------------------ |
105
+ | `-o, --output <path>` | Output PDF path (default: input with `.pdf`). |
106
+ | `-p, --profile <path>` | Profile photo (PNG or JPEG). |
107
+ | `--profile-size <points>` | Profile photo side length (default `96`). |
108
+ | `--profile-position <pos>` | `left` \| `center` \| `right` (default `right`). |
109
+ | `--font-regular <path>` | Custom TTF regular font. |
110
+ | `--font-bold <path>` | Custom TTF bold font. |
111
+ | `--font-italic <path>` | Custom TTF italic font. |
112
+ | `-h, --help` | Show help. |
113
+ | `-v, --version` | Show version. |
114
+
115
+ ### Profile Photo
116
+
117
+ A standalone image in its own paragraph renders as a top-right profile photo:
118
+
119
+ ```markdown
120
+ # Jane Doe
121
+
122
+ ![](profile.png)
123
+
124
+ **Software Engineer** · Jakarta
125
+ ```
126
+
127
+ Supply the photo bytes via the `profile` option; `size` (side length in
128
+ points, default 96) and `position` (`"left" | "center" | "right"`, default
129
+ `"right"`) are optional:
130
+
131
+ ```ts
132
+ profile: {
133
+ bytes: await readFile("./profile.png"),
134
+ size: 96,
135
+ position: "right",
136
+ }
137
+ ```
138
+
139
+ Supported formats: PNG and JPEG. When no profile is provided, the image is
140
+ skipped silently.
141
+
142
+ ### Custom Fonts
143
+
144
+ Standard fonts only cover Latin-1. To render CJK/Kana/Hangul, provide a TTF
145
+ font (e.g. [Noto Sans SC][noto]):
146
+
147
+ ```ts
148
+ await generateCV({
149
+ input: "./cv.md",
150
+ output: "./cv.pdf",
151
+ fonts: {
152
+ regular: await readFile("./NotoSansSC-Regular.ttf"),
153
+ bold: await readFile("./NotoSansSC-Bold.ttf"), // optional
154
+ italic: await readFile("./NotoSansSC-Italic.ttf"), // optional
155
+ },
156
+ });
157
+ ```
158
+
159
+ `bold`/`italic` fall back to `regular` when omitted. Font files are your
160
+ responsibility (check their license). `.ttc` collections are not supported;
161
+ use a single `.ttf`/`.otf`.
162
+
163
+ ### Theming
164
+
165
+ ```ts
166
+ import { createDefaultTheme } from "md-2-ats";
167
+
168
+ const theme = createDefaultTheme();
169
+ theme.text.body.family = "Times"; // "Helvetica" | "Times" | "Courier"
170
+ theme.text.name.size = 24;
171
+ theme.color.accent = { r: 0.1, g: 0.2, b: 0.5 };
172
+ theme.spacing.sectionGap = 8;
173
+
174
+ await generateCV({ input: "./cv.md", output: "./cv.pdf", theme });
175
+ ```
176
+
177
+ ### Validation
178
+
179
+ `generateCV` validates the document before rendering:
180
+
181
+ - **Errors** (throw): empty document, missing the level-1 `# Name` heading.
182
+ - **Warnings** (returned in `result.issues`): missing contact/email, invalid
183
+ email, heading-level skips, missing `## Experience`/`## Education`, empty
184
+ entries, and unsupported Markdown.
185
+
186
+ ```ts
187
+ const result = await generateCV({ input, output });
188
+ for (const issue of result.issues) console.warn(issue.message);
189
+ ```
190
+
191
+ ## Markdown Support
192
+
193
+ Supported blocks: headings (`#`–`###`), paragraphs, unordered/ordered lists
194
+ (including nested), blockquotes, thematic breaks (`---`), and inline formatting
195
+ (bold, italic, links, images, inline code).
196
+
197
+ Not rendered (reported as warnings): tables, code blocks, raw HTML.
198
+
199
+ ## Development
200
+
201
+ Clone the repo and install dependencies:
202
+
203
+ ```bash
204
+ pnpm install
205
+ ```
206
+
207
+ Run the test suite and type-checking:
208
+
209
+ ```bash
210
+ pnpm test
211
+ pnpm typecheck
212
+ ```
213
+
214
+ Build the library:
215
+
216
+ ```bash
217
+ pnpm build
218
+ ```
219
+
220
+ Render the bundled example (`example/cv.md` → `example/cv.pdf`):
221
+
222
+ ```bash
223
+ pnpm example
224
+ ```
225
+
226
+ ## License
227
+
228
+ This project is licensed under the [MIT](LICENSE) license.
229
+
230
+ ---
231
+
232
+ Made with ☕ by [Iqmal](https://github.com/iqmalriy).
233
+
234
+ [node]: https://nodejs.org/ "Node.js"
235
+ [noto]: https://fonts.google.com/noto/specimen/Noto+Sans+SC "Noto Sans SC"
236
+ [npm]: https://www.npmjs.com/package/md-2-ats "md-2-ats on npm"
237
+ [license]: https://opensource.org/license/mit "MIT License"
238
+ [coffee]: https://buymeacoffee.com/iqmal "Buy Iqmal a Coffee"