本文整理汇总了Python中workflow.Workflow方法的典型用法代码示例。如果您正苦于以下问题:Python workflow.Workflow方法的具体用法?Python workflow.Workflow怎么用?Python workflow.Workflow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类workflow
的用法示例。
在下文中一共展示了workflow.Workflow方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: import workflow [as 别名]
# 或者: from workflow import Workflow [as 别名]
def main():
wf = Workflow()
args = parse_args(wf.args)
title = 'Add this link'
if args.add_archive:
title = 'Add and archive this link'
wf.add_item(title, arg=args.query, valid=True)
tags = wf.cached_data('pocket_tags', max_age=0)
if tags:
for tag in tags:
if args.query:
autocomplete = '%s, #%s' % (args.query, tag)
else:
autocomplete = '#%s' % tag
wf.add_item(' > Add #%s' % tag,
autocomplete=autocomplete,
valid=False)
wf.send_feedback()
示例2: wf
# 需要导入模块: import workflow [as 别名]
# 或者: from workflow import Workflow [as 别名]
def wf():
"""Lazy `Workflow` object."""
global _wf
if _wf is None:
_wf = workflow.Workflow()
return _wf
示例3: wf
# 需要导入模块: import workflow [as 别名]
# 或者: from workflow import Workflow [as 别名]
def wf():
"""Return Workflow object for this module.
Returns:
workflow.Workflow: Workflow object for current workflow.
"""
global _wf
if _wf is None:
_wf = workflow.Workflow()
return _wf
示例4: wf
# 需要导入模块: import workflow [as 别名]
# 或者: from workflow import Workflow [as 别名]
def wf():
global _wf
if _wf is None:
_wf = Workflow()
return _wf
示例5: create_workflow
# 需要导入模块: import workflow [as 别名]
# 或者: from workflow import Workflow [as 别名]
def create_workflow():
return Workflow(
update_settings={
'github_slug': 'danielecook/gist-alfred',
'version': __version__,
'frequency': 7,
}
)
示例6: wf
# 需要导入模块: import workflow [as 别名]
# 或者: from workflow import Workflow [as 别名]
def wf():
global _wf
if _wf is None:
_wf = workflow.Workflow()
return _wf
示例7: wf
# 需要导入模块: import workflow [as 别名]
# 或者: from workflow import Workflow [as 别名]
def wf():
"""Return `Workflow` object for this module.
Returns:
workflow.Workflow: `Workflow` object for current workflow.
"""
global _wf
if _wf is None:
_wf = workflow.Workflow()
return _wf