library style
Have Skryba write a style from the kept text of library papers.
Invocation#
lem-cli library style <name> --from <source> [--from <source> ...] [--model <model>] [--example-words <n>]Inputs and options#
- name is the name Skryba keeps the style under; a rewrite then names it with --style.
- --from names one library paper by any selector that resolves to it, and is repeated for each paper the style is written from. Each must hold kept text.
- --model is passed on as Skryba's own --model, the model that reads the examples and writes the instruction; without it Skryba uses its SKRYBA_MODEL or refuses.
- --example-words, a whole number above zero, is passed on as Skryba's --words: its model is given at most that many words of the papers' text, in the order named, the paper crossing the bound cut there. Without it every paper's whole text is handed over.
Output and state#
Finds each paper and its kept text file, then runs `skryba style derive <name> --from <text file> ...`: Skryba's model reads the papers and writes one instruction describing how they are written, and Skryba keeps it as a style. Lem reads no text itself and writes no instruction.
Prints `program`, the Skryba that ran; `name`; `instruction`, the text Skryba wrote; and `derived_from`, each paper with its `paper_id`, `title` and the `path` of the text handed over. The library is not changed. `lem-cli humanize rewrite --style <name>` then holds a rewrite to that style, and a Skryba voice can carry it.
Refusals#
- A missing name, no --from, an option without its value, an --example-words that is not a whole number above zero, or any other option refuses with “library style needs the name the style is kept under and one --from <source> for each paper it is written from”, exit 2.
- A paper the library does not hold refuses as library show does. A paper it holds without readable text refuses naming the paper, its text status and the file recorded for it (`lem.library.style.style-text-absent`); both are checked before Skryba is looked for.
- A Skryba that cannot be found or started refuses as it does for a rewrite. One that refuses the style (a name already carried, no model, an example it cannot read) is relayed with what it said (`style-refused`); an answer that is not Skryba's report is `style-answer-unreadable`.