Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add plain text output format#764

Open
eldios wants to merge 1 commit into
rendercv:mainrendercv/rendercv:mainfrom
eldios:feat/plain-text-renderereldios/rendercv:feat/plain-text-rendererCopy head branch name to clipboard
Open

Add plain text output format#764
eldios wants to merge 1 commit into
rendercv:mainrendercv/rendercv:mainfrom
eldios:feat/plain-text-renderereldios/rendercv:feat/plain-text-rendererCopy head branch name to clipboard

Conversation

@eldios

@eldios eldios commented Jul 23, 2026

Copy link
Copy Markdown

Closes #763

What

Adds a plain text (.txt) output format alongside the existing PDF, Typst, Markdown, HTML and PNG outputs, as proposed in #763.

  • New generate_text() renderer (renderer/text.py), same structure as the Markdown renderer
  • New Jinja template set under templater/templates/text/ (header, section begin/end, one template per entry type)
  • markdown_to_plain_text() in the Markdown parser: emphasis and code markers stripped, links rendered as label (url) when the URL adds information over the link text
  • Plain text connection formatting (compute_connections_for_text)
  • text_path and dont_generate_text settings, --text-path / --dont-generate-text CLI options, wired through the model builder
  • Entry templates now receive entry_index and entries_count, so numbered entries can carry real numbers in formats that have no renderer doing the numbering; existing templates do not use them, so there is no behavior change
  • Docs updated (user guide index and settings page), JSON schema and example YAMLs regenerated

The regenerated binary artifacts (example PDFs, PNGs, Typst files) are intentionally left out to keep the diff reviewable; the generated-files tests only require the example YAMLs and schema.json to be current.

User template overrides work exactly as for the other formats: placing a text/ directory next to the input file allows full restyling of the txt output (80-column layouts, ASCII tables, custom headers) without touching the core.

Test plan

Ran the full test suite and regenerated the reference files with just update-testdata, which produced the new tests/renderer/testdata/test_text/ references for the minimal and full models. Added unit tests for markdown_to_plain_text(). Also rendered a complete real-world CV to text and reviewed the output side by side with the Markdown and PDF versions.

@eldios
eldios force-pushed the feat/plain-text-renderer branch 2 times, most recently from 46893c6 to 8d6a7a5 Compare July 23, 2026 22:33
@eldios
eldios force-pushed the feat/plain-text-renderer branch from 8d6a7a5 to 3b508db Compare July 23, 2026 22:35
@eldios

eldios commented Jul 23, 2026

Copy link
Copy Markdown
Author

About the failing pre-commit check: the ty-check hook installs ty with >=0.0.24, so it picks up the latest release, and recent ty versions report errors on files this PR does not touch. Running the same hook locally with ty pinned to the version resolved in uv.lock (0.0.24), the whole pre-commit suite passes, ty-check included. I left the hook configuration untouched here since it is not part of this change; happy to update the pin in a separate PR if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plain text (.txt) output format

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.