summaryrefslogtreecommitdiff
path: root/support/arara/scripts/rules/arara-rule-gnuplot.yaml
blob: 77d8257e6ed79c8aaf637f42f0d8ca2e4733e78f (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
!config
# Arara, the cool TeX automation tool
# Copyright (c) 2022, Island of TeX
# All rights reserved.
#
# This rule is part of arara.
identifier: gnuplot
name: The Gnuplot program
authors:
- Island of TeX
commands:
- name: Gnuplot
  command: >
    @{
        c = [];
        foreach (entry : input) {
            c.add(getCommand('gnuplot', persist, default, commands, entry));
        }
        return c;
    }
arguments:
- identifier: persist
  flag: >
    @{
        return isTrue(parameters.persist, '--persist');
    }
- identifier: default
  flag: >
    @{
        return isTrue(parameters.default, '--default');
    }
- identifier: commands
  flag: >
    @{
        return [ '-e', parameters.commands ];
    }
- identifier: input
  flag: >
    @{
        if (isList(parameters.input)) {
            return parameters.input;
        } else {
            throwError('I was expecting a list of input files.');
        }
    }
  required: true