Skip to main content

xmldirector.dita

DITA conversion support for XML Director

This module packages the

  • DITA Open Toolkit

  • XMLMind DITA Converter

as Python module.

API

The module provides the following API:

result = xmldirector.dita.converter.dita2html(ditamap, output_dir_or_file, converter)
  • ditamap - path to DITA map file

  • output_dir_or_file - output directory (DITA) or output filename (DITAC)

  • converter - name of the converter to be used (dita for DITA OT or ditac for

    XMLMind Dita converter)

    output_filename = xmldirector.dita.html2dita.html2dita(html_filename, infotype, output_filename)

  • html_filename - name of HTML input file

  • output_filename - name of generated DITA file (a temporary file will be generated if omitted)

  • infotype - DITA content type (topic, task, reference, concept)

Commandline usage

You can start a DITA conversion from the commandline:

> bin/dita2html -d some.ditamap -o output_directory -c dita|ditac
  • -d - path to DITA map file

  • -o - name of output directory (for DITA-OT) or the HTML output file (XMLMind DITAC)

  • -c - name of the converter to be used (dita for DITA OT or ditac for

    XMLMind Dita converter)

You can convert a HTML file to DITA through the commandline:

bin/html2dita -h
usage: html2dita [-h] [-i HTML_FILENAME] [-f topic] [-o None]

optional arguments:
  -h, --help            show this help message and exit
  -i HTML_FILENAME, --html-filename HTML_FILENAME
                        Input HTML filename
  -f topic, --infotype topic
                        DITA type (topic, concept, reference, task)
  -o None, --output-filename None
                        Output DITA filename

License

This package is published under the GNU Public License V2 (GPL 2)

Source code

See https://github.com/xml-director/xmldirector.dita

Bugtracker

See https://github.com/xml-director/xmldirector.dita/issues

Author

Andreas Jung/ZOPYX
Hundskapfklinge 33
D-72074 Tuebingen, Germany
www.zopyx.com

Changelog

0.1.0 (2016/06/22)

  • HTML -> DITA conversion using Saxon or LXML

0.0.12 (2016/06/21)

  • tidy HTML document internally

0.0.11 (2016/06/21)

  • added html2dita()

0.0.10 (2016/06/21)

  • updated to DITA OT 2.3.1

  • updated to DITAC 2.6.1

0.0.1 (03/01/2016)

  • initial release

Release files for xmldirector.dita 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xmldirector.dita 0.1.0
File Size Uploaded
xmldirector.dita-0.1.0.zip 30.9 kB Details

Release files / xmldirector.dita-0.1.0.zip

Download URL xmldirector.dita-0.1.0.zip
Size 30.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7b008e00ea4dce157108f8e2a34870ff77e3a334f492a9a60c119cc6f2d96181
BLAKE2b-256 checksum
How to use checksums
b61ab62bb2ca63bfdf6d1423a488404b759988cce1ab79541baa010585a1ec4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

0.0.17

1 release file

0.0.16

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page