Run a shell script in a code block?

Things I have tried

Template user-defined functions

What I’m trying to do

I’d like to render the output of an arbitrary shell script or program into a page via a code block (i.e. so that it refreshes each time a page is loaded). I can define user defined functions in Templates which return the output of a program, but I can’t find a way to embed those in a code block for dynamic updates.

1 Like

Templater added support for Dynamic Commands a while back which should probably get you what you want. Here’s it in the docs.

2 Likes

Thank you - and so close!! In my use case, I generate markdown. However any generated markdown isn’t interpreted as markdown for some reason.

Can’t remember off the top of my head right now whether it was Dataview or Templater but I’ve used some HTML and that rendered fine. Perhaps, test HTML directly instead of MD.

Hmm that might work well enough; I’ll give it a go. Thanks again

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.