Recursor

Copyright 2008, 2012 Neil Edelman, distributed under the terms of the GNU General Public License, see copying.txt

Recursor is the main part of MakeIndex, a content management system that generates static content, (mostly index.html,) on all the directories rooted at the directory specified by --directory or -d. It is based on a template file, .index.html and .newsfeed.rss, which are changeable. Also included are files to summarise the directory structure for a xml site map, compatible with Google, and any .news for an rss feed.

There should be an <example> directory that has a bunch of files in it. Run bin/MakeIndex -d example/; it should make a webpage out of the directory structure and .index.html, open example/index.html after running to see.

.index.html, .sitemap.xml, .newsfeed.rss, see Parser 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 Files.c.

minimum standard
POSIX.1
author
Neil
version
2018-03 Removed version numbers.
since
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 sth.dsth.d handled properly. 0.6; 2008-03-27 Made something out of an earlier work.
fixme
Don't have <directory> be an argument; just do it in the current.
fixme
Borrow Cdoc parser for the .d files.
fixme
Encoding is an issue; especially the newsfeed, which requires 7-bit.
fixme
It's not robust; eg @(files)@(files){Don't do this.}.
fixme
Simplify the command line arguments.

Declarations

struct Recursor

struct Recursor

See Recursor.

Function Summary

Return TypeFunction NameArgument List
struct Recursor * Recursor const char *idx, const char *map, const char *news
void Recursor_ void
int RecursorGo void

Function Detail

Recursor

struct Recursor * Recursor (const char *idx, const char *map, const char *news)
parameter: idx
file name of the prototype index file, eg, ".index.html".
parameter: map
file name of the prototype map file, eg, ".sitmap.xml".
parameter: news
file name of the prototype news file, eg, ".newsfeed.rss".

Recursor_

void Recursor_ (void)

Destructor.

RecursorGo

int RecursorGo (void)

Actually does the recursion.