本文整理匯總了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