Text Transformation Language
Summary
Text Transformation Language (TTL) is a scripting language that uses interpreted commands to transform text files.
Syntax
Modules: Use the below command to include a seperate file of TTL commands into your current script.
- INCLUDE "c:\example_folder\example_file.ttl"
Commands: Use the below commands to transform your input text into your output text.
- REPLACE "find" WITH "add"
- REPLACE ALL WITH "add" BETWEEN "precedant" AND "antecedant"
- REPLACE "find" WITH "add" BETWEEN "precedant" AND "antecedant"
- REPLACE ALL WITH "add" FROM "precedant" TO "antecedant"
- REPLACE EVERYTHING AFTER "precedant" TO "antecedant" WITH "add"
- REPLACE "find" AFTER "precedant" WITH "add" BEFORE NEXT "antecedant"
Instructions
- Download the source code, below.
- Compile the source code into an executable binary (.exe) file.
- Create a plain-text file of commands per the "syntax" section above.
- Run the TTL intepreter, identifying the script path, input path, and output path as command-line parameters.
- Example, all files in the same folder: ttl.exe script.ttl, input.txt, output.txt
- Example, including folder paths: ttl.exe c:\script.ttl, c:\input.txt, c:\output.txt
Downloads
Downloads: 63
Added: 17 January 2012
Downloads: 95
Added: 02 October 2011