Skip to content

Commit

Permalink
Add 'info' command to CLI for project and developer information
Browse files Browse the repository at this point in the history
  • Loading branch information
upayanmazumder committed Nov 29, 2024
1 parent 0b6bf98 commit 63123e1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CLI/cas/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,28 @@ def pull_articles():
def show_help():
help_text = Text("""
Usage:
cas info Show project and developer information.
cas help Show this help article.
cas auth Start authentication process.
cas push <article-link> Add an article.
cas pull Retrieve your articles.
""", style="bold cyan")
console.print(help_text)

def show_info():
info_text = Text("""
Project Information:
GitHub Repo: https://github.com/upayanmazumder/Collaborative-Article-Sharing
PyPI Repo: https://pypi.org/project/collaborative-article-sharing/
Discord: https://discord.gg/wQTZcXpcaY
Website: https://cas.upayan.dev
Developer Information:
Name: Upayan Mazumder
My Site: https://upayan.dev
""", style="bold yellow")
console.print(info_text)

def main():
if len(sys.argv) < 2:
show_help()
Expand All @@ -139,6 +154,8 @@ def main():
app = Flask(__name__)
app.register_blueprint(auth_bp)
app.run(port=8000)
elif sys.argv[1] == "info":
show_info()
else:
show_help()

Expand Down

0 comments on commit 63123e1

Please sign in to comment.