202 lines
5.5 KiB
HTML
202 lines
5.5 KiB
HTML
|
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||
|
|
||
|
<html>
|
||
|
|
||
|
<head>
|
||
|
<!-- steal these colour values from JavaDocs; meh -->
|
||
|
<style type = "text/css">
|
||
|
a:link, a:visited { color: #4a6782; }
|
||
|
a:hover, a:focus { color: #bb7a2a; }
|
||
|
a:active { color: #4A6782; }
|
||
|
tr:nth-child(even) { background: #dee3e9; }
|
||
|
div {
|
||
|
margin: 4px 0;
|
||
|
padding: 0 4px 4px 4px;
|
||
|
}
|
||
|
table { width: 100%; }
|
||
|
td { padding: 4px; }
|
||
|
h3, h1 {
|
||
|
color: #2c4557;
|
||
|
background-color: #dee3e9;
|
||
|
padding: 4px;
|
||
|
}
|
||
|
h3 {
|
||
|
margin: 0 -4px;
|
||
|
padding: 4px;
|
||
|
}
|
||
|
</style>
|
||
|
<title>Recursor</title>
|
||
|
</head>
|
||
|
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<h1>Recursor</h1>
|
||
|
|
||
|
<ul>
|
||
|
<li><a href = "#_declarations">Declarations</a></li>
|
||
|
<li><a href = "#_summary">Function Summary</a></li>
|
||
|
<li><a href = "#_detail">Function Detail</a></li>
|
||
|
</ul>
|
||
|
|
||
|
<p>
|
||
|
Copyright 2008, 2012 Neil Edelman, distributed under the terms of the
|
||
|
GNU General Public License, see copying.txt
|
||
|
</p>
|
||
|
<p>
|
||
|
<em>Recursor</em> is the main part of <em>MakeIndex</em>, a content management system that
|
||
|
generates static content, (mostly index.html,) on all the directories rooted
|
||
|
at the directory specified by <em>--directory</em> or <em>-d</em>. It is based on a template
|
||
|
file, <em>.index.html</em> and <em>.newsfeed.rss</em>, which are changeable. Also included
|
||
|
are files to summarise the directory structure for a <em>xml</em> site map,
|
||
|
compatible with Google, and any <em>.news</em> for an <em>rss</em> feed.
|
||
|
</p>
|
||
|
<p>
|
||
|
There should be an <example> directory that has a bunch of files in it. Run
|
||
|
<em>bin/MakeIndex -d example/</em>; it should make a webpage out of the directory
|
||
|
structure and <em>.index.html</em>, open <em>example/index.html</em> after running to see.
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>
|
||
|
If the <em>.index.html</em> file exists in the <directory>, prints <index.html>
|
||
|
recursively; overwrites any <em>index.html</em> on all the directories rooted at
|
||
|
<directory>;
|
||
|
</li>
|
||
|
<li>
|
||
|
if the <em>.sitemap.xml</em> file exists in <directory>, prints (and overwrites) an
|
||
|
index called <em>sitemap.xml</em>;
|
||
|
</li>
|
||
|
<li>
|
||
|
if the <em>.newsfeed.rss</em> file exists in <directory>, prints (and overwrites)
|
||
|
to <em>newsfeed.rss</em> all the <em>.news</em> files (if there are any.)
|
||
|
</li>
|
||
|
</ul>
|
||
|
<ul>
|
||
|
<li>
|
||
|
Treats <em>.d</em> as a description of the file without the <em>.d</em>;
|
||
|
if this is an empty text-file or a zero-byte file, it skips over this file.
|
||
|
</li>
|
||
|
<li>
|
||
|
treats <em>index.d</em> as a description of the directory;
|
||
|
</li>
|
||
|
<li>
|
||
|
treats <em>content.d</em> as an in-depth description of the directory,
|
||
|
replacing <index.d> when in the directory;
|
||
|
</li>
|
||
|
<li>
|
||
|
treats <em>.d.jpg</em> as a image that will go with the description;
|
||
|
</li>
|
||
|
<li>
|
||
|
treats <em>.news</em> as a newsworthy item; the format of this file is ISO 8601
|
||
|
date (YYYY-MM-DD,) next line title;
|
||
|
</li>
|
||
|
<li>
|
||
|
treats <em>.link</em> as a link with the href in the file.
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p>
|
||
|
<em>.index.html</em>, <em>.sitemap.xml</em>, <em>.newsfeed.rss</em>, see <em>Parser</em> for recognised
|
||
|
symbols. Assumes '..' is the parent directory, '.' is the current directory,
|
||
|
and '/' is the directory separator; works for UNIX, MacOS, and Windows. If
|
||
|
this is not the case, the constants are in <em>Files.c</em>.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt>minimum standard</dt>
|
||
|
<dd>POSIX.1</dd>
|
||
|
<dt>author</dt>
|
||
|
<dd>Neil</dd>
|
||
|
<dt>version</dt>
|
||
|
<dd>2018-03 Removed version numbers.</dd>
|
||
|
<dt>since</dt>
|
||
|
<dd>1.1; 2017-03 Fixed pedantic warnings; command-line improvements.
|
||
|
1.0; 2016-09-19 Added umask.
|
||
|
0.8; 2013-07 Case-insensitive sort.
|
||
|
0.7; 2012 <em>sth.dsth.d</em> handled properly.
|
||
|
0.6; 2008-03-27 Made something out of an earlier work.</dd>
|
||
|
<dt>fixme</dt>
|
||
|
<dd>Don't have <directory> be an argument; just do it in the current.</dd>
|
||
|
<dt>fixme</dt>
|
||
|
<dd>Borrow <em>Cdoc</em> parser for the <em>.d</em> files.</dd>
|
||
|
<dt>fixme</dt>
|
||
|
<dd>Encoding is an issue; especially the newsfeed, which requires 7-bit.</dd>
|
||
|
<dt>fixme</dt>
|
||
|
<dd>It's not robust; eg @(files)<em>@(files){Don't do this.}</em>.</dd>
|
||
|
<dt>fixme</dt>
|
||
|
<dd>Simplify the command line arguments.</dd>
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
<a name = "_declarations"><!-- --></a><h2>Declarations</h2>
|
||
|
|
||
|
<div><a name = "struct Recursor"><!-- --></a>
|
||
|
<h3>struct Recursor</h3>
|
||
|
<pre><b>struct Recursor</b></pre>
|
||
|
<p>
|
||
|
See <a href = "#Recursor">Recursor</a>.
|
||
|
</p>
|
||
|
<dl>
|
||
|
</dl>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<a name = "_summary"><!-- --></a><h2>Function Summary</h2>
|
||
|
|
||
|
<table>
|
||
|
<tr><th>Return Type</th><th>Function Name</th><th>Argument List</th></tr>
|
||
|
<tr>
|
||
|
<td>struct Recursor *</td>
|
||
|
<td><a href = "#Recursor">Recursor</a></td>
|
||
|
<td>const char *idx, const char *map, const char *news</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>void</td>
|
||
|
<td><a href = "#Recursor_">Recursor_</a></td>
|
||
|
<td>void</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>int</td>
|
||
|
<td><a href = "#RecursorGo">RecursorGo</a></td>
|
||
|
<td>void</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
<a name = "_detail"><!-- --></a><h2>Function Detail</h2>
|
||
|
|
||
|
<div><a name = "Recursor"><!-- --></a>
|
||
|
<h3>Recursor</h3>
|
||
|
<pre>struct Recursor * <b>Recursor</b> (const char *idx, const char *map, const char *news)</pre>
|
||
|
<dl>
|
||
|
<dt>parameter: idx</dt>
|
||
|
<dd>file name of the prototype index file, eg, ".index.html".</dd>
|
||
|
<dt>parameter: map</dt>
|
||
|
<dd>file name of the prototype map file, eg, ".sitmap.xml".</dd>
|
||
|
<dt>parameter: news</dt>
|
||
|
<dd>file name of the prototype news file, eg, ".newsfeed.rss".</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
|
||
|
<div><a name = "Recursor_"><!-- --></a>
|
||
|
<h3>Recursor_</h3>
|
||
|
<pre>void <b>Recursor_</b> (void)</pre>
|
||
|
<p>
|
||
|
Destructor.
|
||
|
</p>
|
||
|
<dl>
|
||
|
</dl>
|
||
|
</div>
|
||
|
|
||
|
<div><a name = "RecursorGo"><!-- --></a>
|
||
|
<h3>RecursorGo</h3>
|
||
|
<pre>int <b>RecursorGo</b> (void)</pre>
|
||
|
<p>
|
||
|
Actually does the recursion.
|
||
|
</p>
|
||
|
<dl>
|
||
|
</dl>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|