-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcomplementary.py
executable file
·39 lines (35 loc) · 1.13 KB
/
complementary.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/python
# -*- coding: utf-8 -*-
# vim:set ts=8 sts=8 sw=8 tw=80 noet cc=80:
import configparser
import logging
from module import Module
from scripting import Scripting
from cookies import Cookies
from dice import Dice
from masochist import Masochist
from online import Online
from lutcha import Lutcha
class Complementary(Module):
def __init__(self, search_engines):
super(Complementary, self).__init__(name="complementary")
self.scripting = Scripting(search_engines, parent=self)
self.cookies = Cookies(parent=self)
self.lutcha = Lutcha(parent=self)
self.dice = Dice(parent=self)
self.masochist = Masochist(parent=self)
self.online = Online(parent=self)
self.log.info("load complete")
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO,
format='%(levelname)-8s %(message)s')
filename = "orakel.cfg"
config = configparser.SafeConfigParser()
config.read(filename)
search_engines = config.get("db", "searchengines")
complementary = Complementary(search_engines)
try:
complementary.start()
except KeyboardInterrupt:
complementary.log.info("unloading")
complementary.stop()