Exemplo 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
Exemplo 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
Exemplo n.º 3
0
def get_reader(docpath):
    global EXT2READER
    return EXT2READER.get(get_ext(docpath).lower())
Exemplo n.º 4
0
def get_reader(docpath):
    global EXT2READER
    return EXT2READER.get(get_ext(docpath).lower())