Add support for .txt files
This commit is contained in:
parent
0638b9bbbb
commit
53271495f7
5 changed files with 30 additions and 12 deletions
|
@ -12,8 +12,6 @@ unsupported_extensions = {
|
|||
'.pot',
|
||||
'.rdf',
|
||||
'.srt',
|
||||
'.text',
|
||||
'.txt',
|
||||
'.wsdl',
|
||||
'.xpdl',
|
||||
'.xsd',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import shutil
|
||||
from typing import Dict
|
||||
from . import abstract
|
||||
|
||||
|
@ -6,13 +7,9 @@ class HarmlessParser(abstract.AbstractParser):
|
|||
""" This is the parser for filetypes that do not contain metadata. """
|
||||
mimetypes = {'text/plain', }
|
||||
|
||||
def __init__(self, filename: str) -> None:
|
||||
super().__init__(filename)
|
||||
self.filename = filename
|
||||
self.output_filename = filename
|
||||
|
||||
def get_meta(self) -> Dict[str, str]:
|
||||
return dict()
|
||||
|
||||
def remove_all(self) -> bool:
|
||||
shutil.copy(self.filename, self.output_filename)
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue