flexget.plugins.modify.manipulate module#

class flexget.plugins.modify.manipulate.Manipulate[source]#

Bases: object

The manipulate plugin.

Usage:

manipulate:
  - <destination field>:
      [find_all]: <boolean>
      [phase]: <phase>
      [from]: <source field>
      [extract]: <regexp>
      [separator]: <text>
      [replace]:
        regexp: <regexp>
        format: <regexp>
      [remove]: <boolean>
      [erase]: <list of regexps>

Example:

manipulate:
  - title:
      extract: \[\d\d\d\d\](.*)
  - title:
      erase:
        - "^unwanted.noise."
        - "^more.advertisement."
on_task_filter(task, config)[source]#
on_task_metainfo(task, config)[source]#
on_task_modify(task, config)[source]#
on_task_start(task, config)[source]#

Separate the config into a dict with a list of jobs per phase.

Allow us to skip phases without any jobs in them.

process(entry, jobs)[source]#

Process given jobs from config for an entry.

Parameters:
  • entry – Entry to modify

  • jobs – Config items to run on this entry

Returns:

True if any fields were modified

schema = {'items': {'additionalProperties': {'additionalProperties': False, 'properties': {'erase': {'items': {'format': 'regex', 'type': 'string'}, 'type': 'array'}, 'extract': {'format': 'regex', 'type': 'string'}, 'find_all': {'type': 'boolean'}, 'from': {'type': 'string'}, 'phase': {'enum': ['metainfo', 'filter', 'modify']}, 'remove': {'type': 'boolean'}, 'replace': {'additionalProperties': False, 'properties': {'format': {'type': 'string'}, 'regexp': {'format': 'regex', 'type': 'string'}}, 'required': ['regexp', 'format'], 'type': 'object'}, 'separator': {'type': 'string'}}, 'type': 'object'}, 'type': 'object'}, 'type': 'array'}#
flexget.plugins.modify.manipulate.register_plugin()[source]#