flexget.plugins.output.exec module#
- class flexget.plugins.output.exec.EscapingEntry(entry)[source]#
Bases:
EntryHelper class, same as a Entry, but returns all string value with quotes escaped.
- _abc_impl = <_abc._abc_data object>#
- class flexget.plugins.output.exec.PluginExec[source]#
Bases:
objectExecute commands.
Simple example, xecute command for entries that reach output:
exec: echo 'found {{title}} at {{url}}' > file
Advanced Example:
exec: on_start: phase: echo "Started" on_input: for_entries: echo 'got {{title}}' on_output: for_accepted: echo 'accepted {{title}} - {{url}} > file
You can use all (available) entry fields in the command.
- HANDLED_PHASES = ['start', 'input', 'filter', 'output', 'exit']#
- NAME = 'exec'#
- schema = {'$defs': {'phaseSettings': {'additionalProperties': False, 'properties': {'for_accepted': {'oneOf': [{'items': {'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'title': 'single value', 'type': 'string'}]}, 'for_entries': {'oneOf': [{'items': {'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'title': 'single value', 'type': 'string'}]}, 'for_failed': {'oneOf': [{'items': {'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'title': 'single value', 'type': 'string'}]}, 'for_rejected': {'oneOf': [{'items': {'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'title': 'single value', 'type': 'string'}]}, 'for_undecided': {'oneOf': [{'items': {'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'title': 'single value', 'type': 'string'}]}, 'phase': {'oneOf': [{'items': {'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'title': 'single value', 'type': 'string'}]}}, 'type': 'object'}}, 'oneOf': [{'oneOf': [{'items': {'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'title': 'single value', 'type': 'string'}]}, {'additionalProperties': False, 'properties': {'allow_background': {'type': 'boolean'}, 'auto_escape': {'type': 'boolean'}, 'encoding': {'type': 'string'}, 'fail_entries': {'type': 'boolean'}, 'on_exit': {'$ref': '#/$defs/phaseSettings'}, 'on_filter': {'$ref': '#/$defs/phaseSettings'}, 'on_input': {'$ref': '#/$defs/phaseSettings'}, 'on_output': {'$ref': '#/$defs/phaseSettings'}, 'on_start': {'$ref': '#/$defs/phaseSettings'}}, 'type': 'object'}]}#