Renaming this for backwards compatibility.
This commit is contained in:
parent
735d0d774a
commit
b9da306c8f
1 changed files with 0 additions and 0 deletions
26
rtmbot.py
Executable file
26
rtmbot.py
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
from argparse import ArgumentParser
|
||||
|
||||
import yaml
|
||||
from rtmbot import RtmBot
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument(
|
||||
'-c',
|
||||
'--config',
|
||||
help='Full path to config file.',
|
||||
metavar='path'
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
# load args with config path
|
||||
args = parse_args()
|
||||
config = yaml.load(open(args.config or 'rtmbot.conf', 'r'))
|
||||
bot = RtmBot(config)
|
||||
try:
|
||||
bot.start()
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(0)
|
Loading…
Add table
Add a link
Reference in a new issue