Skip to content

Commit

Permalink
mention 'transform' macro in README
Browse files Browse the repository at this point in the history
  • Loading branch information
jrochkind committed Apr 11, 2019
1 parent 0322b85 commit 639193d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ TranslationMap use above is just one example of a transformation macro, that tra
* `append("--after each value")`
* `gsub(/regex/, "replacement")`
* `split(" ")`: take values and split them, possibly result in multiple values.
* `transform(proc)`: transform each existing macro using a proc, kind of like `map`.
eg `to_field "something", extract_xml("//author"), transform( ->(author) { "#{author.last}, #{author.first}" })

You can add on as many transformation macros as you want, they will be applied to output in order.

Expand Down

0 comments on commit 639193d

Please sign in to comment.