Commit cdb3fbb9 authored by Romain Courteaud's avatar Romain Courteaud

Do not require the configuration file.

Allows to quickly run from a shell with a memory storage
parent 03730196
......@@ -9,11 +9,20 @@ def runUrlChecker():
@runUrlChecker.command("bot", short_help="Runs url checker bot.")
@click.option(
"--sqlite",
"-s",
help="The path of the sqlite DB.",
default=":memory:",
show_default=True,
)
@click.option("--dns", "-d", help="The IP of the DNS server.")
@click.option("--url", "-u", help="The url to check.")
@click.option("--domain", "-m", help="The domain to check.")
@click.option("--sqlite", "-s", help="The path of the sqlite DB.")
@click.argument("configuration")
def runWebBot(url, domain, sqlite, configuration):
@click.option(
"--configuration", "-f", help="The path of the configuration file."
)
def runWebBot(sqlite, dns, url, domain, configuration):
# click.echo("Running url checker bot")
mapping = {}
......@@ -23,6 +32,8 @@ def runWebBot(url, domain, sqlite, configuration):
mapping["DOMAIN"] = url
if sqlite:
mapping["SQLITE"] = sqlite
if dns:
mapping["DNS"] = dns
bot = create_bot(cfgfile=configuration, mapping=mapping)
return bot.run()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment