2017-03-23 02:45:12 -04:00
|
|
|
<!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>
|
2017-03-26 04:47:35 -04:00
|
|
|
<title>Parser</title>
|
2017-03-23 02:45:12 -04:00
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2017-03-26 04:47:35 -04:00
|
|
|
<h1>Parser</h1>
|
2017-03-23 02:45:12 -04:00
|
|
|
|
|
|
|
<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
|
2017-03-26 04:47:35 -04:00
|
|
|
GNU General Public License, see copying.txt
|
2017-03-23 02:45:12 -04:00
|
|
|
</p>
|
|
|
|
<p>
|
2017-03-26 04:47:35 -04:00
|
|
|
<em>MakeIndex</em> is a simple content management system that generates static
|
|
|
|
content, (mostly index.html,) on all the directories rooted at the directory
|
|
|
|
specified by the argument. It is based on a template file, ".index.html" and
|
|
|
|
".newsfeed.rss". 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. It takes one argument, <directory>, which is the root of the recursion.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
There should be an <example> directory that has a bunch of files in it. Run
|
|
|
|
<em>bin/MakeIndex 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, Windows.
|
|
|
|
If this is not the case, the constants are in <em>Files.c</em>.
|
2017-03-23 02:45:12 -04:00
|
|
|
</p>
|
|
|
|
<dl>
|
2017-03-26 04:47:35 -04:00
|
|
|
<dt>minimum standard</dt>
|
|
|
|
<dd>C89/90</dd>
|
|
|
|
<dt>author</dt>
|
2017-03-23 02:45:12 -04:00
|
|
|
<dd>Neil</dd>
|
2017-03-26 04:47:35 -04:00
|
|
|
<dt>version</dt>
|
|
|
|
<dd>1.1; 2017-03 fixed pedantic warnings; took out arg</dd>
|
|
|
|
<dt>since</dt>
|
|
|
|
<dd>1.0; 2016-09-19 Added umask
|
|
|
|
0.8; 2013-07 case-insensitive sort
|
|
|
|
0.7; 2012 sth.dsth.d handled properly
|
|
|
|
0.6; 2008-03-27</dd>
|
|
|
|
<dt>fixme</dt>
|
|
|
|
<dd>Don't have <directory> be an argument; just do it in the current.</dd>
|
|
|
|
<dt>fixme</dt>
|
|
|
|
<dd>Have a subset of LaTeX converted into html for the .d files?</dd>
|
|
|
|
<dt>fixme</dt>
|
|
|
|
<dd>Encoding is an issue; especially the newsfeed, 7bit.</dd>
|
|
|
|
<dt>fixme</dt>
|
|
|
|
<dd>It's not robust; eg @(files)<em>@(files){Don't do this.}</em>.</dd>
|
2017-03-23 02:45:12 -04:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<a name = "_declarations"><!-- --></a><h2>Declarations</h2>
|
|
|
|
|
|
|
|
|
|
|
|
<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>}
|
|
|
|
void</td>
|
|
|
|
<td><a href = "#usage">usage</a></td>
|
|
|
|
<td>const char *programme</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
<a name = "_detail"><!-- --></a><h2>Function Detail</h2>
|
|
|
|
|
|
|
|
<div><a name = "usage"><!-- --></a>
|
|
|
|
<h3>usage</h3>
|
|
|
|
<pre>}
|
|
|
|
void <b>usage</b> (const char *programme)</pre>
|
|
|
|
<p>
|
|
|
|
you must free() the memory!
|
|
|
|
</p>
|
|
|
|
<dl>
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|