strip_stx [ -c commentchars ] [ -B open close ] [ file file … ]
strip_stx takes all structured text (Stx) markup away from the listed files, leaving only text in preformatted blocks. If no files are listed, standard input is read instead. The result is written to standard output.
This is intended as a simple literate programming tool: programmers may write their programs as documents, processing them with stx2any for documentation and publication but with strip_stx for compilation / running the code.
More information about Stx is on the manpage of stx2any.
strip_stx parse.py.stx > parse.py
Strip documentation away from the source file parse.py.stx, supposedly only leaving python code there.
strip_stx -B '/*' ' */' -c ' * ' my.c.stx > my.c
Make a literate C code document into proper C source file, leaving the documentation in neatly-formatted comments.
strip_stx -B 'cat < < EOT' 'EOT' embshell.stx > embshell.sh
Turn the document embshell.stx into an embedded shell
script,
where all non-program portions are printed to the standard output when
execution reaches them. This is akin to PHP or eperl; but strip_stx
is not really meant for this. There are other options for making
embedded scripts, such as defining your own markup for the code portions
or handling the program logic with m4 within stx2any.
stx2any (1)
This page is written by Panu A. Kalliokoski.