1
0
Fork 0
mirror of synced 2025-07-03 11:57:26 +02:00

Add support for .txt files

This commit is contained in:
jvoisin 2018-07-06 00:42:09 +02:00
parent 0638b9bbbb
commit 53271495f7
5 changed files with 30 additions and 12 deletions

View file

@ -12,8 +12,6 @@ unsupported_extensions = {
'.pot',
'.rdf',
'.srt',
'.text',
'.txt',
'.wsdl',
'.xpdl',
'.xsd',

View file

@ -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