Skip to content

Conversation

@pmeinhardt
Copy link
Owner

  • Rework I/O and read from stdin by default
  • Use minijinja crate to render templates

@pmeinhardt pmeinhardt force-pushed the jinja-templates branch 4 times, most recently from 5c5543f to 1f71ccb Compare December 24, 2025 09:34
By default, we now expect Markdown input to be provided on stdin if no
file path is provided, instead of interpreting "-" as stdin.

Note: This means the command no longer outputs the help content if no
arguments are provided. Instead, it will wait for input from stdin.
Users need to pass `-h` or `--help` to receive help.

Also: We now use the `std::io::Write` trait to harmonize writing command
output to file destinations and stdout.

Also: Added an extra test-case for non-writable destination files.
@pmeinhardt pmeinhardt force-pushed the jinja-templates branch 2 times, most recently from d6c6f9a to a97f088 Compare December 24, 2025 11:08
@pmeinhardt pmeinhardt marked this pull request as ready for review December 24, 2025 11:08
@pmeinhardt
Copy link
Owner Author

pmeinhardt commented Dec 24, 2025

TODO: Check whether we can embed the default template pre-parsed/-compiled.

Note: Looks like minijinja simply still reparses embedded templates anyway (see source code). So we may as well stick with our way of embedding the default template content as a string via include_str!.

This comment was marked as outdated.

This comment was marked as outdated.

@pmeinhardt pmeinhardt merged commit 79c8938 into main Dec 24, 2025
4 checks passed
@pmeinhardt pmeinhardt deleted the jinja-templates branch December 24, 2025 22:06
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.

2 participants