Converters (Experimental)

Convert HWPv5 documents into other document formats.

Requirements

The conversions are performed with XSLT internally and verified with Relax NG if possible.

For these processing, the converters requires lxml (homepage) or libxml2’s xsltproc / xmllint programs.

For lxml installation:

pip install --user lxml # install to user directory
pip install lxml        # install with virtualenv

or see Installing lxml.

(Currently conversions with lxml 2.3.5 is tested and verified to be working. lxml versions below that may work too, but those are not tested.)

For xsltproc / xmllint installation:

sudo apt-get install xsltproc libxml2-utils  # Debian/Ubuntu

Optional environment variables PYHWP_XSLTPROC and PYHWP_XMLLINT specifies the paths of the each programs. (If not set, xsltproc and/or xmllint should be in the one of the directories specified in PATH.)

hwp5odt: ODT conversion

HWPv5 to odt converter

usage: hwp5odt [-h] [--version] [--loglevel LOGLEVEL] [--logfile LOGFILE]
               [--output OUTPUT] [--styles | --content | --document]
               [--embed-image | --no-embed-image]
               <hwp5file>

Positional Arguments

<hwp5file>

.hwp file to convert

Named Arguments

--version

show program’s version number and exit

--loglevel

Set log level.

--logfile

Set log file.

--output

Output file

--styles

Generate styles.xml

Default: False

--content

Generate content.xml

Default: False

--document

Generate .fodt

Default: False

--embed-image

Embed images in output xml.

Default: False

--no-embed-image

Do not embed images in output xml.

Default: False

hwp5html: HTML conversion

HWPv5 to HTML converter

usage: hwp5html [-h] [--version] [--loglevel LOGLEVEL] [--logfile LOGFILE]
                [--output OUTPUT] [--css | --html]
                <hwp5file>

Positional Arguments

<hwp5file>

.hwp file to convert

Named Arguments

--version

show program’s version number and exit

--loglevel

Set log level.

--logfile

Set log file.

--output

Output file

--css

Generate CSS

Default: False

--html

Generate HTML

Default: False

hwp5txt: text conversion

HWPv5 to txt converter

usage: hwp5txt [-h] [--version] [--loglevel LOGLEVEL] [--logfile LOGFILE]
               [--output OUTPUT]
               <hwp5file>

Positional Arguments

<hwp5file>

.hwp file to convert

Named Arguments

--version

show program’s version number and exit

--loglevel

Set log level.

--logfile

Set log file.

--output

Output file