Template assembler that expands include tokens into file contents and copies the result to clipboard.
[[key]][[key]] in the template with the concatenated contents of matching filesxclipThis script is typically used to build prompt or document bundles from multiple source files in a reproducible way.
python prompt_build.py TEMPLATE MAP
Requires
xclipto be installed and available in the system PATH.
TEMPLATE
[[section_name]]MAP
{
"root": "./base_dir",
"section_name": [
"file1.txt",
"dir/*.md"
]
}
root (optional): base directory for resolving relative pathsxclip -selection clipboard)Copied result to clipboard. on successpython prompt_build.py prompt_template.txt mapping.json