/usr/share/doc/stx2any/strip_stx.html is in stx2any 1.56-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>strip_stx</title>
<meta name="author" content="Panu A. Kalliokoski">
<meta name="generator" content="stx2any">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<h1>strip_stx</h1>
<em>a simple literate programming tool</em><br>
<h2>SYNOPSIS</h2>
<p><tt>strip_stx</tt> [ -c <var>commentchars</var> ] [ -B <var>open</var> <var>close</var> ] [ <var>file</var> <var>file</var> … ]
<h2>DESCRIPTION</h2>
<p><tt>strip_stx</tt> takes all structured text (Stx) markup away from the
listed <var>files</var>, leaving only text in preformatted blocks. If no files
are listed, standard input is read instead. The result is written to
standard output.
<p>This is intended as a simple literate programming tool: programmers may
write their programs as documents, processing them with <tt>stx2any</tt> for
documentation and publication but with <tt>strip_stx</tt> for compilation /
running the code.
<p>More information about Stx is on the manpage of <tt>stx2any</tt>.
<h2>OPTIONS</h2>
<dl><dt><tt>-c <var>commentchars</var></tt></dt>
<dd>comment out the non-code portions (text outside preformatted
blocks) with the given <var>commentchars</var> at the beginning of every
line. If this option (or the next one) is not given, non-code
portions are simply deleted.
</dd><dt><tt>-B <var>open</var> <var>close</var></tt></dt>
<dd>surround the non-code portions with (comment-)opening and
closing markers <var>open</var> and <var>close</var> respectively. This option
can be used together with the <tt>-c</tt> option.
</dd><dt><tt>--version</tt>, <tt>-V</tt></dt>
<dd>Just show version information and exit.
</dd><dt><tt>--help</tt>, <tt>-?</tt></dt>
<dd>Just show a short help message and exit.
</dd></dl><h2>EXAMPLES</h2>
<blockquote><p><tt>strip_stx parse.py.stx > parse.py</tt>
</blockquote><p>Strip documentation away from the source file <tt>parse.py.stx</tt>,
supposedly only leaving python code there.
<blockquote><p><tt>strip_stx -B '/*' ' */' -c ' * ' my.c.stx > my.c</tt>
</blockquote><p>Make a literate C code document into proper C source file, leaving the
documentation in neatly-formatted comments.
<blockquote><p><tt>strip_stx -B 'cat < < EOT' 'EOT' embshell.stx > embshell.sh</tt>
</blockquote><p>Turn the document <tt>embshell.stx</tt> into an <q>embedded shell</q> script,
where all non-program portions are printed to the standard output when
execution reaches them. This is akin to PHP or eperl; but <tt>strip_stx</tt>
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 <tt>m4</tt> within <tt>stx2any</tt>.
<h2>SEE ALSO</h2>
<p><tt>stx2any</tt> (1)
<h2>AUTHOR</h2>
<p>This page is written by Panu A. Kalliokoski.
</body>
</html>
|