Skip to content

Eldritch file.template_str#2150

Merged
hulto merged 6 commits intospellshift:mainfrom
deciphr:eldritch-template-str
Mar 28, 2026
Merged

Eldritch file.template_str#2150
hulto merged 6 commits intospellshift:mainfrom
deciphr:eldritch-template-str

Conversation

@deciphr
Copy link
Copy Markdown
Contributor

@deciphr deciphr commented Mar 27, 2026

Added new file function: file.template_str

Rather than reading a Jinja2 template file from disk, template_str accepts a Jinja2 template string directly, renders it using the provided args, and returns the result as a string.

closes #203

Copy link
Copy Markdown
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great first PR! Couple comments but looks really good otherwise.

Comment thread docs/_docs/user-guide/eldritch.md
Comment thread implants/lib/eldritch/stdlib/eldritch-libfile/Cargo.toml Outdated
Comment thread implants/lib/eldritch/stdlib/eldritch-libfile/src/std/template_str_impl.rs Outdated
@deciphr
Copy link
Copy Markdown
Contributor Author

deciphr commented Mar 28, 2026

@hulto Should be good now!

@hulto hulto enabled auto-merge March 28, 2026 00:45
@hulto hulto added this pull request to the merge queue Mar 28, 2026
Merged via the queue into spellshift:main with commit d0af42a Mar 28, 2026
8 of 9 checks passed
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.

Allow file template to take a string for the template instead of a file path.

2 participants