Attributes

Attribute Description Required
srcdir Location of the source files (written in NoWeb format) files Yes
destdir Location to store output files. Defaults to srcdir folder. No
action The required action ("tangle" or "weave" when a user filter pipeline is not defined). If a user pipeline of filters is defined it can be anything declared in that file (see below). Defaults to "tangle". No
ext The extension to be used for the tangle output file. Defaults to "c". No
filters The user filter definition file. A file location relative to the build file. No
includes Comma- or space-separated list of files (may be specified using wildcard patterns) that must be included; all *.nw (or *.noweb) files are included when omitted. No
includesfile The name of a file that contains a list of files to include (may be specified using wildcard patterns). No
excludes Comma- or space-separated list of files (may be specified using wildcard patterns) that must be excluded; no files (except default excludes) are excluded when omitted. No
excludesfile The name of a file that contains a list of files to exclude (may be specified using wildcard patterns). No
root The root chunk where a tangle process starts. If none is given the processor looks for a chunk named ``*''. No
delay By default, noweave puts file-name and other information into the output before the first chunk of the program. delay="true" delays that information until after the first documentation chunk. This option is typically used to enable a user to put a specialized LaTeX \documentclass command and other preamble material in the first documentation chunk (i.e., before the first @ sign). The final chunk is expected to contain \end{document}. Default is false. No
commentStart The character sequence that defines the start of a comment string of the output code (weave or tangle). Defaults to "//". No
commentEnd The character sequence that defines the end of a comment string of the output code (weave or tangle). Defaults to empty string. No
verbose Prints out verbose messages about progress. Default is false. No
failonerror Aborts build if set to true. Default is true. No

File Types

The tangle process uses inline comments to indicate where the code line was defined in the original source. Because there are many different characters for indicated a comment dependent on the language, the plugin detects which to use from the ext attribute. The current list of comment strings is

Extension Comment start Comment end
c, cc, m, java, js, swift //
ada, a, haskell, sql, applescript --
basic REM
tex, latex %
p, pascal (* *)
php, perl, py, python, ruby #
fortran C
html, xml, xsl, rng, xsd, dsd <!-- -->

These extensions are stored in the file types.xml and can edited. Typical entries are:

<antweave> <type ext="c" start="// " end=""/> <type ext="cc" start="// " end=""/> <type ext="m" start="// " end=""/> <type ext="java" start="// " end=""/> <type ext="js" start="// " end=""/> <type ext="ada" start="-- " end=""/> <type ext="a" start="-- " end=""/> <type ext="applescript" start="-- " end=""/> <type ext="haskell" start="-- " end=""/> <type ext="sql" start="-- " end=""/> <type ext="basic" start="REM" end=""/> <type ext="tex" start="%" end=""/> <type ext="matlab" start="%" end=""/> <type ext="p" start="(*" end="*)"/> <type ext="pascal" start="(*" end="*)"/> <type ext="php" start="# " end=""/> <type ext="perl" start="# " end=""/> <type ext="py" start="# " end=""/> <type ext="python" start="# " end=""/> <type ext="ruby" start="# " end=""/> <type ext="fortran" start="C " end=""/> <type ext="swift" start="// " end=""/> <type ext="html" start="&lt;!-- " end=" --&gt;"/> <type ext="xml" start="&lt;!-- " end=" --&gt;"/> <type ext="xsl" start="&lt;!-- " end=" --&gt;"/> <type ext="rng" start="&lt;!-- " end=" --&gt;"/> <type ext="xsd" start="&lt;!-- " end=" --&gt;"/> <type ext="dsd" start="&lt;!-- " end=" --&gt;"/> </antweave>
Copyright 2015 Hugh Field-Richards. All Rights Reserved.