Esempio n. 1
0
    def read_info(self):
        ext2format = {
            'doc': 'word',
            'docx': 'word',
            'pptx': 'ppt',
            }
        ext = get_ext(self.docpath)
        fmt = ext2format.get(ext, ext)

        info = {
            'format': fmt,
            'size': get_file_size(self.docpath),
            'paths': [self.docpath],
            }
        return info
Esempio n. 2
0
    def read_info(self):
        ext2format = {
            'doc': 'word',
            'docx': 'word',
            'pptx': 'ppt',
        }
        ext = get_ext(self.docpath)
        fmt = ext2format.get(ext, ext)

        info = {
            'format': fmt,
            'size': get_file_size(self.docpath),
            'paths': [self.docpath],
        }
        return info
Esempio n. 3
0
def get_reader(docpath):
    global EXT2READER
    return EXT2READER.get(get_ext(docpath).lower())
Esempio n. 4
0
def get_reader(docpath):
    global EXT2READER
    return EXT2READER.get(get_ext(docpath).lower())