A simple file transformation describes the transformation of a file from one shape into another. Transformations are
- expressed in JavaScript and
- applied on each line of the input file.
The transformation script can use two global variables: in and out.
in contains a single line of the input file without a trailing newline. out should contain the desired output or null, if no output should be produced. in and out are strings.
The simplest transformation - the identity - is expressed as follows:
out = in
This concludes the specification.
It's fun. It's simple. It uses a well known dynamic programming language to express transformations.
- ottily, Golang (in and out are named input and output, though)
- eachline.js, node.js (incomplete, but fast)