# Path: chromabot/config.py
# class Config(object):
# 
#     def __init__(self, conffile=None):
#         # Try to locate our configuration directory
# 
#         proposals = [conffile, os.environ.get("CHROMABOT_CONFIG"),
#                     "../config/config.json", "./config/config.json",
#                     "/etc/chromabot/config.json"]
# 
#         if not self.check_exist(proposals):
#             logging.error("Could not locate config file!")
#             raise SystemExit
# 
#         self.refresh()
# 
#     def __getitem__(self, key):
#         return self.data[key]
# 
#     def __getattr__(self, key):
#         return self.data[key]
# 
#     def check_exist(self, proposed_paths):
#         for fullpath in proposed_paths:
#             if fullpath and os.path.exists(fullpath):
#                 self.conffile = fullpath
#                 return True
#         return False
# 
#     def praw(self):
#         """Return a praw.Reddit object configured according to this config"""
#         ua = self.data["bot"]["useragent"]
#         site = self.data["bot"].get('site')
# 
#         result = praw.Reddit(user_agent=ua, site_name=site)
#         return result
# 
#     def refresh(self):
#         with open(self.conffile) as data_file:
#             self.data = json.loads(data_file.read())
# 
#     # Useful properties follow
#     @property
#     def dbstring(self):
#         return self.data["db"]["connection"]
# 
#     @property
#     def game(self):
#         return self.data["game"]
# 
#     @property
#     def headquarters(self):
#         return self.data["bot"]["hq_sub"]
# 
#     @property
#     def password(self):
#         return self.data["bot"]["password"]
# 
#     @property
#     def username(self):
#         return self.data["bot"]["username"]


import sys
from collections import defaultdict
from chromabot.config import Config
from chromabot.db import *
#!/usr/bin/env python


sys.path.append(".")
sys.path.append("./chromabot")



def main():

# Path: chromabot/config.py
# class Config(object):
# 
#     def __init__(self, conffile=None):
#         # Try to locate our configuration directory
# 
#         proposals = [conffile, os.environ.get("CHROMABOT_CONFIG"),
#                     "../config/config.json", "./config/config.json",
#                     "/etc/chromabot/config.json"]
# 
#         if not self.check_exist(proposals):
#             logging.error("Could not locate config file!")
#             raise SystemExit
# 
#         self.refresh()
# 
#     def __getitem__(self, key):
#         return self.data[key]
# 
#     def __getattr__(self, key):
#         return self.data[key]
# 
#     def check_exist(self, proposed_paths):
#         for fullpath in proposed_paths:
#             if fullpath and os.path.exists(fullpath):
#                 self.conffile = fullpath
#                 return True
#         return False
# 
#     def praw(self):
#         """Return a praw.Reddit object configured according to this config"""
#         ua = self.data["bot"]["useragent"]
#         site = self.data["bot"].get('site')
# 
#         result = praw.Reddit(user_agent=ua, site_name=site)
#         return result
# 
#     def refresh(self):
#         with open(self.conffile) as data_file:
#             self.data = json.loads(data_file.read())
# 
#     # Useful properties follow
#     @property
#     def dbstring(self):
#         return self.data["db"]["connection"]
# 
#     @property
#     def game(self):
#         return self.data["game"]
# 
#     @property
#     def headquarters(self):
#         return self.data["bot"]["hq_sub"]
# 
#     @property
#     def password(self):
#         return self.data["bot"]["password"]
# 
#     @property
#     def username(self):
#         return self.data["bot"]["username"]


# Path: bin/realias.py
import sys
from collections import defaultdict
from chromabot.config import Config
from chromabot.db import *

#!/usr/bin/env python


sys.path.append(".")
sys.path.append("./chromabot")



def main():

    config = Config()