Example #1
0
 def __init__(self, log, data, config_path, picasa):
     """
     @type data: Data
     @type log: Logger
     """
     PublisherBase.__init__(self,
                            'twitter',
                            log,
                            data,
                            config_path,
                            picasa=picasa)
Example #2
0
 def __init__(self, log, data, config_path):
     """
     @type data: Data
     @type log: Logger
     """
     PublisherBase.__init__(self, 'tumblr', log, data, config_path)
     # init tumblr keys
     fb_data = config.load_config(config_path, 'tumblr_credentials.json')
     self.tumblr_consumer_key = fb_data['tumblr_consumer_key']
     self.tumblr_consumer_secret = fb_data['tumblr_consumer_secret']
     self.dummy = fb_data['dummy'] if 'dummy' in fb_data else False
     self.log.info(
         '[{0}] Loaded config key: {1}, secret: {2}, dummy: {3}'.format(
             self.name, self.tumblr_consumer_key,
             self.tumblr_consumer_secret, self.dummy))
Example #3
0
 def __init__(self, log, data, config_path, picasa=None):
     """
     @type data: Data
     @type log: Logger
     """
     PublisherBase.__init__(self, 'facebook', log, data, config_path,
                            picasa)
     fb_data = config.load_config(config_path, 'facebook_credentials.json')
     self.facebook_api_key = fb_data['facebook_api_key']
     self.facebook_secret = fb_data['facebook_secret']
     self.dummy = fb_data['dummy'] if 'dummy' in fb_data else False
     self.log.info(
         '[{0}] Loaded config key: {1}, secret: {2}, dummy: {3}'.format(
             self.name, self.facebook_api_key, self.facebook_secret,
             self.dummy))
Example #4
0
 def __init__(self, log, data, config_path):
     """
     @type data: Data
     @type log: Logger
     """
     PublisherBase.__init__(self, 'linkedin', log, data, config_path)
     # init linkedin keys
     cfg = config.load_config(config_path, 'linkedin_credentials.json')
     self.consumer_key = cfg['consumer_key'].encode(encoding='utf-8',
                                                    errors='ignore')
     self.consumer_secret = cfg['consumer_secret'].encode(encoding='utf-8',
                                                          errors='ignore')
     self.dummy = cfg['dummy'] if 'dummy' in cfg else False
     self.log.info(
         '[{0}] Loaded config key: {1}, secret: {2}, dummy: {3}'.format(
             self.name, self.consumer_key, self.consumer_secret,
             self.dummy))
Example #5
0
 def __init__(self, log, data, config_path, picasa=None):
     """
     @type data: Data
     @type log: Logger
     """
     PublisherBase.__init__(self,
                            'flickr',
                            log,
                            data,
                            config_path,
                            picasa=picasa)
     # init flickr keys
     fb_data = config.load_config(config_path, 'flickr_credentials.json')
     self.flickr_consumer_key = fb_data['flickr_consumer_key'].encode(
         encoding='utf-8', errors='ignore')
     self.flickr_consumer_secret = fb_data['flickr_consumer_secret'].encode(
         encoding='utf-8', errors='ignore')
     self.dummy = fb_data['dummy'] if 'dummy' in fb_data else False
     self.log.info(
         '[{0}] Loaded config key: {1}, secret: {2}, dummy: {3}'.format(
             self.name, self.flickr_consumer_key,
             self.flickr_consumer_secret, self.dummy))
Example #6
0
 def __init__(self, name, log, data, config_path):
     PublisherBase.__init__(self, name, log, data, config_path)