Created
February 10, 2021 01:39
-
-
Save Sealjay/a96bc2ddfd16fbbc3173f22f603c0e15 to your computer and use it in GitHub Desktop.
bingnews-cli - click example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
@click.group() | |
def cli(): | |
"""A CLI to search for news articles using Bing News, and return appropriate articles.""" | |
@cli.command("phrase") | |
@click.option("-p", "--search_phrase", prompt="What phrase are you searching for?") | |
def search_bing_by_phrase(search_phrase): | |
"""Search Bing News by word or phrase.""" | |
pass | |
if __name__ == "__main__": | |
cli() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment