summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/arara/rules/texcount.yaml
blob: 79506c806c9fa5ae2e31035330dad278a8c472ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
!config
# Arara, the cool TeX automation tool
# Copyright (c) 2020, Island of TeX
# All rights reserved.
#
# This rule is part of arara.
identifier: texcount
name: TeXcount
authors:
- Island of TeX
commands:
- name: The TeXcount program
  command: >
    @{
        return getCommand('texcount', rules, verbosity, strict, html,
                          total, unicode, options, output, reference);
    }
arguments:
- identifier: rules
  flag: >
    @{
        if ([ 'relaxed', 'restricted' ].contains(parameters.rules)) {
            return '-'.concat(parameters.rules);
        }
        else {
            throwError('Invalid value, use either relaxed or restricted.');
        }
    }
- identifier: verbosity
  flag: >
    @{
        if ([ '0', '1', '2', '3', '4' ].contains(parameters.verbosity)) {
            return '-v'.concat(parameters.verbosity);
        }
        else {
            throwError('Invalid value, use an integer range from 0 to 4.');
        }
    }
- identifier: strict
  flag: >
    @{
        return isTrue(parameters.strict, '-strict');
    }
- identifier: html
  flag: >
    @{
        return isTrue(parameters.html, '-html');
    }
- identifier: total
  flag: >
    @{
        return isTrue(parameters.total, '-total');
    }
- identifier: unicode
  flag: >
    @{
        return isTrue(parameters.unicode, '-unicode');
    }
- identifier: output
  flag: >
    @{
        return '-out='.concat(parameters.output);
    }
- identifier: options
  flag: >
    @{
        if (isList(parameters.options)) {
            return parameters.options;
        }
        else {
            throwError('I was expecting a list of options.');
        }
    }