diff options
author | Karl Berry <karl@freefriends.org> | 2018-07-10 21:10:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-07-10 21:10:18 +0000 |
commit | 275865ed49aaf567eb93f9405e4595a514483a4b (patch) | |
tree | 624fc2d2da441718e7529fd36c117b89bda86d38 /Master/texmf-dist/scripts/arara/rules/datatooltk.yaml | |
parent | 33452f6039ba5535d9d9c6fcc58f7a9aad6ce91d (diff) |
arara (10jul18)
git-svn-id: svn://tug.org/texlive/trunk@48183 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/arara/rules/datatooltk.yaml')
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/datatooltk.yaml | 191 |
1 files changed, 191 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/arara/rules/datatooltk.yaml b/Master/texmf-dist/scripts/arara/rules/datatooltk.yaml new file mode 100644 index 00000000000..0b80d15e753 --- /dev/null +++ b/Master/texmf-dist/scripts/arara/rules/datatooltk.yaml @@ -0,0 +1,191 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2018, Paulo Roberto Massa Cereda +# All rights reserved. +# +# This rule is part of arara. +identifier: datatooltk +name: DatatoolTk +authors: +- Nicola Talbot +- Paulo Cereda +commands: +- name: The DatatoolTk software + command: > + @{ + return getCommand('datatooltk', options, output, csv, sql, input, + sqldb, sqluser, name, probsoln, sort, sortlocale, sortcase, + seed, shuffle, sep, delim, csvheader, noconsole, debug, + owneronly, maptex, xls, ods, sheet, filterop, filters, + truncate); + } +arguments: +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } +- identifier: output + flag: > + @{ + [ '--output', parameters.output ] + } + required: true +- identifier: csv + flag: > + @{ + [ '--csv', parameters.csv ] + } +- identifier: sep + flag: > + @{ + [ '--sep', parameters.sep ] + } +- identifier: delim + flag: > + @{ + [ '--delim', parameters.delim ] + } +- identifier: name + flag: > + @{ + [ '--name', parameters.name ] + } +- identifier: sql + flag: > + @{ + [ '--sql', parameters.sql ] + } +- identifier: sqldb + flag: > + @{ + [ '--sqldb', parameters.sqldb ] + } +- identifier: sqluser + flag: > + @{ + [ '--sqluser', parameters.sqluser ] + } +- identifier: noconsole + flag: > + @{ + [ '--noconsole-action', parameters.noconsole ] + } + default: > + @{ + [ '--noconsole-action', 'gui'] + } +- identifier: probsoln + flag: > + @{ + [ '--probsoln', parameters.probsoln ] + } +- identifier: input + flag: > + @{ + [ '--in', parameters.input ] + } +- identifier: sort + flag: > + @{ + [ '--sort', parameters.sort ] + } +- identifier: sortlocale + flag: > + @{ + [ '--sort-locale', parameters.sortlocale ] + } +- identifier: sortcase + flag: > + @{ + isTrue(parameters.sortcase, '--sort-case-sensitive', + '--sort-case-insensitive') + } +- identifier: seed + flag: > + @{ + [ '--seed', parameters.seed ] + } +- identifier: shuffle + flag: > + @{ + isTrue(parameters.shuffle, '--shuffle', '--noshuffle') + } +- identifier: csvheader + flag: > + @{ + isTrue(parameters.csvheader, '--csvheader', '--nocsvheader') + } +- identifier: debug + flag: > + @{ + isTrue(parameters.debug, '--debug', '--nodebug') + } +- identifier: owneronly + flag: > + @{ + isTrue(parameters.owneronly, '--owner-only', '--noowner-only') + } +- identifier: maptex + flag: > + @{ + isTrue(parameters.maptex, '--map-tex-specials', + '--nomap-tex-specials') + } +- identifier: xls + flag: > + @{ + [ '--xls', parameters.xls ] + } +- identifier: ods + flag: > + @{ + [ '--ods', parameters.ods ] + } +- identifier: sheet + flag: > + @{ + [ '--sheet', parameters.sheet ] + } +- identifier: filterop + flag: > + @{ + if (['and', 'or'].contains(parameters.filterop)) { + return "--filter-" + parameters.filterop; + } + else { + throwError('The provided filterop value is not valid.'); + } + } +- identifier: filters + flag: > + @{ + if (isList(parameters.filters)) { + elements = []; + foreach (element : parameters.filters) { + if (isList(element) && element.size() == 3) { + elements.add('--filter'); + elements.add(element); + } + else { + throwError('I was expecting a filter ' + + 'list [<label>, <op>, <value>]'); + } + } + return elements; + } + else { + throwError('I was expecting filters: [ [<label>, <op>, <value>], ' + + '..., [<label>, <op>, <value>] ].'); + } + } +- identifier: truncate + flag: > + @{ + [ '--truncate', parameters.truncate ] + } |