I'm working on an arara rule for indent.plx which can be called in a few different ways:
indent.plx myfile.tex(outputs to the terminal)indent.plx -w myfile.tex(overwrites original file and outputs to terminal)indent.plx -o myfile.tex outputfile.tex(outputs to a separate file and outputs to terminal)indent.plx -s myfile.tex(silent mode, no ouptput to terminal)
I'd like to wrap up these choices (and others, hopefully) in one tidy arara rule. So far I have
!config
# indent rule for arara
# author: cmhughes
# requires arara 3.0+
#
# Sample use:
# % arara: indent
# % arara: indent: {overwrite: true}
# % arara: indent: {overwrite: on}
# % arara: indent: {overwrite: yes}
# % arara: indent: {overwrite: false}
#
identifier: indent
name: Indent
command: indent.plx @{overwrite} "@{file}"
arguments:
- identifier: overwrite
flag: <arara> @{ isTrue( parameters.overwrite, "-w","" ) }
How can I extend my rule to include the other options to output to a separate file and for silent mode?
I'd like to be able to use, for example, each of the following
% arara: indent: {overwrite: false, outputFile: outputfile.tex}
% arara: indent: {outputFile: outputfile.tex, silent: true}
:-). – Mar 24 '13 at 06:47