summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-23 20:45:07 +0000
committerKarl Berry <karl@freefriends.org>2018-10-23 20:45:07 +0000
commit84913babd1c16867f2a746fa23f10fe1ab10c329 (patch)
tree3342a73936419808715713cc818ddf54f72837b0 /Master
parent5fcf3d2cf79485bd973370fdb9ae4864551762a0 (diff)
arara (23oct18)
git-svn-id: svn://tug.org/texlive/trunk@48979 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/support/arara/README.md2
-rw-r--r--Master/texmf-dist/doc/support/arara/arara-manual.pdfbin1825371 -> 1825373 bytes
-rw-r--r--Master/texmf-dist/scripts/arara/arara.jarbin5119284 -> 5119284 bytes
-rw-r--r--Master/texmf-dist/scripts/arara/rules/bib2gls.yaml66
-rw-r--r--Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml64
-rw-r--r--Master/texmf-dist/source/support/arara/pom.java5.xml336
-rw-r--r--Master/texmf-dist/source/support/arara/pom.xml10
7 files changed, 467 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/support/arara/README.md b/Master/texmf-dist/doc/support/arara/README.md
index 95dbb673eb1..2a47fa278d1 100644
--- a/Master/texmf-dist/doc/support/arara/README.md
+++ b/Master/texmf-dist/doc/support/arara/README.md
@@ -7,7 +7,7 @@
![Language: Java](https://img.shields.io/badge/language-Java-blue.svg?style=flat-square)
![Minimum JRE: 5.0](https://img.shields.io/badge/minimum_JRE-5.0-blue.svg?style=flat-square)
[![License: New BSD](https://img.shields.io/badge/license-New_BSD-blue.svg?style=flat-square)](https://opensource.org/licenses/bsd-license)
-![CTAN packaging: 4.0.3](https://img.shields.io/badge/CTAN_packaging-4.0.3-blue.svg?style=flat-square)
+![CTAN packaging: 4.0.5](https://img.shields.io/badge/CTAN_packaging-4.0.5-blue.svg?style=flat-square)
`arara` is a TeX automation tool based on rules and directives. It gives you a way to enhance your TeX experience. The tool is an effort to provide a concise way to automate the daily TeX workflow for users and also package writers. Users might write their own rules when the provided ones do not suffice.
diff --git a/Master/texmf-dist/doc/support/arara/arara-manual.pdf b/Master/texmf-dist/doc/support/arara/arara-manual.pdf
index 99d9df9f2d8..be98238ecfc 100644
--- a/Master/texmf-dist/doc/support/arara/arara-manual.pdf
+++ b/Master/texmf-dist/doc/support/arara/arara-manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/arara/arara.jar b/Master/texmf-dist/scripts/arara/arara.jar
index 03519399de2..179c09f52b9 100644
--- a/Master/texmf-dist/scripts/arara/arara.jar
+++ b/Master/texmf-dist/scripts/arara/arara.jar
Binary files differ
diff --git a/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml b/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml
index 254a362096e..9a979207172 100644
--- a/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/bib2gls.yaml
@@ -13,10 +13,58 @@ 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));
+ if (isNotEmpty(clean))
+ {
+ prefix = [];
+ if (isUnix()) {
+ prefix = [ 'rm', '-f', '-v' ];
+ }
+ else {
+ prefix = [ 'cmd', '/c', 'del' ];
+ }
+
+ base = getBasename(file);
+ removals = [];
+
+ lines = readFromFile(base.concat('.').concat('aux'));
+
+ java.util.regex.Pattern resourcePattern =
+ java.util.regex.Pattern.compile(
+ "\\\\glsxtr@resource\\{.*\\}\\{([^\\}]+)\\}");
+
+ if (isNotEmpty(trans))
+ {
+ if (trans == getOriginalFile())
+ {
+ throwError('I cannot remove the main file reference.');
+ }
+
+ removals.add(getCommand(prefix, trans));
+ }
+ else
+ {
+ removals.add(getCommand(prefix, base.concat('.glg')));
+ }
+
+ foreach (line: lines)
+ {
+ matcher = resourcePattern.matcher(line);
+
+ if (matcher.matches())
+ {
+ removals.add(getCommand(prefix, matcher.group(1).concat('.glstex')));
+ }
+ }
+
+ return removals;
+ }
+ else
+ {
+ 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
@@ -27,6 +75,11 @@ arguments:
- identifier: trans
flag: >
@{
+ if ([ 'tex', 'ltx', 'cls', 'sty', 'bib',
+ 'dtx', 'ins', 'def', 'ldf' ].contains(parameters.trans)) {
+ throwError('Forbidden transcript extension');
+ }
+
return ['--log-file', getBasename(file)+"."+parameters.trans]
}
- identifier: locale
@@ -164,3 +217,8 @@ arguments:
throwError('I was expecting a list of options.');
}
}
+- identifier: clean
+ flag: >
+ @{
+ return isTrue(parameters.clean, 'true', '');
+ }
diff --git a/Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml b/Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml
index 4dee1e1567b..562af6d149a 100644
--- a/Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml
+++ b/Master/texmf-dist/scripts/arara/rules/makeglossaries.yaml
@@ -14,7 +14,59 @@ commands:
- name: The MakeGlossaries software
command: >
@{
- return getCommand('makeglossaries', options, getBasename(file));
+ if (isEmpty(clean))
+ {
+ return getCommand('makeglossaries', options, getBasename(file));
+ }
+ else {
+ prefix = [];
+ if (isUnix()) {
+ prefix = [ 'rm', '-f' ];
+ }
+ else {
+ prefix = [ 'cmd', '/c', 'del' ];
+ }
+
+ base = getBasename(file);
+ removals = [];
+
+ removals.add(getCommand(prefix, base.concat(".glsdefs")));
+
+ lines = readFromFile(base.concat('.').concat('aux'));
+
+ java.util.regex.Pattern glsPattern =
+ java.util.regex.Pattern.compile(
+ "\\\\@newglossary\\{.*\\}\\{(.*)\\}\\{(.*)\\}\\{(.*)\\}");
+
+ java.util.regex.Pattern istPattern =
+ (clean == 'partial' ? null :
+ java.util.regex.Pattern.compile("\\\\@istfilename\\{(.*)\\}"));
+
+ foreach (line: lines)
+ {
+ matcher = glsPattern.matcher(line);
+
+ if (matcher.matches())
+ {
+ foreach(extension: [matcher.group(1), matcher.group(2), matcher.group(3)])
+ {
+ removals.add(getCommand(prefix, base.concat('.').concat(extension)));
+ }
+ }
+ else if (istPattern != null)
+ {
+ matcher = istPattern.matcher(line);
+
+ if (matcher.matches())
+ {
+ removals.add(getCommand(prefix, matcher.group(1)));
+ istPattern = null;
+ }
+ }
+ }
+
+ return removals;
+ }
}
arguments:
- identifier: options
@@ -27,3 +79,13 @@ arguments:
throwError('I was expecting a list of options.');
}
}
+- identifier: clean
+ flag: >
+ @{
+ if ([ 'all', 'partial' ].contains(parameters.clean)) {
+ return parameters.clean;
+ }
+ else {
+ throwError('The provided clean value is not valid.');
+ }
+ }
diff --git a/Master/texmf-dist/source/support/arara/pom.java5.xml b/Master/texmf-dist/source/support/arara/pom.java5.xml
new file mode 100644
index 00000000000..bce2b7a9955
--- /dev/null
+++ b/Master/texmf-dist/source/support/arara/pom.java5.xml
@@ -0,0 +1,336 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ - Arara, the cool TeX automation tool
+ - Copyright (c) 2012, Paulo Roberto Massa Cereda
+ - All rights reserved.
+ -
+ - Redistribution and use in source and binary forms, with or without
+ - modification, are permitted provided that the following conditions
+ - are met:
+ -
+ - 1. Redistributions of source code must retain the above copyright
+ - notice, this list of conditions and the following disclaimer.
+ -
+ - 2. Redistributions in binary form must reproduce the above copyright
+ - notice, this list of conditions and the following disclaimer in the
+ - documentation and/or other materials provided with the distribution.
+ -
+ - 3. Neither the name of the project's author nor the names of its
+ - contributors may be used to endorse or promote products derived from
+ - this software without specific prior written permission.
+ -
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ - FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ - COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+ - WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ - POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.github.cereda</groupId>
+ <artifactId>arara</artifactId>
+ <version>4.0</version>
+ <packaging>jar</packaging>
+
+ <name>arara</name>
+ <url>https://github.com/cereda/arara</url>
+ <description>Arara is a TeX automation tool based on rules and directives.</description>
+ <inceptionYear>2012</inceptionYear>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>1.5</maven.compiler.source>
+ <maven.compiler.target>1.5</maven.compiler.target>
+ </properties>
+
+ <issueManagement>
+ <system>GitHub</system>
+ <url>https://github.com/cereda/arara/issues</url>
+ </issueManagement>
+
+ <licenses>
+ <license>
+ <name>New BSD License</name>
+ <url>http://www.opensource.org/licenses/bsd-license.php</url>
+ <distribution>repo</distribution>
+ <comments>New BSD License</comments>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:git:https://github.com/cereda/arara.git</connection>
+ <developerConnection>scm:git:https://github.com/cereda/arara.git</developerConnection>
+ <url>https://github.com/cereda/arara</url>
+ </scm>
+
+ <developers>
+
+ <developer>
+ <name>Paulo Roberto Massa Cereda</name>
+ <email>cereda@users.sf.net</email>
+ <id>cereda</id>
+ <url>http://tex.stackexchange.com/users/3094</url>
+ <roles>
+ <role>Lead developer</role>
+ <role>Creator</role>
+ <role>Duck enthusiast</role>
+ </roles>
+ </developer>
+
+ <developer>
+ <name>Marco Daniel</name>
+ <email>marco.daniel@mada-nada.de</email>
+ <id>marcodaniel</id>
+ <url>http://tex.stackexchange.com/users/5239</url>
+ <roles>
+ <role>Contributor</role>
+ <role>Tester</role>
+ <role>Fast driver</role>
+ </roles>
+ </developer>
+
+ <developer>
+ <name>Brent Longborough</name>
+ <email>brent@longborough.org</email>
+ <id>brent</id>
+ <url>http://tex.stackexchange.com/users/344</url>
+ <roles>
+ <role>Developer</role>
+ <role>Contributor</role>
+ <role>Tester</role>
+ <role>Haskell fanatic</role>
+ </roles>
+ </developer>
+
+ <developer>
+ <name>Nicola Talbot</name>
+ <email>nicola.lc.talbot@gmail.com</email>
+ <id>nlct</id>
+ <url>http://tex.stackexchange.com/users/19862</url>
+ <roles>
+ <role>Developer</role>
+ <role>Contributor</role>
+ <role>Tester</role>
+ <role>Hat enthusiast</role>
+ </roles>
+ </developer>
+
+ </developers>
+
+ <build>
+
+ <finalName>arara-${project.version}</finalName>
+
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.5.1</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <compilerArgument>-Xlint:unchecked</compilerArgument>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ <archive>
+ <manifest>
+ <mainClass>com.github.cereda.arara.Arara</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.10.4</version>
+ <configuration>
+ <show>public</show>
+ <defaultAuthor>Paulo Roberto Massa Cereda</defaultAuthor>
+ <defaultSince>${project.version}</defaultSince>
+ <defaultVersion>${project.version}</defaultVersion>
+ <level>private</level>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.0.1</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ <mainClass>com.github.cereda.arara.Arara</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.10</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <includeScope>runtime</includeScope>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.0.0</version>
+ </plugin>
+
+ </plugins>
+
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.e-movimento.tinytools</groupId>
+ <artifactId>privilegedaccessor</artifactId>
+ <version>1.2.2</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.simpleframework</groupId>
+ <artifactId>simple-xml</artifactId>
+ <version>2.7.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
+ <version>4.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.zeroturnaround</groupId>
+ <artifactId>zt-exec</artifactId>
+ <version>1.9</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.17</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.3.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.7</version>
+ </dependency>
+
+ <dependency>
+ <groupId>ch.qos.cal10n</groupId>
+ <artifactId>cal10n-api</artifactId>
+ <version>0.8.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mvel</groupId>
+ <artifactId>mvel2</artifactId>
+ <version>2.2.8.Final</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.7</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ </dependencies>
+
+</project>
diff --git a/Master/texmf-dist/source/support/arara/pom.xml b/Master/texmf-dist/source/support/arara/pom.xml
index bce2b7a9955..b5f57e9e96b 100644
--- a/Master/texmf-dist/source/support/arara/pom.xml
+++ b/Master/texmf-dist/source/support/arara/pom.xml
@@ -49,8 +49,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.5</maven.compiler.source>
- <maven.compiler.target>1.5</maven.compiler.target>
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
</properties>
<issueManagement>
@@ -138,15 +138,15 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.6</version>
+ <version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>