변환기들 (실험적)

HWPv5 문서를 다른 문서 형식으로 변환한다.

필요한 것

이 변환들은 내부적으로 XSLT 를 사용하며, 가능한 경우 Relax NG 로 결과물이 검증된다.

이를 수행하려면 lxml (homepage)이나 libxml2xsltproc / xmllint 프로그램이 필요하다.

lxml를 설치하려면:

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

혹은 Installing lxml 을 참조하라.

(현재 lxml 2.3.5 을 이용한 변환은 테스트되었고 잘 작동하는 것으로 확인되었다. 그보다 낮은 버전의 lxml으로도 될 수 있으나, 테스트되지는 않았다.)

xsltproc / xmllint 를 설치하려면:

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

선택적으로 설정될 수 있는 PYHWP_XSLTPROCPYHWP_XMLLINT 환경변수는 각 프로그램의 위치를 지정한다. (만약 설정되지 않으면, xsltprocxmllint 는 환경변수 PATH 가 지정하는 디렉토리 중 하나에 존재해야 한다.

hwp5odt: ODT 변환

HWPv5-to-ODT 변환기

사용법:

hwp5odt [options] [--embed-image] <hwp5file>
hwp5odt [options] --styles <hwp5file>
hwp5odt [options] --content [--embed-image] <hwp5file>
hwp5odt [options] --document [--no-embed-image] <hwp5file>
hwp5odt -h | --help
hwp5odt --version

옵션:

-h --help           Show this screen
--version           Show version
--loglevel=<level>  Set log level.
--logfile=<file>    Set log file.

--document          Produce single OpenDocument XML file (.fodt)
--styles            Produce *.styles.xml
--content           Produce *.content.xml

--output=<file>     Output file.

hwp5html: HTML 변환

HWPv5-to-HTML 변환기

사용법:

hwp5html [options] <hwp5file>
hwp5html [options] <hwp5file> --html
hwp5html [options] <hwp5file> --css
hwp5html -h | --help
hwp5html --version

옵션:

-h --help           Show this screen
--version           Show version
--loglevel=<level>  Set log level.
--logfile=<file>    Set log file.

--output=<output>   Output file / directory

hwp5txt: 텍스트 변환