← back to roto on ba3a.dev

Package-level declarations

Types

Link copied to clipboard
class PathTemplate(val source: String)

A Template that expands to a RelativePath inside the consuming project, such as raw-art/{profile}/{action}_{facing:lower}/{frame:000}.png.

Link copied to clipboard

The one rule for paths a consuming project writes in roto.json: forward slashes, relative to the project root, and portable to every desktop file system. Each segment is non-empty, is not . or .., and avoids the characters Windows forbids in file names — so a path that validates on Linux also works on Windows, and no path can climb out of the project root.

Link copied to clipboard
object SafeName

The rule for every name that ends up in a file name — project ids, profile ids, facings, actions: it starts with a letter or digit and holds only letters, digits, _ and -. Such a name is safe as, or inside, a path segment on every desktop file system.

Link copied to clipboard
class Template(val source: String)

A string with {variable} and {variable:format} placeholders, parsed and validated on construction: an unknown variable, a format that does not fit the variable, or an unbalanced brace fails here rather than at publish time.

Link copied to clipboard
data class TemplateValues(val profile: String? = null, val action: String? = null, val facing: String? = null, val frame: Int? = null)

The values a Template is expanded with; a variable the template uses must not be null.

Link copied to clipboard

A placeholder a Template may use, written {key} or {key:format}.