aboutsummaryrefslogtreecommitdiff
path: root/start.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-24 15:26:31 +0100
committerGravatar jesopo2018-09-24 15:26:31 +0100
commitbb641b08709c3e6177729121010bc02692600360 (patch)
tree9ddee03d0b9f4aa222f222b104f0a1fec9259356 /start.py
parentMove most code in root directory to src/ (diff)
signature
Move log and database files to their own folders
Diffstat (limited to 'start.py')
-rwxr-xr-xstart.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/start.py b/start.py
index 53b08023..b105b49c 100755
--- a/start.py
+++ b/start.py
@@ -12,8 +12,10 @@ arg_parser = argparse.ArgumentParser(
description="Python3 event-driven asynchronous modular IRC bot")
arg_parser.add_argument("--config", "-c", default="bot.conf",
help="Location of the JSON config file")
-arg_parser.add_argument("--database", "-d", default="bot.db",
+arg_parser.add_argument("--database", "-d", default="databases/bot.db",
help="Location of the sqlite3 database file")
+arg_parser.add_argument("--log", "-l", default="logs/bot.log",
+ help="Location of the main log file")
arg_parser.add_argument("--verbose", "-v", action="store_true")
args = arg_parser.parse_args()
@@ -27,7 +29,7 @@ bot._exports = exports = Exports.Exports()
bot.modules = modules = ModuleManager.ModuleManager(bot, events, exports,
os.path.join(directory, "modules"))
bot.line_handler = IRCLineHandler.LineHandler(bot, bot._events)
-bot.log = Logging.Log(bot, directory, "bot.log")
+bot.log = Logging.Log(bot, directory, args.log)
bot.database = Database.Database(bot, directory, args.database)
bot.config = Config.Config(bot, directory, args.config).load_config()
bot.args = args