!config
# indent rule for arara
# author: Paulo Cereda, Chris Hughes
# last updated: 11/9/2013
# requires arara 3.0+
#
# Sample usage:
#
# % arara: indent
# % arara: indent: {overwrite: yes}
# % arara: indent: {output: myfile.tex, silent: no}
# % arara: indent: {output: myfile.tex, silent: yes, overwrite: yes}
# % arara: indent: {trace: true}
# % arara: indent: {localSettings: true}
# % arara: indent: {onlyDefault: on}
# % arara: indent: { cruft: /home/cmhughes/Desktop }
#
# Directories with spaces will cause issues in the cruft call.
# 
# Note: output will take priority above overwrite
identifier: indent
name: Indent
command: <arara> @{ isWindows( "cmd /c latexindent.exe", "latexindent.pl" ) } @{silent} @{trace} @{localSettings} @{cruft}@{ isNotEmpty( cruft, '="'.concat(parameters.cruft).concat('"') ) } @{overwrite}  @{onlyDefault} @{output} "@{file}" @{ isNotEmpty( output, '"'.concat(parameters.output).concat('"') ) }
arguments:
- identifier: overwrite
  flag: <arara> @{ isTrue( parameters.overwrite, "-w" ) }
- identifier: silent
  flag: <arara> @{ isTrue( parameters.silent, "-s" ) }
- identifier: trace
  flag: <arara> @{ isTrue( parameters.trace, "-t" ) }
- identifier: localSettings
  flag: <arara> @{ isTrue( parameters.localSettings, "-l" ) }
- identifier: output
  flag: <arara> @{ isNotEmpty( parameters.output, "-o" ) }
- identifier: onlyDefault
  flag: <arara> @{ isTrue( parameters.onlyDefault, "-d" ) }
- identifier: cruft
  flag: <arara> @{ isNotEmpty( parameters.cruft, "-c" ) }
