summaryrefslogtreecommitdiff
path: root/support/arara/scripts/rules/arara-rule-llmk.yaml
blob: 965616b5012274852db5ec37b3e9359d26f95bef (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
!config
# Arara, the cool TeX automation tool
# Copyright (c) 2022, Island of TeX
# All rights reserved.
#
# This rule is part of arara.
identifier: llmk
name: LLMK
authors:
- Island of TeX
commands:
- name: The automation tool
  command: >
    @{
        return getCommand('llmk', clean, debug, dry,
                          mode, reference.getName());
    }
arguments:
- identifier: clean
  flag: >
    @{
        goals = [ 'partial' : '--clean', 'all' : '--clobber' ];
        if (goals.keySet().contains(parameters.clean)) {
            return goals.get(parameters.clean);
        }
        else {
            throwError('The provided value is invalid.');
        }
    }
- identifier: debug
  flag: >
    @{
        if (parameters.debug.equals('all')) {
            return '-D';
        }
        else {
            return [ '-d', parameters.debug ];
        }
    }
- identifier: dry
  flag: >
    @{
        return isTrue(parameters.dry, '--dry-run');
    }
- identifier: mode
  flag: >
    @{
        modes = [ 'quiet' : '-q', 'silent' : '-s',
                  'verbose' : '-v' ];
        if (modes.keySet().contains(parameters.mode)) {
            return modes.get(parameters.mode);
        }
        else {
            throwError('Invalid mode name.');
        }
    }