class ShowAlertAction(BaseAction): '''Show alert''' type = 'is.workflow.actions.alert' keyword = 'alert' show_cancel_button = BooleanField('WFAlertActionCancelButtonShown') text = Field('WFAlertActionMessage') title = Field('WFAlertActionTitle')
class AskAction(BaseAction): '''Ask for input''' itype = 'is.workflow.actions.ask' keyword = 'ask' question = Field('WFAskActionPrompt') input_type = Field('WFInputType', required=False) default_answer = VariablesField('WFAskActionDefaultAnswer', required=False)
class ImageConvertAction(BaseAction): '''Image convert''' type = 'is.workflow.actions.image.convert' keyword = 'convert_image' compression_quality = Field('WFImageCompressionQuality') format = Field('WFImageFormat') preserve_metadata = BooleanField('WFImagePreserveMetadata')
class IfAction(BaseAction): '''If: you must specify group_id of this if condition''' type = 'is.workflow.actions.conditional' keyword = 'if' condition = Field('WFCondition', capitalize=True) compare_with = Field('WFConditionalActionString') group_id = Field('GroupingIdentifier') default_fields = { 'WFControlFlowMode': 0, }
class RunShortcutAction(BaseAction): '''Run shortcut''' itype = 'is.workflow.actions.runworkflow' keyword = 'run_shortcut' show = BooleanField('WFShowWorkflow', default=False) shortcut_name = Field('WFWorkflowName')
class CountAction(BaseAction): '''Count''' itype = 'is.workflow.actions.count' keyword = 'count' count = Field('WFCountType', capitalize=True)
class CommentAction(BaseAction): '''Comment: just a comment''' itype = 'is.workflow.actions.comment' keyword = 'comment' text = Field('WFCommentActionText', help='Text to show in the comment')
class URLAction(BaseAction): '''URL: returns url as an output''' itype = 'is.workflow.actions.url' keyword = 'url' url = Field('WFURLActionURL')
class SetVariableAction(BaseAction): '''Set variable: saves input to a variable with a name=`name`''' itype = 'is.workflow.actions.setvariable' keyword = 'set_variable' name = Field('WFVariableName')
class AppendVariableAction(BaseAction): '''Append input to varaible''' itype = 'is.workflow.actions.appendvariable' keyword = 'append_variable' name = Field('WFVariableName')
class OpenAppAction(BaseAction): '''Opens the specified app.''' itype = 'is.workflow.actions.openapp' keyword = 'open_app' app = Field('WFAppIdentifier')
class SaveFileAction(BaseAction): '''Save file''' type = 'is.workflow.actions.documentpicker.save' keyword = 'save_file' path = VariablesField('WFFileDestinationPath') overwrite = Field('WFSaveFileOverwrite') show_picker = BooleanField('WFAskWhereToSave')
class ChooseFromListAction(BaseAction): '''Choose from list''' itype = 'is.workflow.actions.choosefromlist' keyword = 'choose_from_list' prompt = Field('WFChooseFromListActionPrompt', required=False) select_multiple = BooleanField('WFChooseFromListActionSelectMultiple', required=False) select_all_initially = BooleanField('WFChooseFromListActionSelectAll', required=False)
class GetTimeBetweenDates(BaseAction): '''Get time difference between dates''' itype = 'is.workflow.actions.gettimebetweendates' keyword = 'get_time_between_dates' units = ChoiceField('WFTimeUntilUnit', choices=DATE_DIFF_UNITS_CHOICES, default=DATE_DIFF_UNITS_CHOICES[0]) custom_date = Field('WFTimeUntilCustomDate', required=False)
class ElseAction(BaseAction): '''Else: else for a specified group_id''' type = 'is.workflow.actions.conditional' keyword = 'else' group_id = Field('GroupingIdentifier') default_fields = { 'WFControlFlowMode': 1, }
class FormatDateAction(BaseAction): '''Format date''' itype = 'is.workflow.actions.format.date' keyword = 'format_date' format = Field('WFDateFormat') default_fields = { 'WFDateFormatStyle': 'Custom', }
class EndIfAction(BaseAction): '''EndIf: end a condition with specified group_id''' type = 'is.workflow.actions.conditional' keyword = 'endif' group_id = Field('GroupingIdentifier') default_fields = { 'WFControlFlowMode': 2, }
class IfAction(BaseAction): '''If''' itype = 'is.workflow.actions.conditional' keyword = 'if' condition = ChoiceField('WFCondition', choices=IF_CHOICES, capitalize=True) compare_with = Field('WFConditionalActionString') group_id = GroupIDField('GroupingIdentifier') default_fields = { 'WFControlFlowMode': 0, }
class SplitTextAction(BaseAction): '''Split text''' itype = 'is.workflow.actions.text.split' keyword = 'split_text' separator_type = ChoiceField( 'WFTextSeparator', choices=SPLIT_SEPARATOR_CHOICES, default=SPLIT_SEPARATOR_CHOICES[0], ) custom_separator = Field( 'WFTextCustomSeparator', help='Works only with "Custom" `separator_type`', required=False, )
class MenuItemAction(BaseAction): ''' Menu item You must specify the title for the item. After this action write all actions which you want to be executed when a user selects this option in the menu. ''' itype = 'is.workflow.actions.choosefrommenu' keyword = 'menu_item' group_id = GroupIDField('GroupingIdentifier') title = Field('WFMenuItemTitle') default_fields = { 'WFControlFlowMode': 1, }
class GetDictionaryValueAction(BaseAction): '''Get dictionary value''' itype = 'is.workflow.actions.getvalueforkey' keyword = 'get_value_for_key' key = Field('WFDictionaryKey')
class SetClipboardAction(BaseAction): itype = 'is.workflow.actions.setclipboard' keyword = 'set_clipboard' local_only = BooleanField('WFLocalOnly', required=False) expiration_date = Field('WFExpirationDate', required=False)