Programatiically add a page to confluence using CLI and macro

nitinsh92 March 24, 2015

I am trying to migrate our mediawiki to confluence. We tried usin Universal Wiki Converter, but the it exports HTML content, for which we have to manually use HTML macro inside the conflence. Obviously we can't do that manually for each page in our wiki. I used conflunec cli's function:

confluence --action convertToStorageFormat --space "ITWP" --title "test001" --content "{html}bodytext{html}" --server --user --password

it spits out something like this:

<ac:structured-macro ac:name="html"><ac:plain-text-body><![CDATA[bodytext]]></ac:plain-text-body></ac:structured-macro>

Which is again not recognized by confluence.

Is there any way I can just send HTML content to Confluence and it uses HTML macro to parse and display like a standard page like it was before? But please keep in mind I have around 1000 pages in my wiki.

1 answer

0 votes
Rafael Pereira March 24, 2015

Hi Nitin

You can try using the Universal Wiki Converter plugin: https://marketplace.atlassian.com/plugins/com.atlassian.uwc

Besides, you can see different methods to import content to confluence here: https://confluence.atlassian.com/display/DOC/Importing+Content+Into+Confluence

For non-wiki markup take a look at WeDav: Confluence WebDav Plugin  

Cheers,

Rafael Pereira.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events