From 25120d496806280e91a17a6e5eda6272928a6d8d Mon Sep 17 00:00:00 2001 From: KAAAsS Date: Sun, 3 Oct 2021 22:30:37 +0800 Subject: [PATCH] =?UTF-8?q?CLI=20=E5=A2=9E=E5=8A=A0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beancount_bot/__init__.py | 8 ++++---- beancount_bot/main.py | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/beancount_bot/__init__.py b/beancount_bot/__init__.py index d8ea783..c8607a5 100644 --- a/beancount_bot/__init__.py +++ b/beancount_bot/__init__.py @@ -1,10 +1,10 @@ +__AUTHOR__ = 'KAAAsS' +__LICENSE__ = "MIT" +__VERSION__ = "1.1.5" + from beancount_bot import builtin from beancount_bot import dispatcher from beancount_bot import task from beancount_bot import transaction from beancount_bot import util from beancount_bot.main import main - -__AUTHOR__ = 'KAAAsS' -__LICENSE__ = "MIT" -__VERSION__ = "1.1.4" diff --git a/beancount_bot/main.py b/beancount_bot/main.py index 41d56d5..e7296b9 100644 --- a/beancount_bot/main.py +++ b/beancount_bot/main.py @@ -1,6 +1,6 @@ import click -from beancount_bot import bot, config as conf +from beancount_bot import bot, config as conf, __VERSION__ from beancount_bot.config import load_config, get_config from beancount_bot.session import load_session from beancount_bot.task import load_task, start_schedule_thread @@ -9,6 +9,8 @@ @click.command() +@click.version_option(__VERSION__, '-V', '--version', help='显示版本信息') +@click.help_option(help='显示帮助信息') @click.option('-c', '--config', default='beancount_bot.yml', help='配置文件路径') def main(config): """