filter.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:pomodoro-alfred 作者: ecbrodie 项目源码 文件源码
def main(wf):
    query = None

    args = wf.args
    if len(wf.args):
        query = wf.args[0]

    items = all_items()
    if query:
        items = wf.filter(query, items, lambda item: item['arg'])

    if not items:
        wf.add_item('Unknown pomo command', icon=ICON_WARNING)

    for item in items:
        wf.add_item(item['title'], item['description'], arg=item['arg'], valid=True)

    # Send output to Alfred. You can only call this once.
    wf.send_feedback()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号