diff options
Diffstat (limited to 'crocoite/cli.py')
-rw-r--r-- | crocoite/cli.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crocoite/cli.py b/crocoite/cli.py index 8473a0d..63199c9 100644 --- a/crocoite/cli.py +++ b/crocoite/cli.py @@ -111,8 +111,13 @@ def irc (): from configparser import ConfigParser from .irc import Bot + parser = argparse.ArgumentParser(description='IRC bot.') + parser.add_argument('--config', '-c', help='Config file location', metavar='PATH', default='chromebot.ini') + + args = parser.parse_args () + config = ConfigParser () - config.read ('chromebot.ini') + config.read (args.config) s = config['irc'] bot = Bot ( |