Пример #1
0
    def __init__(self,
                 descriptor=None,
                 filters=None,
                 sort=None,
                 encoding=None,
                 work_dir=None,
                 *args,
                 **kwargs):
        super(CodecArticleIndex, self).__init__(descriptor=descriptor,
                                                work_dir=work_dir,
                                                *args,
                                                **kwargs)

        # Our Meta Content
        self.decoded = NNTPMetaContent(work_dir=self.work_dir)

        # Switch our content subvalue to be a sorteddict()
        self.decoded.content = sorteddict()

        # Filters
        self.filters = filters

        # Sort Order
        self.sort = sort
        if self.sort is None or self.sort not in XOVER_GROUPINGS:
            self.sort = XoverGrouping.BY_POSTER_TIME

        # The character set encoding usenet content is retrieved in
        if encoding is None:
            self.encoding = NNTP_DEFAULT_ENCODING
        else:
            self.encoding = encoding
Пример #2
0
    def __init__(self, descriptor=None, work_dir=None, *args, **kwargs):
        super(CodecGroups, self).__init__(descriptor=descriptor,
                                          work_dir=work_dir,
                                          *args,
                                          **kwargs)

        # Our Decoded Content
        self.decoded = NNTPMetaContent(work_dir=self.work_dir)
Пример #3
0
    def reset(self):
        """
        Reset our decoded content
        """
        super(CodecGroups, self).reset()

        # Reset Our Result set
        self.decoded = NNTPMetaContent(work_dir=self.work_dir)
Пример #4
0
    def reset(self):
        """
        Reset our decoded content
        """
        super(CodecArticleIndex, self).reset()

        # Our Meta Content
        self.decoded = NNTPMetaContent(work_dir=self.work_dir)

        # Switch our decoded subvalue to be a sorteddict()
        self.decoded.content = sorteddict()