diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index cd4c866562..b24a5c9a17 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -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 diff --git a/src/calibre/ebooks/txt/input.py b/src/calibre/ebooks/txt/input.py index 3c256fda7a..99f7035800 100644 --- a/src/calibre/ebooks/txt/input.py +++ b/src/calibre/ebooks/txt/input.py @@ -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: