summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/arara/rules/velocity.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/arara/rules/velocity.yaml')
-rw-r--r--Master/texmf-dist/scripts/arara/rules/velocity.yaml41
1 files changed, 41 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/arara/rules/velocity.yaml b/Master/texmf-dist/scripts/arara/rules/velocity.yaml
new file mode 100644
index 00000000000..0fd62a94650
--- /dev/null
+++ b/Master/texmf-dist/scripts/arara/rules/velocity.yaml
@@ -0,0 +1,41 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: velocity
+name: Velocity
+authors:
+- Paulo Cereda
+commands:
+- name: The Velocity engine
+ command: >
+ @{
+ mergeVelocityTemplate(isEmpty(input, reference, toFile(input)),
+ toFile(output), context);
+ return true;
+ }
+arguments:
+- identifier: context
+ flag: >
+ @{
+ if (isMap(parameters.context)) {
+ return parameters.context;
+ }
+ else {
+ throwError('I was expecting a context map.');
+ }
+ }
+ required: true
+- identifier: output
+ flag: >
+ @{
+ return parameters.output;
+ }
+ required: true
+- identifier: input
+ flag: >
+ @{
+ return parameters.input;
+ }