This commit is contained in:
Kovid Goyal 2011-03-11 19:44:00 -07:00
commit 6b06c0606e
3 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ class TXT2TXTZ(FileTypePlugin):
'containing Markdown or Textile references to images. The referenced '
'images as well as the TXT file are added to the archive.')
version = numeric_version
file_types = set(['txt'])
file_types = set(['txt', 'text'])
supported_platforms = ['windows', 'osx', 'linux']
on_import = True

View File

@ -65,7 +65,6 @@ class TXTInput(InputFormatPlugin):
txt = ''
log.debug('Reading text from file...')
length = 0
# [(u'path', mime),]
# Extract content from zip archive.
if file_ext == 'txtz':
@ -73,7 +72,7 @@ class TXTInput(InputFormatPlugin):
zf.extractall('.')
for x in walk('.'):
if os.path.splitext(x)[1].lower() == '.txt':
if os.path.splitext(x)[1].lower() in ('.txt', '.text'):
with open(x, 'rb') as tf:
txt += tf.read() + '\n\n'
else:

View File

@ -340,6 +340,7 @@ class FileIconProvider(QFileIconProvider):
'rar' : 'rar',
'zip' : 'zip',
'txt' : 'txt',
'text' : 'txt',
'prc' : 'mobi',
'azw' : 'mobi',
'mobi' : 'mobi',