Skip to content

Commit

Permalink
CLI 增加版本号选项
Browse files Browse the repository at this point in the history
  • Loading branch information
kaaass committed Oct 3, 2021
1 parent 0166c63 commit 25120d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions beancount_bot/__init__.py
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 3 additions & 1 deletion beancount_bot/main.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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):
"""
Expand Down

0 comments on commit 25120d4

Please sign in to comment.