Tracery is a text-generation language mostly used for twitter bots.
See Tracery.io for more information.
Runs a grammar until it ends.
Some recursive definitions might take a long time.
Use runTo if you want to avoid long waiting times.
Runs a grammar until it reaches a key in the list.
compute a single step.
compute a single step.
The algorithm will never choose a recursive option for any key in the given list.
compute a single step.
The algorithm will always choose a recursive option for any key in the given list.
If no such option exists, then the empty list will be used instead.
Turns a tracery json-string into a generator
A tracery json is a object that has a
originfield.The
#and\characters need to be escaped.If you provide a list, tracer will tick an element at random.
You can reference other fields using
#..#Definitions may also be recursive.
You can define constants by providing a string instead of a list.
You may define sub-definitions to organize your definitions.