cli.py 文件源码

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

项目:pocket-cli 作者: rakanalh 项目源码 文件源码
def read(item_id, open_origin, archive):
    article = pocket_app.find_article(item_id)

    if not article:
        print('Article with this ID was not found.')

    url = 'https://getpocket.com/a/read/{}'.format(article['id'])

    print(format_article(article, header='Selected Article'))

    if open_origin:
        url = article['url']

    webbrowser.open_new_tab(url)

    if archive:
        pocket_app.archive_article(article['id'])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号