Generic steps¶
DebugStep¶
NotifyStep¶
Sends a notification about the successful import or export.
Arguments:
This step takes no arguments.
Added context:
bool notify: Will set notify to True.
ProgressStep¶
-
class
ProgressStep(step_size=5)[source]¶ Progress step.
Shows a progressbar when stderr is a terminal, or the progress in percent when stderr is a file.
- Parameters
step_size (int) – Step size in percent (defaults to 5).
Shows a progressbar when stderr is a terminal, or the progress in percent when stderr is a file.
Arguments:
int step: Step size in percent (defaults to 5).
Added context:
This step adds no context.
FlattenStep¶
-
class
FlattenStep(depth=-1)[source]¶ Convert nested dicts to flat dicts.
- Parameters
depth (int) – Number of nested levels to flatten. Set to -1 for infinite depth.
Examples:
Input:
{ 'fields': { 'name': { 'de': 'Deutsch', 'en': 'English', }, }, }
Output:
{ 'fields.name.de': 'Deutsch', 'fields.name.en': 'English', }
ExpandStep¶
-
class
ExpandStep(depth=-1)[source]¶ Convert flattened dicts into nested dicts.
- Parameters
depth (int) – Number of levels to expand. Set to -1 for infinite depth.
Examples:
Input:
{ 'fields.name.de': 'Deutsch', 'fields.name.en': 'English', }
Output:
{ 'fields': { 'name': { 'de': 'Deutsch', 'en': 'English', }, }, }