mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
DOCX Input, finally done. Let the bugs roam!
This commit is contained in:
parent
c73c00ad0b
commit
ca36afdfae
@ -554,6 +554,7 @@ from calibre.ebooks.conversion.plugins.txt_input import TXTInput
|
|||||||
from calibre.ebooks.conversion.plugins.lrf_input import LRFInput
|
from calibre.ebooks.conversion.plugins.lrf_input import LRFInput
|
||||||
from calibre.ebooks.conversion.plugins.chm_input import CHMInput
|
from calibre.ebooks.conversion.plugins.chm_input import CHMInput
|
||||||
from calibre.ebooks.conversion.plugins.snb_input import SNBInput
|
from calibre.ebooks.conversion.plugins.snb_input import SNBInput
|
||||||
|
from calibre.ebooks.conversion.plugins.docx_input import DOCXInput
|
||||||
|
|
||||||
from calibre.ebooks.conversion.plugins.epub_output import EPUBOutput
|
from calibre.ebooks.conversion.plugins.epub_output import EPUBOutput
|
||||||
from calibre.ebooks.conversion.plugins.fb2_output import FB2Output
|
from calibre.ebooks.conversion.plugins.fb2_output import FB2Output
|
||||||
@ -595,6 +596,7 @@ plugins += [
|
|||||||
LRFInput,
|
LRFInput,
|
||||||
CHMInput,
|
CHMInput,
|
||||||
SNBInput,
|
SNBInput,
|
||||||
|
DOCXInput,
|
||||||
]
|
]
|
||||||
plugins += [
|
plugins += [
|
||||||
EPUBOutput,
|
EPUBOutput,
|
||||||
|
20
src/calibre/ebooks/conversion/plugins/docx_input.py
Normal file
20
src/calibre/ebooks/conversion/plugins/docx_input.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# vim:fileencoding=utf-8
|
||||||
|
from __future__ import (unicode_literals, division, absolute_import,
|
||||||
|
print_function)
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
|
from calibre.customize.conversion import InputFormatPlugin
|
||||||
|
|
||||||
|
class DOCXInput(InputFormatPlugin):
|
||||||
|
name = 'DOCX Input'
|
||||||
|
author = 'Kovid Goyal'
|
||||||
|
description = 'Convert DOCX files (.docx) to HTML'
|
||||||
|
file_types = set(['docx'])
|
||||||
|
|
||||||
|
def convert(self, stream, options, file_ext, log, accelerators):
|
||||||
|
from calibre.ebooks.docx.to_html import Convert
|
||||||
|
return Convert(stream, log=log)()
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user