Getting the confluence page content as plaintext using CLI .

Hi All,

Can we get the page content as plain text using CLI or by other means .

I tried below commands,

./confluence.sh --action renderPage --space "spacename" --title "This is title 1" --> this page as html

./confluence.sh -a getPageSource --space spacename --title "This is title 1"

Both does not not suffice the requirements.

Any suggestions will be apprecieated.

Thanks,

Aravind

2 answers

This widget could not be displayed.

Confluence 4.x and above no longer has plain text source. Data is stored as XHTML. So, no, there is no way to retrieve plain text using the CLI. If you really need wiki back, you can use the wikifier.

Thanks for the update .

Is there any other way apart from CLI which i can use to get contents in plain text format .

Thanks for the update .

Is there any other way apart from CLI which i can use to get contents in plain text format .

No, there is not.

I was trying to export the spaces as html , XML using below commands

./confluence.sh --action exportSpace --space "zconfluencecliTarget" --file "target/output/confluencecli/export.html" --exportType "HTML"
./confluence.sh --action exportSpace --space "zconfluencecliTarget" --file "target/output/confluencecli/export.xml"

but the output html, XML has unicode charecters instead of text, Any idea why it happens

Also this is not seen when i try exporting this as pdf .

I was trying to use below commands to export the spaces as html, XML , but output generated has some encoding issues , the charecters are not displayed properly ,

./confluence.sh --action exportSpace --space "zconfluencecliTarget" --file "target/output/confluencecli/export.html" --exportType "HTML"
./confluence.sh --action exportSpace --space "zconfluencecliTarget" --file "target/output/confluencecli/export.xml"

any idea why it happens ?

You may need to open an issue so you can provide more details. You may need to specify the encoding parameter to match your Confluence setting.

Thanks for the reply .

specify the encoding parameter to match your Confluence setting.

Could you please let me know what encoding param needs to be specified.

For instance, if your Confluence is UTF8, then try --encoding UTF8

This widget could not be displayed.

Thanks Bob.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Statuspage

What are your best incident management tips and stories? #HugOps

 👋Community members! Downtime happens. And great incident response takes a village. Teams like Support, Dev, SRE, Ops, IT, and Marketing have to come together to resolve the problem while keep...

70 views 2 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you