Content-type: text/html
Manpage of nwsc
nwsc
Section: ARSD Tools (1)
Updated: 27 August 2006
Index
Return to Main Contents
NAME
nwsc - the new simple web site compiler
SYNOPSIS
nwsc
input file, output file
DESCRIPTION
nwsc
is a simple program that takes an HTML input file with a small set of macros, and expands those macros, forming a finished HTML page.
USAGE
The file should be a valid XHTML chunk with macros added in the form of <#macro_name "argument" ...>.
It may also have HTML <h?> tags to show information headers.
nwsc
automatically adds <a name> tags to headers and may generate a table of contents for them
MACROS
The program supports a small number of macros to aid in making the web page.
Currently, the only way to add new macros is by modifying the source code (see function dosomething() on line 183 in nwsc.c if you want to give it a try).
- navmenu
-
Outputs a ul navmenu formed by recursively scanning the source directory (hardcoded) for directories and html files, ignoring dot files.
- include
-
Includes the file given in the first argument in this file, passing any subsequent arguments to that file.
-
<#include ``file'' ``argument''>
- toc
-
Generates a table of contents for the following data and inputs it in the output data.
It looks for <h1>, <h2>, etc tags in the HTML to know where contents begin.
If this appears inside a <h?> tag, it will only generate contents sub headers of this tag.
-
<#toc>
- date
-
Outputs the date when the file was compiled.
-
<#date>
- top
-
Outputs a back to top link.
-
<#top>
- arg
-
Outputs the contents of the argument passed to this file if it was
<#include>'ed
Argument 0 is the filename, arguments 1 and beyond are given on the include macro.
-
<#arg ``number''>
- footnotes
-
Outputs the footnotes. This may only occur once in a stream.
-
<#footnotes>
- fn
-
Adds a footnote with the first argument as the footnote text.
This text may be any inline HTML, including links.
Use the
footnotes
macro to output the notes somewhere in your file.
If you need to use a quote in the note text, remember to escape it with a backslash (like in C).
-
<#fn ``note text''>
COPYRIGHT
Copyright (C) 2006, Adam D. Ruppe, released under the GNU General Public License.
BUGS
It doesn't really handle errors; it either just keeps going silently or fails silently.
It doesn't understand HTML comments, so it is not possible to simply comment out code in your source file.
AUTHORS
Adam D. Ruppe ( destructionator@gmail.com )
SEE ALSO
gpl(7)
HISTORY
27 August 2006 - First release
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- USAGE
-
- MACROS
-
- COPYRIGHT
-
- BUGS
-
- AUTHORS
-
- SEE ALSO
-
- HISTORY
-
This document was created by
man2html,
using the manual pages.
Time: 03:33:54 GMT, October 04, 2007