Noel Command Line Arguments

Summary of Options
-? | -helpVersion & usage info
-b <seconds>Background, incremental compilation mode which polls for updates every <seconds> seconds
-d <dir>Output files to <dir> directory (default is 'out')
-D<var>="<value>"Set global variable
-p <prj>Process <prj> directly as project content
-fFancy mode
-iIncremental compilation mode
-m#Set maximum tag depth
-PPersistent mode
-s <dir>Read source files from <dir> directory (default is '.')
-v#Set verbosity (0=quiet, 1=brief, 2=verbose, 3=debug)

Noel requires Java 2 Standard Edition version 1.4.0 or greater to run. The Noel tarball contains the executable jarfile 'noel.jar'. To display the Noel version and command-line arguments, set $NOEL_HOME to the noel home directory and execute:

java -jar $NOEL_HOME/noel.jar $line

You can (optionally) supply a list of Noel templates on the command line. The templates will be processed in order, and a single output file will be generated with the same name as the last input template. In this example four Noel templates are read from the current working directory and the file 'out/index.html' is generated:

java -jar $NOEL_HOME/noel.jar $line

You can use the -s and -d options to specify the source directory (containing Noel templates) and the destination directory (where HTML files will be written to), respectively. The default source directory is '.' and the default output directory is 'out'. (Noel will try to stop you from overwriting your source files.) E.g.:

java -jar $NOEL_HOME/noel.jar $line

You can also list Noel project files on the command line. Project files should use the '.noel' filename suffix. E.g.:

java -jar $NOEL_HOME/noel.jar $line

You can supply project content directly on the command line using a -p entries. For example, the following command line will generate out/a.html and out/b.html:

java -jar $NOEL_HOME/noel.jar $line

If no templates, project files, or project content is given on the command line, then Noel will attempt to use 'default.noel' as its project file. E.g.:

java -jar $NOEL_HOME/noel.jar $line

You may list any combination of templates, project files, and project content on the command-line but I usually recommend using the default.noel project file for generating multiple files.

The -f option enables fancy mode, which attempts to pretty-up the output HTML, compressing whitespace and removing multiple newlines. This may play havoc with <pre> tag content and scripts/stylesheets that haven't been protected with copy content blocks.

The -i option enables incremental compilation mode, an interactive mode where you are continuously prompted to press Enter and run the compilation again. When Noel runs in this mode, it only recompiles templates whose source files have been modified. If the project structure is modified (e.g. a project file is modified or files are added/removed) then a complete compilation pass is performed.

The -b option begins the background, incremental compilation mode, which is identical to the -i mode except that it automatically polls for updates every <seconds> seconds, instead of waiting for user input.

The -m option is used to set the maximum tag depth allowed. A tag depth limit is used to detect infinite recursion (tags calling themselves). The default maximum should be sufficient for everyone but it is here as a just-in-case option.

The -P option enables persistent mode. Usually Noel will quit whenever an exception occurs but in persistent mode Noel will make an effort to continue working. I am considering discontinuing this feature.

The -v option sets the verbosity of Noel. 0 is quiet, 1 is brief, 2 is verbose, and 3 is debug. The default verbosity is 'brief'. E.g.:

java -jar $NOEL_HOME/noel.jar $line
home  |  acting  |  blog  |  consulting  |  noel  |  contact
© 2013 Michael McDonald, . All rights reserved.