zabgrab.services.templates¶
Turning a fetch into a template (--save-template) or an equivalent command.
Functions
|
Build the command that repeats a fetch without its prompts. |
|
Build the template that repeats a fetch, as a config table. |
Classes
|
The command that repeats a fetch without its prompts. |
- zabgrab.services.templates.template_table(cli, query, config)[source]¶
Build the template that repeats a fetch, as a config table.
It’s self-contained, since templates can’t build on each other: the template used contributes its items and settings, overridden by the command line and by answers given at prompts.
[defaults]and built-in values are left out, so they still apply when the template is used. Values are kept as given (patterns, relative times).
- class zabgrab.services.templates.Equivalent(args, notes=<factory>)[source]¶
Bases:
objectThe command that repeats a fetch without its prompts.
- zabgrab.services.templates.equivalent_command(args, answers)[source]¶
Build the command that repeats a fetch without its prompts.
Answers become options, replacing any given for the same setting.
- Parameters:
- Returns:
Equivalent – The command, and notes on answers it can’t include (items chosen from a template, several formats).
- Return type: