Under the hood
Like git, USSM is a collection of command line utilities. That way, you don't have to learn Ocaml if you want to enhance or extend USSM.
ussm-utility assumes that the current directory is a USSM web
_ussm/ exists and is a directory. The only
ussm-init, which populates the current directory to
make a web site.
If you call a utility from the
_/ussm/ussm script by using the main
ussm command, you don't have to worry about that:
temporarily change the current directory to the right one.
The modules are directly responsible for the creation of intermediate
files in the
_ussm/tmp directory. As a general rule, a
module will generate a
_ussm/tmp/bar.foo for each
file. So, The
ussm-core module will generate
.core files, the
ussm-menu module will produce
.menu files, and so on.
The content of the temporary file depends on each module. For each source file:
ussm-coreextracts the main content and convert it to HTML.
ussm-menugenerates a hierarchical menu, which help navigation.
Most utilities are UNIX filters. Originally, they helped me build the other programs (like the modules). They should help you as well if you want to modify USSM.
Here is quick summary. Report to the source code for the details (I promise you, it is rather well documented).
ussm-headingextracts a header from the standard input (or from a file) and prints it to the standard output. It takes one or two arguments.
ussm-settingextracts a header from the
_ussm/settingsconfiguration file. (It calls
ussm-remove-boringreads a newline separated list of file names from the standard input, and prints that same list on the standard output, without files considered "boring". Its behaviour depends on the
boringparameter in the
ussm-source-dirsprints a newline separated list of all directories that contains a source file. I use it in the main script to copy the directory structure in
ussm-source-filesprints a newline separated list of all source files in the current USSM directory. Modules typically loop over this list.
ussm-strip-headerprints the content of a given file to the standard output, except without its header. Useful to write modules which act on the content of a source file, but not on its header.
Those two programs, I couldn't fit them in a neat category.
ussm-initpopulates the current directory with the necessary files to make a USSM web site. It creates the
_ussm/directory, and a set of files that act as an example. You can call
ussmimmediately after to see the result.
ussm-assemblegenerate the final web pages by assembling the necessary module files. The way it assemble them is specified by the