Beispiel #1
0
def zhihu_collection_main(i, f=None, start=1, end=INF, img=True, gif=False, email=False, **kw):
    import web2kindle.script.zhihu_collection

    kw.update({
        'img': img,
        'gif': gif,
        'email': email,
    })
    if i:
        web2kindle.script.zhihu_collection.main([i], int(start), int(end), kw)
    elif f:
        collection_list = read_file_to_list(f)
        if not isinstance(collection_list, list):
            collection_list = [collection_list]
        web2kindle.script.zhihu_collection.main(collection_list, start, end, kw)
Beispiel #2
0
def jianshu_wenji_main(i, f=None, start=1, end=INF, img=True, gif=False, email=False, **kw):
    import web2kindle.script.jianshu_wenji

    kw.update({
        'img': img,
        'gif': gif,
        'email': email,
    })

    if i:
        web2kindle.script.jianshu_wenji.main([i], int(start), int(end), kw)
    elif f:
        l = read_file_to_list(f)
        if not isinstance(l, list):
            l = [l]
        web2kindle.script.jianshu_wenji.main(l, start, end, kw)
Beispiel #3
0
def zhihu_answers_main(i, f, start, end, img, gif, email):
    import web2kindle.script.zhihu_answers
    kw = {}
    kw.update({
        'img': img,
        'gif': gif,
        'email': email,
    })

    if i:
        web2kindle.script.zhihu_answers.main([i], start, end, kw)
    elif f:
        people_list = read_file_to_list(f)
        if isinstance(people_list, list):
            web2kindle.script.zhihu_answers.main(people_list, start, end, kw)
        else:
            click.echo(people_list)
Beispiel #4
0
def zhihu_collection_main(i, f, start, end, img, gif, email):
    import web2kindle.script.zhihu_collection
    kw = {}
    kw.update({
        'img': img,
        'gif': gif,
        'email': email,
    })
    if i:
        web2kindle.script.zhihu_collection.main([i], start, end, kw)
    elif f:
        collection_list = read_file_to_list(f)
        if isinstance(collection_list, list):
            web2kindle.script.zhihu_collection.main(collection_list, start,
                                                    end, kw)
        else:
            click.echo(collection_list)