Skip to content

Alternate Uses

Dewayne VanHoozer edited this page Jul 5, 2022 · 4 revisions

Alternate Uses

justprep is basically a brain-dead m4 and I don't mean Apple Silicon but I am looking forward to Apple's M5 SOC to see how close they come to the Star Trek version.

If you ignore the "module" processing of the fake module convention, then what justprep is basically a single-level text file includer. It has header and footer lines to mark the veginning and ending of where the inserted text went, but, if I were to implement some command line options to turn those off, you could use justprep on any kind of text file.

So for example you had a directory of markdown files where you wanted to include the same header and footer text in each markdown file. You might setup one of the content files like this:

include header.md

stuff ... yada yada ... more stuff

include footer.md

The current version of justprep (1.2.3) does not have sufficient flexibility to make this a real labor saving function but maybe it could.

What if we make JUSTPREP_FILENAME_IN a directory rather than a file. Same thing for JUSTPREP_FILENAME_OUT as a directory. Then when justprep is run it looks at every file in the input directory for those JUSTPREP_KEYWORDS when found it does the inclusion process and puts the resulting file with the same filename into the JUSTPREP_FILENAME_OUT directory.

That capability does not currently exists but maybe it would be useful.

Clone this wiki locally