import click import tag_source.vscode import tag_source.stackoverflow import tag_source.segmentfault import tag_source.infoq import tag_source.cnblogs @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() elif source=='sf': tag_source.segmentfault.fetch() elif source=='infoq': tag_source.infoq.fetch() elif source=='cnblogs': tag_source.cnblogs.fetch() if __name__ == '__main__': fetch()