main.py 613 字节
Newer Older
1 2 3
import click
import tag_source.vscode
import tag_source.stackoverflow
F
feilong 已提交
4
import tag_source.segmentfault
F
feilong 已提交
5 6
import tag_source.infoq
import tag_source.cnblogs
7 8 9 10 11 12 13 14 15

@click.command()
@click.option('--source')
def fetch(source):
    click.echo('will fetch tags from %s!' % source)
    if source=='vscode':
        tag_source.vscode.fetch()
    elif source=='so':
        tag_source.stackoverflow.fetch()
F
feilong 已提交
16 17
    elif source=='sf':
        tag_source.segmentfault.fetch()
F
feilong 已提交
18 19 20 21
    elif source=='infoq':
        tag_source.infoq.fetch()
    elif source=='cnblogs':
        tag_source.cnblogs.fetch()
22 23 24

if __name__ == '__main__':
    fetch()