From e993381e888cbf0d14a32ee9e01df78e455bf019 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Nov 2013 23:31:20 +0530 Subject: [PATCH] Conversion: Treat .docm the same as .docx files, ignoring any macros in the file. Fixes #1247565 [Calibre does not recognise Word files in docm format](https://bugs.launchpad.net/calibre/+bug/1247565) --- src/calibre/ebooks/__init__.py | 2 +- src/calibre/ebooks/conversion/plugins/docx_input.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/__init__.py b/src/calibre/ebooks/__init__.py index b308b092e9..10b3b43b75 100644 --- a/src/calibre/ebooks/__init__.py +++ b/src/calibre/ebooks/__init__.py @@ -30,7 +30,7 @@ BOOK_EXTENSIONS = ['lrf', 'rar', 'zip', 'rtf', 'lit', 'txt', 'txtz', 'text', 'ht 'html', 'htmlz', 'xhtml', 'pdf', 'pdb', 'updb', 'pdr', 'prc', 'mobi', 'azw', 'doc', 'epub', 'fb2', 'djv', 'djvu', 'lrx', 'cbr', 'cbz', 'cbc', 'oebzip', 'rb', 'imp', 'odt', 'chm', 'tpz', 'azw1', 'pml', 'pmlz', 'mbp', 'tan', 'snb', - 'xps', 'oxps', 'azw4', 'book', 'zbf', 'pobi', 'docx', 'md', + 'xps', 'oxps', 'azw4', 'book', 'zbf', 'pobi', 'docx', 'docm', 'md', 'textile', 'markdown', 'ibook', 'iba', 'azw3', 'ps'] class HTMLRenderer(object): diff --git a/src/calibre/ebooks/conversion/plugins/docx_input.py b/src/calibre/ebooks/conversion/plugins/docx_input.py index 190a771379..30a4bb3868 100644 --- a/src/calibre/ebooks/conversion/plugins/docx_input.py +++ b/src/calibre/ebooks/conversion/plugins/docx_input.py @@ -11,8 +11,8 @@ from calibre.customize.conversion import InputFormatPlugin, OptionRecommendation class DOCXInput(InputFormatPlugin): name = 'DOCX Input' author = 'Kovid Goyal' - description = 'Convert DOCX files (.docx) to HTML' - file_types = set(['docx']) + description = _('Convert DOCX files (.docx and .docm) to HTML') + file_types = {'docx', 'docm'} options = { OptionRecommendation(name='docx_no_cover', recommended_value=False,