コード例 #1
0
ファイル: FeedService.py プロジェクト: Manjaro-Pek/NotifyAll
    def load_config(self):
        """Load configuration settings from the feed section in CONFIG_FILE."""
        Service._load_config(self)

        config = ConfigParser.ConfigParser()

        config.read(CONFIG_FILE)
        self._disabled = config.getboolean(self.SRV_NAME, "disabled")
        self.interval = int(config.get(self.SRV_NAME, "interval"))
        self.feeds = config.items("feeds")
コード例 #2
0
    def load_config(self):
        """Load configuration settings from the gmail section in CONFIG_FILE."""
        Service._load_config(self)

        config = ConfigParser.ConfigParser()

        config.read(CONFIG_FILE)
        self._disabled = config.getboolean(self.SRV_NAME, "disabled")
        self.username = config.get(self.SRV_NAME, "username")
        self.password = config.get(self.SRV_NAME, "password")
        self.interval = int(config.get(self.SRV_NAME, "interval"))
        self.labels = config.items("labels")
コード例 #3
0
ファイル: GmailService.py プロジェクト: pabluk/NotifyAll
    def load_config(self):
        """Load configuration settings from the gmail section in CONFIG_FILE."""
        Service._load_config(self)

        config = ConfigParser.ConfigParser()

        config.read(CONFIG_FILE)
        self._disabled = config.getboolean(self.SRV_NAME, "disabled")
        self.username = config.get(self.SRV_NAME, "username")
        self.password = config.get(self.SRV_NAME, "password")
        self.interval = int(config.get(self.SRV_NAME, "interval"))
        self.labels = config.items("labels")
コード例 #4
0
    def load_config(self):
        """Load configuration settings from the twitter section in CONFIG_FILE."""
        Service._load_config(self)

        config = ConfigParser.ConfigParser()

        config.read(CONFIG_FILE)
        self._disabled = config.getboolean(self.SRV_NAME, "disabled")
        self.username = config.get(self.SRV_NAME, "username")
        self.password = config.get(self.SRV_NAME, "password")
        self.interval = int(config.get(self.SRV_NAME, "interval"))

        # if doesn't exist make a directory to store cached profile images
        if not os.path.exists(CONFIG_DIR + "/" + self.SRV_NAME):
            os.mkdir(CONFIG_DIR + "/" + self.SRV_NAME)
コード例 #5
0
    def load_config(self):
        """Load configuration settings from the facebook section in CONFIG_FILE."""
        Service._load_config(self)

        config = ConfigParser.ConfigParser()

        config.read(CONFIG_FILE)
        self._disabled = config.getboolean(self.SRV_NAME, "disabled")
        self.fbid = config.get(self.SRV_NAME, "id")
        self.viewer = config.get(self.SRV_NAME, "viewer")
        self.key = config.get(self.SRV_NAME, "key")
        self.interval = int(config.get(self.SRV_NAME, "interval"))
        self.feed_url = self.FB_URL + \
                        "id=" + self.fbid + \
                        "&viewer=" + self.viewer + \
                        "&key=" + self.key + \
                        "&format=rss20"
コード例 #6
0
ファイル: FeedService.py プロジェクト: Manjaro-Pek/NotifyAll
 def __init__(self):
     Service.__init__(self, self.SRV_NAME)