diff options
Diffstat (limited to 'Master/texmf-dist/scripts/arara/rules/bib2gls.yaml')
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/bib2gls.yaml | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml b/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml new file mode 100644 index 00000000000..254a362096e --- /dev/null +++ b/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml @@ -0,0 +1,166 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2018, Paulo Roberto Massa Cereda +# All rights reserved. +# +# This rule is part of arara. +identifier: bib2gls +name: Bib2Gls +authors: +- Nicola Talbot +- Paulo Cereda +commands: +- name: The Bib2Gls software + command: > + @{ + return getCommand('bib2gls', dir, trans, group, interpret, + breakspace, trimfields, recordcount, recordcountunit, + cite, verbose, merge, locale, uniscript, packages, + ignore, custom, mapformats, options, getBasename(file)); + } +arguments: +- identifier: dir + flag: > + @{ + return ['--dir', parameters.dir] + } +- identifier: trans + flag: > + @{ + return ['--log-file', getBasename(file)+"."+parameters.trans] + } +- identifier: locale + flag: > + @{ + return ['--locale', parameters.locale] + } +- identifier: group + flag: > + @{ + isTrue(parameters.group, '--group', '--no-group') + } +- identifier: interpret + flag: > + @{ + isTrue(parameters.interpret, '--interpret', '--no-interpret') + } +- identifier: breakspace + flag: > + @{ + isTrue(parameters.breakspace, '--break-space', '--no-break-space') + } +- identifier: trimfields + flag: > + @{ + isTrue(parameters.trimfields, '--trim-fields', '--no-trim-fields') + } +- identifier: recordcount + flag: > + @{ + isTrue(parameters.recordcount, '--record-count', '--no-record-count') + } +- identifier: recordcountunit + flag: > + @{ + isTrue(parameters.recordcountunit, '--record-count-unit', + '--no-record-count-unit') + } +- identifier: cite + flag: > + @{ + isTrue(parameters.cite, '--cite-as-record', '--no-cite-as-record') + } +- identifier: verbose + flag: > + @{ + isTrue(parameters.verbose, '--verbose', '--no-verbose') + } +- identifier: merge + flag: > + @{ + isTrue(parameters.merge, '--merge-wrglossary-records', + '--no-merge-wrglossary-records') + } +- identifier: uniscript + flag: > + @{ + isTrue(parameters.uniscript, '--support-unicode-script', + '--no-support-unicode-script') + } +- identifier: packages + flag: > + @{ + if (isList(parameters.packages)) { + elements = []; + foreach (element : parameters.packages) { + elements.add('--packages'); + elements.add(element); + } + return elements; + } + else { + throwError('I was expecting a list of package names.'); + } + } +- identifier: ignore + flag: > + @{ + if (isList(parameters.ignore)) { + elements = []; + foreach (element : parameters.ignore) { + elements.add('--ignore-packages'); + elements.add(element); + } + return elements; + } + else { + throwError('I was expecting a list of package names.'); + } + } +- identifier: custom + flag: > + @{ + if (isList(parameters.custom)) { + elements = []; + foreach (element : parameters.custom) { + elements.add('--custom-packages'); + elements.add(element); + } + return elements; + } + else { + throwError('I was expecting a list of package names.'); + } + } +- identifier: mapformats + flag: > + @{ + if (isList(parameters.mapformats)) { + elements = []; + foreach (element : parameters.mapformats) { + if (isList(element) && element.size() == 2) { + elements.add('--map-format'); + elements.add(element.get(0) + ':' + element.get(1)); + } + else { + throwError('I was expecting a map ' + + 'format list [<key>, <value>] '); + } + } + return elements; + } + else { + throwError('I was expecting mapformats: [ [<key>, <value>], ' + + '..., [<key>, <value>] ].'); + } + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } |