Skip to content

Client side scripting

FellowTraveler edited this page Jun 20, 2012 · 8 revisions

the ot command-line utility (“ot”) has a built-in script interpreter, with access to the entire OT Client API, including the low-level and high-level APIs.

To make your own OT script, create a text file, and chmod u+x filename in order to be able to run it as an executable. Then put this shebang at the top of the file: #!/usr/bin/env ot

Now you can run that file like any other executable, just type: ./filename and the script will execute as an OT client.

There are a number of sample scripts provided, showing how easy OT has become:
https://github.com/FellowTraveler/Open-Transactions/tree/master/scripts/samples

Clone this wiki locally