Injects a Whitespace program into some other file, replacing its white space with Whitespace code.
The output can (in some cases) fulfill the job of both the original file and the Whitespace program.
...or, if you use the scripts in the bin
directory...
This will replace the white space in mydoc.html
with
the Whitespace
from myprog.ws
,
redirecting the output to myprogdoc.html
which will then be a copy of the original program, and also identical to the original HTML document.
The original files are unchanged. The injection result is written to stdout.
Works
best for files where white space is not significant,
for example,
some HTML files, or code in curly bracket languages.
However, it's still likely to fail
in many cases. HTML <pre>
blocks will get messed up.
Code that
relies on line breaks (e.g. //
comments) will get messed up. Python code stands no chance.
If you have injected Whitespace into, say, an HTML file, and you need to update that file's content, don't worry about breaking the Whitespace code. You can alway re-inject it after editing the HTML.
It's the same code example given elsewhere as Whitespace and assembler.