Up: Component summary Function

LatexSearchReplace

Transforms text (including Tex) files in the given Latex directory by replacing certain string with new values in the specified text files.

The format of search replace rules follows the syntax of regular expressions used in Java. Each rule consists of two patterns: the search pattern(s) and the substituent pattern. By default all text files in the directory are processed. However, one can specify only particular files from the folder to be processed.

Version 1.0
Bundle tools
Categories Convert Latex
Authors Vladimir Rogojin (Vladimir.Rogojin@Helsinki.FI)
Issue tracker View/Report issues
Source files component.xml function.scala
Usage Example with default values

Inputs

Name Type Mandatory Description
in Latex Mandatory Latex source directory
rules Properties Optional A set of search keys

Outputs

Name Type Description
out Latex Latex directory with the transformed files

Parameters

Name Type Default Description
filePattern string "(.*)\.(txt|tex)" Java regular expression for selecting files to be processed. Only files whose base name (last component of absolute name) matches the pattern are processed. By default, all text and Tex files in the Latex source folder are processed.
key00 string "" Search key 0
key01 string "" Search key 1
key02 string "" Search key 2
key03 string "" Search key 3
key04 string "" Search key 4
key05 string "" Search key 5
key06 string "" Search key 6
key07 string "" Search key 7
key08 string "" Search key 8
key09 string "" Search key 9
value00 string "" Replacement 0
value01 string "" Replacement 1
value02 string "" Replacement 2
value03 string "" Replacement 3
value04 string "" Replacement 4
value05 string "" Replacement 5
value06 string "" Replacement 6
value07 string "" Replacement 7
value08 string "" Replacement 8
value09 string "" Replacement 9

Test cases

Test case Parameters IN
in
IN
rules
OUT
out
case1 properties in (missing) (missing)

key00=I love Space!,
value00=I am the best at Space!,
key01=to be replaced,
value01=was replaced

case2 properties in (missing) (missing)

key00=I love Space!,
value00=I am the best at Space!,
key01=to be replaced,
value01=was replaced


Generated 2019-02-08 07:42:21 by Anduril 2.0.0