415 Commits

Author SHA1 Message Date
Sikai Zhang
3b6f20ff95 Fix custom fonts folder not found when using relative input path (#692) 2026-03-21 02:40:50 +03:00
Sina Atalay
da94718587 Update dev tooling and dependencies to latest versions
Bump black (26.3.1), ruff (0.15.7), ty (0.0.24), prek (0.3.6), typer
(0.24.1), and codespell (v2.4.2). Add ty:ignore comments and type
annotations to satisfy stricter checks in ty 0.0.24. Make skill zip
generation reproducible with a fixed timestamp.
2026-03-21 01:20:17 +03:00
Sina Atalay
70d9efcb66 Fix #595: Auto-create intermediate dicts for CLI overrides on missing keys
When using CLI overrides like `--design.theme "moderncv"` with a separate
design file, `update_value_by_location` crashed with `KeyError: 'design'`
because intermediate dictionary keys were not auto-created during traversal.
Now missing intermediate keys are initialized as empty dicts, allowing
overrides to work regardless of whether the target section exists in the
main YAML.
2026-03-21 01:03:32 +03:00
Sina Atalay
d9864d9495 Revert "Fix #689: Allow arbitrary font names in JSON schema while keeping enum suggestions"
This reverts commit 9ebcebd3ccc6abee3c71c07c884488614044b958.
2026-03-21 01:03:32 +03:00
Sina Atalay
295ae6185b Fix #653: Allow SUMMARY placeholder to be used inline in templates
process_summary() unconditionally wrapped summary text in Markdown admonition
syntax (!!! summary), which only works as a block-level construct on its own
line. When users placed SUMMARY inline in a template (e.g., "**COMPANY**,
SUMMARY"), the admonition syntax broke rendering.

Now render_entry_templates() checks if SUMMARY appears on its own line in
the template. If standalone, admonition wrapping is applied for the special
#summary[] Typst formatting. If inline, the raw summary text is used directly.
2026-03-21 01:03:32 +03:00
Sina Atalay
d5c1e724fa Fix #690: Load design/locale overlay files from YAML settings.render_command
When users specified design or locale overlay file paths in their YAML via
settings.render_command.design or settings.render_command.locale, these were
parsed but never actually loaded as overlays. Only CLI flags (--design,
--locale) triggered overlay loading.

Now cli_command_render resolves these paths from the YAML (via the existing
collect_input_file_paths helper) before building arguments, so overlay files
referenced in settings are loaded the same way as CLI-provided ones.
2026-03-21 01:03:32 +03:00
Sina Atalay
847e4f9ea3 Fix #689: Allow arbitrary font names in JSON schema while keeping enum suggestions
The FontFamily JSON schema used a strict enum that rejected custom and system
fonts like Georgia. Changed from SkipJsonSchema[str] to plain str in the union
type, so the generated schema uses anyOf with both the known font enum (for
editor autocomplete) and a generic string type (for arbitrary fonts).
2026-03-21 01:03:32 +03:00
Sina Atalay
21e3cd7f33 Fix #673: Make copied template files writable for immutable distros
On NixOS and other immutable distributions, package files in the store are
read-only. shutil.copytree preserves source permissions, so copied template
files remain read-only. This causes PermissionError when create-theme tries
to write __init__.py into the copied directory.

Added make_tree_writable() that adds user-write permission to all files and
directories after copying. Called automatically by copy_templates().
2026-03-21 01:03:32 +03:00
Sina Atalay
e80ecfc559 Fix #685: Process markdown lines independently to prevent cross-line emphasis interference
When multi-line template fields (like main_column) contained markdown emphasis
markers on adjacent lines, the Python markdown library treated single-newline-
separated lines as one paragraph, causing markers to interact across lines and
produce garbled Typst output with mismatched brackets.

The fix processes each line of input independently in markdown_to_typst() while
preserving multi-line admonition blocks. This prevents emphasis markers on one
line from interfering with markers on adjacent lines.
2026-03-21 01:03:32 +03:00
Noah Croghan
fb9b0e9295 Fix EducationEntry location placement in markdown reference file (#691)
* Fix EducationEntry location placement

* Fix EducationEntry location placement in markdown reference file

---------

Co-authored-by: simonafield <simon.techkid@outlook.com>
2026-03-21 00:26:30 +03:00
Sina Atalay
9bc8c2862c Add Ink, Opal, and Ember themes with examples, docs, and test data
Ink: elegant academic theme with EB Garamond and purple palette.
Opal: modern minimalist with Lato and teal accents.
Ember: editorial theme with mixed Gentium Book Plus/Ubuntu fonts,
crimson accents, diamond bullets, and justified-with-no-hyphenation.

Updates README theme grid from 2x3 to 3x3 to showcase all 9 themes.
2026-03-20 21:25:38 +03:00
Sina Atalay
9b83f07ac9 Move distributable skill to rendercv/rendercv-skill submodule
The skill file lived in the main repo, which meant `npx skills add`
had to clone the entire RenderCV codebase and exposed internal dev
skills. A dedicated lightweight repo solves both problems.

- Create rendercv/rendercv-skill repo as a read-only distribution channel
- Add it as a submodule at .claude/skills/rendercv-skill/
- Update generation script and tests to write to the submodule path
- Add submodules: true to test workflow checkout steps
- Update docs, README, and install commands to use rendercv/rendercv-skill
- Add --recursive clone instruction to developer guide
- Delete the old skills/ directory at repo root
2026-03-20 20:41:53 +03:00
Sina Atalay
021c9fbde3 Add RenderCV skill with eval framework and auto-generated docs/llms.txt
- Add SKILL.md for AI agents: YAML schema reference, entry type field
  tables, design samples per theme, CLI reference, and important patterns
  (YAML quoting, phone validation, bullet characters)
- Add Jinja2 template and generate.py that auto-generates SKILL.md and
  docs/llms.txt from live Pydantic models and sample generators
- Add promptfoo eval suite (15 tests across 4 files): cv_generation,
  pdf_parsing, design, and cli_workflow
- Add deterministic grader that validates LLM output through RenderCV's
  own pydantic pipeline (not jsonschema)
2026-03-20 20:15:09 +03:00
Sina Atalay
bc87090b96 Add tests for uncovered edge cases in pdf_png and sample_generator 2026-03-20 18:30:02 +03:00
Sina Atalay
009eec5dfb Bundle rendercv-typst inside the Python package to decouple from Typst Universe
Move `rendercv-typst/` into `src/rendercv/renderer/rendercv_typst/` so that
`lib.typ` and `typst.toml` ship with every pip install. This eliminates the
runtime dependency on Typst Universe, allowing releases without waiting for
external PR reviews. The wheel excludes non-essential files (examples, template,
README, etc.) via `[tool.uv.build-backend]` wheel-exclude.
2026-03-20 18:18:04 +03:00
Sina Atalay
5927cf0d00 Update Harvard theme 2026-03-20 16:52:35 +03:00
Sina Atalay
4e07fa2380 Add centered section title types and bump rendercv-typst to 0.3.0
Add four new section title styles: `centered_without_line`,
`centered_with_partial_line` (baseline), `centered_with_centered_partial_line`
(middle-aligned), and `centered_with_full_line`. These allow section headings
to be centered with various line decorations, complementing the existing
left-aligned options.
2026-03-20 05:20:10 +03:00
Sina Atalay
9b7830a0e1 Create new theme: harvard 2026-03-19 23:03:18 +03:00
Sina Atalay
0c45adf776 Fix formatting and linting issues 2026-03-19 22:28:33 +03:00
Sina Atalay
7138cee196 Fix orphaned connector words when placeholders are removed from templates
When a placeholder like DEGREE was missing from an education entry, the
locale phrase "DEGREE in AREA" left the connector word "in" behind,
producing output like "Princeton University, in Computer Science". This
affected all locales with connector words (en, em, di, at, etc.).

The fix adds a general-purpose `remove_connectors_of_missing_placeholders`
step inside `remove_not_provided_placeholders` that strips bare connector
words from separators between placeholders when either side is missing.
This works for any template, not just locale phrases — for example,
"JOB_TITLE at COMPANY" now correctly drops "at" when COMPANY is absent.
2026-03-19 22:17:00 +03:00
Sina Atalay
4c617170e8 Clean up characters around empty string inputs 2026-03-04 04:21:34 +03:00
Sina Atalay
da2e657416 Increase test coverage 2026-03-03 16:39:23 +03:00
Sina Atalay
9e773d64d0 Only catch full words in settings.bold_keywords 2026-03-03 01:02:57 +03:00
Sina Atalay
eb3cc3406c Remove ex unit from TypstDimension 2026-03-02 19:08:26 +03:00
Sina Atalay
1bd0277edb Allow empty sections 2026-03-02 18:36:52 +03:00
Sina Atalay
6097889a5b Enforce all fields to be defined in other locales folder 2026-03-02 17:37:50 +03:00
Sina Atalay
b4bea9e948 Allow URLs for cv.photo field 2026-03-02 17:35:30 +03:00
Sina Atalay
314dbb89f2 Remove common system font families from the schema 2026-03-02 16:59:51 +03:00
Sina Atalay
b1db1bb31f Remove llms.txt and add more sample generators 2026-02-19 14:53:15 +03:00
Sina Atalay
49a95fd9f1 Fix tests 2026-02-18 17:51:47 +03:00
Sina Atalay
01eab150e5 Add Hebrew and Persian locales 2026-02-18 17:24:42 +03:00
Sina Atalay
87c7640322 Fix settings.current_date issues 2026-02-18 15:46:06 +03:00
Sina Atalay
fd5409c142 Support "today" in settings.current_date 2026-02-18 02:38:41 +03:00
Sina Atalay
f974b6d9e9 Better YAML error handling 2026-02-17 18:42:08 +03:00
Sina Atalay
2b080300db Add pyodide tests 2026-02-17 17:04:12 +03:00
Diorcet Yann
d0b2e12b3b Add settings.pdf_title field in order to customize the title of produced documents (#624)
* cv section: add title field in order to customize the title of produced documents

* Sync branch with origin/main

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Implement

* Use NAME - CV as pdf_title

---------

Co-authored-by: Sina Atalay <79940989+sinaatalay@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:48:40 +03:00
husam515
4a9083c117 Add Arabic locale support (#591)
* feat: Add Arabic locale support and update Typst preamble template.

* feat: add rtl support for the Full.html template

* fix: change  "'s CV" hardcoded word in the html/md outputs and make it changeable to support different languages.

* test: add tests for RTL support

* test: add tests for RTL support

* Improve implementation

* Update testdata

* Fix merge issues

* Simplify

* Add test and use type hints with type adapters

* Fix `just check` errors

---------

Co-authored-by: Khalid <khalid.pro.968@gmail.com>
Co-authored-by: Sina Atalay <79940989+sinaatalay@users.noreply.github.com>
2026-02-17 14:19:11 +03:00
Sina Atalay
9611320502 Add degree_width field to design.entries (#671)
* Add `design.entries.degree_width` field #649

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Bump rendercv typst version to 0.2.0

* Update testdata

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:03:07 +03:00
lif
abfe1e1733 feat: add --output-folder option to specify output directory (#578)
* feat: add --output-folder option to specify base output directory

This addresses issue #551 by adding support for customizing the output
folder for all generated files.

Changes:
- Add `output_folder` field to RenderCommand model
- Add `--output-folder` / `-o` CLI option
- When output_folder is set, it replaces the default `rendercv_output`
  folder in all output paths
- Support OUTPUT_FOLDER placeholder for advanced path customization
- Add comprehensive test coverage

Usage examples:
  # Simple: output all files to build/en/
  rendercv render cv.yaml --output-folder build/en/

  # Advanced: use OUTPUT_FOLDER placeholder for custom paths
  rendercv render cv.yaml --output-folder dist/ \
    --pdf-path OUTPUT_FOLDER/final/resume.pdf

Closes #551

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: address linting errors and Windows compatibility

- Fix PIE810: use tuple in startswith() call
- Fix ruff format issues
- Make tests cross-platform compatible for Windows

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: split compound assertions per PT018 rule

* Improve and update examples and schema

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Sina Atalay <79940989+sinaatalay@users.noreply.github.com>
2026-02-17 00:01:19 +03:00
pramanandasarkar02
cfdaf9cb0f Fix render --quiet option issue #608 (#610)
* fix render --quiet option issue #608

* format fixed

* Improve solution

---------

Co-authored-by: Sina Atalay <79940989+sinaatalay@users.noreply.github.com>
2026-02-16 21:34:51 +03:00
lif
18485d7185 feat: watch mode now monitors included config files (#579)
* feat: watch mode now monitors included config files

Watch mode (--watch/-w) now monitors changes to included configuration
files specified via --design, --locale-catalog, and --settings options.

Previously, watch mode only monitored the main input file. Now when
using separate config files for design/locale/settings, changes to
any of these files will trigger a re-render.

Fixes #552

* Improve implementation

* Update testdata

* Fix pre-commit errors

* Update testdata

---------

Co-authored-by: Sina Atalay <79940989+sinaatalay@users.noreply.github.com>
2026-02-16 21:22:13 +03:00
Daniel Rafailov
3685da2b31 Automatically delete obsolete PNG files (#590)
* #588

* formatting issue fix

* Add tests

* Update uv.lock and testdata

---------

Co-authored-by: Sina Atalay <79940989+sinaatalay@users.noreply.github.com>
2026-02-16 20:18:49 +03:00
Sina Atalay
bb4349ac57 Implement locale.phrases (#618) 2026-02-16 19:24:39 +03:00
shraddha khetmalis
9b26e3b4a1 Feature/add day placeholder to single date formatting (fixes #548) (#571) (#571)
- Add DAY placeholders to single date formatting
- Add tests for DAY placeholders
- Apply ruff formatting
- fix: expose DAY placeholders in top note and footer templates
- fix: apply ruff formatting for DAY placeholders
- refactor: extract build_date_placeholders, add DAY/DAY_IN_TWO_DIGITS support

Co-authored-by: Sina Atalay <79940989+sinaatalay@users.noreply.github.com>
2026-02-16 15:42:12 +03:00
Anders Gaustad
710d4a1825 feat(locale): Added Norwegian (Bokmål and Nynorsk) locale (#652)
* feat(locale): Added Norwegian (Bokmål and Nynorsk) locale

Added the two official writing standards for Norwegian:
Norwegian Bokmål and Norwegian Nynorsk.

Updated `english_locale-py` with the ISO 639-1 codes of 'nb' and 'nn'.

* Fix Nynorsk typo, regenerate schema, and add trailing newlines

- Fix Nynorsk "present" translation: "noverande" → "nåverande"
- Regenerate schema.json via update_schema.py instead of manual edits
- Add missing trailing newlines to both YAML files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Sina Atalay <79940989+sinaatalay@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 15:08:08 +03:00
Sina Atalay
e9db78b127 Make PyPI version check non-blocking (thanks for the idea #615) 2026-02-16 14:52:17 +03:00
Jordan Bradford
a7b6e9a2d5 feat: Add Reddit social network (#658)
* Add Reddit social network

* Run `pre-commit`
2026-02-16 14:33:21 +03:00
Sina Atalay
2f9e8ad476 Improve Pydantic error handling for multiple YAML sources 2026-02-16 04:32:34 +03:00
Sina Atalay
04bd9197cd Improve schema model builder 2026-02-16 03:57:54 +03:00
Tanmay Pathak
d6fcf1d390 fix: 🐛 design file not applying with settings file (#642)
* test: 🧪 design file applies with settings file

* fix: preserve design/locale paths when using --settings flag

* test: 🧪 skipping render commands works

* fix: ensure render_command settings are initialized in build_rendercv_dictionary

* fix: prefix unused variable with underscore to satisfy ruff RUF059
2026-02-16 02:23:26 +03:00