1
0
mirror of synced 2024-11-22 17:24:23 +01:00
mat2/libmat2/abstract.py
jvoisin 38fae60b8b Rename some files to simplify packaging
- the `src` folder is now `libmat2`
- the `main.py` script is now `mat2.py`
2018-05-18 23:52:40 +02:00

25 lines
549 B
Python

import abc
import os
class AbstractParser(abc.ABC):
meta_list = set()
mimetypes = set()
def __init__(self, filename: str):
self.filename = filename
fname, extension = os.path.splitext(filename)
self.output_filename = fname + '.cleaned' + extension
@abc.abstractmethod
def get_meta(self) -> dict:
pass
@abc.abstractmethod
def remove_all(self) -> bool:
pass
def remove_all_lightweight(self) -> bool:
""" Remove _SOME_ metadata. """
return self.remove_all()