Skip to main content

Convert Quark Xpress tagged text (Tags, xtags) to XML.

This module is intended as a pre-processing step in the conversion of Quark Xpress tagged text to (semantic) HTML; as such it does not attempt to convert every single tag to XML, but only those that are relevant to the production of semantic, HTML5-compliant HTML.

This means that Paragraph and Character style sheet definitions are ignored; we only care about the apllied style sheet names. It also means that import character attributes like <i> and <b>, but ignore tags related to print typesseting only (tracking, kerning, baseline shift, etc.) by default , though they can be turned on.

The module doen’t actually produced XML but an Element Tree, in case you’d like to do further processing on the tree itself before serialising it with lxml.etree.tostring(). The serialised XML can then be turned to HTML with e.g. BeautifulSoup for postprocessing (for example, mapping Quark paragraph stylesheet to CSS classes, character tags and stylesheets to semantic HTML tags, rolling up indented quotes to <blockquote>, etc.)

Outputs UTF-8.

Usage:

>>> frpm quark_tagged_text import get_encoding, to_xml
>>> from lxml.etree import to_tring
>>> encoding = get_encoding(<source file>)
>>> with open(<source file>, encoding=encoding) as tagged_text:
>>>     element_tree = to_xml(tagged_text)
>>> serialised_xml = tostring(element_tree, encoding='utf-8')

Metadata

Release files for Quark-Xpress-Tags-to-xml 1.0

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

Built distribution (wheel)

Table of built distributions (wheels) for Quark-Xpress-Tags-to-xml 1.0
File Interpreter ABI Platform
Quark_Xpress_Tags_to_xml-1.0-py3-none-any.whl Python 3 none any Details

Release files / Quark_Xpress_Tags_to_xml-1.0-py3-none-any.whl

Download URL Quark_Xpress_Tags_to_xml-1.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72c593f21ef08222737b1df3506b8ed92b4db3655c0eeedf08988089436846fd
BLAKE2b-256 checksum
How to use checksums
a4af95fc908bf5ff50a37d3ebdf927fac03401d330fba851620f5e545c028051
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.1

1 release file

This release

1.0 This release

1 release file

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