glina showcases

Invocation

glina showcases [list | add <name> <file.json> | remove <name>] [--text]

Purpose

List, add and remove the showcase declarations that glina showcase <asset> reads. A declaration is a JSON object with an actions list and an active field naming one of those actions. Built-ins ship under assets/showcases/; custom declarations persist under $XDG_DATA_HOME/glina/showcases/ (or ~/.local/share/glina/showcases/). An installed package need not be writable.

Glina ships dragon and biped. The biped declaration has a compact armature, six visible parts, and moving walk and idle clips; additional assets use the same interpreter rather than a second implementation.

Inputs and options

  • list, or no verb, prints every declared name, sorted.
  • add <name> <file.json> checks the file and copies it into the user data directory. <name> is lowercase letters, digits and dashes.
  • remove <name> deletes a custom showcase; built-ins are protected.
  • --text prints the result as path: value lines instead of JSON.

Output and state

list prints {kind: "showcase", names}. On first access after an older Glina install, a custom declaration left under package assets/showcases/ moves into user data; the shipped dragon and biped files stay. Otherwise listing changes nothing. add and remove print {kind, name, path, outcome} with outcome added or removed; path is the custom declaration in the user data directory. A second removal is refused.

Refusals

  • showcases add needs <name> <file.json> / showcases remove needs <name>: a missing argument.
  • showcases takes list, add or remove; got <verb>: an unknown verb.
  • showcase name must be lowercase letters, digits and dashes; got "<name>".
  • <file>: <parse error>, <file> is not a JSON object, <file> has no actions list, <file> names active action "<x>", which is not one of its actions: the file does not describe a showcase.
  • showcase <name> is already declared; remove it first / showcase <name> is not declared.
  • showcase <name> is built in and cannot be removed: the package's declaration is protected; copy it to a new name to customize it.
  • cannot migrate <old path>: <user path> already holds different bytes: both copies stay; Glina never overwrites either.
  • copied <old path> to <user path>, but could not remove the old copy: <error>: the package is not writable or removal failed; Glina reports the incomplete move rather than listing a declaration that would reappear after removal.

Each refusal is printed as error: <message> and exits 2, like an unknown command: a name Glina has not declared is a usage error.