Include .text in TXTZ.

This commit is contained in:
John Schember 2011-03-11 21:13:38 -05:00
parent ab8734c701
commit bcb47ac6b3
2 changed files with 2 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: