first commit!
This commit is contained in:
parent
9996d8665d
commit
84017f64f9
Binary file not shown.
Before Width: | Height: | Size: 106 KiB |
Binary file not shown.
Before Width: | Height: | Size: 299 KiB |
@ -14,15 +14,15 @@ parser.add_argument("-j", "--jid", help="jabber identifier", type=str, required=
|
||||
parser.add_argument("-p", "--password", help="password", type=str, required=True)
|
||||
parser.add_argument("-m", "--muc", help="destination muc", type=str, required=True)
|
||||
parser.add_argument("-n", "--nick", help="nickname of the bot", default="archivist", type=str)
|
||||
parser.add_argument("-o", "--output", help="output folder", default="files", type=str)
|
||||
args = parser.parse_args()
|
||||
|
||||
class ArchivistBot(ClientXMPP):
|
||||
|
||||
def __init__(self, jid, password, room, nick):
|
||||
def __init__(self, jid, password, room, nick, output):
|
||||
ClientXMPP.__init__(self, jid, password)
|
||||
|
||||
self.datadir = 'files/'
|
||||
|
||||
self.datadir = output
|
||||
self.room = room
|
||||
self.nick = nick
|
||||
|
||||
@ -95,7 +95,7 @@ if __name__ == '__main__':
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG, format='%(levelname)-8s %(message)s')
|
||||
|
||||
client = ArchivistBot(args.jid, args.password, args.muc, args.nick)
|
||||
client = ArchivistBot(args.jid, args.password, args.muc, args.nick, args.output)
|
||||
|
||||
if client.connect():
|
||||
client.process(block=True)
|
||||
|
Loading…
Reference in New Issue
Block a user