Pretty printing Confluence HTML

Ken Poulton March 29, 2013

We often use the Command Line Interface to download a page, edit it in a Linux text editor and upload again. For some kinds of editing, that's just much easier.

The machine-generated HTML that comes out of Confluence 4 is remarkably editor unfriendly, with run-on lines and no indentation for lists or tables.

Does anyone have a pretty printer for Confluence HTML? The standard Linux program tidy(1) barfs on the <ac:> tags.

2 answers

1 vote
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 2, 2013

The storage format is XML based with a custom namespace.

Really, you need to

  1. get a hold of the schema
  2. wrap the content in a new root element with the namespacing specified
  3. parse in tidy with namespacing enabled
0 votes
Jimmi p July 24, 2018

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events