DripDrop.Templates.Spintax (DripDrop v0.1.0)

Copy Markdown View Source

Deterministic spintax rendering for optional template variation.

Summary

Functions

Applies spintax to every string in a rendered payload when enabled for a step.

Renders one spintax string with a deterministic seed.

Derives the deterministic seed from a step execution.

Functions

apply(payload, step, execution)

@spec apply(map(), map(), map()) :: map()

Applies spintax to every string in a rendered payload when enabled for a step.

render(text, seed, metadata \\ %{})

@spec render(binary(), integer(), map()) :: {binary(), term()}

Renders one spintax string with a deterministic seed.

seed(map)

@spec seed(map()) :: non_neg_integer()

Derives the deterministic seed from a step execution.