Knap Render API
https://api.findutils.com/api/tools/knap-render/execute Render a Knap template (knap.md, the Markdown template language behind Obsidian Web Clipper and Importer) with a JSON object of variables and return the Markdown. Supports {{ variable | filter:"arg" }} with the 70+ standard filters (bold, h1 to h6, table, list, link, wikilink, callout, yaml_property, date, join, sort, unique, where, replace, upper, kebab and more), {% if %}/{% elseif %}/{% else %}, {% for item in items %} with loop.index, loop.first and loop.last, {% set %}, and {# comments #}. The engine is an AST interpreter with no eval; link and image filters drop javascript: and data: destinations. A syntax error is returned with its line and column. Templates are capped at 200,000 characters and output at 1,000,000.
Request body
application/json-
template
string required
The Knap template text.
-
variables
object required
A JSON object mapping variable names to values (strings, numbers, booleans, arrays, nested objects). {{ title }} reads variables.title.
-
trim_output
boolean optional
Trim leading and trailing whitespace from the rendered Markdown. Default false. Default
false.
Example arguments
Verified{
"template": "# {{ title | trim }}\n\n{% for tag in tags %}- #{{ tag | kebab }}\n{% endfor %}",
"variables": {
"title": " Reading notes ",
"tags": [
"Deep Work",
"focus"
]
}
} More Data tools
- Api Docs Generator Return API documentation generated from a list of endpoints, as Markdown (with table of contents, request/response examples)…
- Bookmarks Html To Csv Convert a browser bookmarks.html export from Chrome, Firefox, Edge, Safari or any other browser that writes the Netscape bookmark format…
- Bookmarks Json To Html Convert a bookmarks JSON file into a Netscape bookmarks.html that Chrome, Firefox, Edge and Safari import.
- Csv Dedupe Remove duplicate rows from a CSV or TSV table.
- Csv Diff Compare two CSV or TSV tables by key column and list the rows that were added, removed or changed - a table diff, not a line diff, so rows…
- Csv To Bookmarks Html Convert a CSV of links into a Netscape bookmarks.html file that Chrome, Firefox, Edge and Safari import.