Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Note that by default, markdown is converted to markup unless the noconvert parameter is selected.

"--action storePage --noConvert --markdown" --continue

convertToStorageFormat Action for converting markdown to Confluence storage format.

When you convert markdown You can convert markdown pages, files and text to the Confluence storage format, use the action convertToStorageFormat together with the relevant parameters.

convertToStorageFormat

You can convert to Confluence storage format the following parameters:

  • content

  • content2

  • file

  • input

  • markdown

For more information on the parameters for converting markdown to the storage format, check convertToStorageFormat

convertToStorageFormat Examples

...

--action convertToStorageFormat --content "{@macroName@:param1=xxxxx}bodyText{@macroName@}" --findReplace "@macroName@:wiki"

...

--action convertToStorageFormat --content "{wiki:param1=xxxxx}" --file "-" --content2 "{wiki}"

...

.

To begin, create a markdown page or a file that you can convert.

StorePage Action for creating a markdown page

You can also Use the storePage action to create a markdown page for conversion using the storePage action.

 --action storePage --space SPACENAME --title "PAGENAME" --content "this creates my testpage for markdown conversion"

...

For more information on the parameters for converting markdown to the storage format, check storePage

storePage Examples

Check the Examples to view a variety of examples on how you can use the storePage action.

Required Parameters

  • Space

  • Title or ID

  • Content or file

Optional Parameters

...

Space

content
Content for page, attachment, comment, or question.

Title or ID

content2
Content for page added after content and file content.

Content or file

file
This parameter points to the path of the file based content or result output. For some action it may be a directory path.

input
Line of input used in place of file data for run actions. One or more input parameters are used as lines instead of using the file parameter. In some cases requiring a file parameter, it may be necessary to use a special value of + to indicate to use the input parameters instead.

markdown
This parameter converts rendered Markdown content to storage format. This may not work for all Markdown content.
Consider using the markdown macro instead for a more accurate display of Markdown content in Confluence.

...

convertToStorageFormat Action for converting markdown to Confluence storage format.

When you convert markdown to the Confluence storage format, check storePage

storePage Examples

...

-action storePage --space "zcliattachments" --title "attachment page" --content "This is a test page." --parent "Home"

...

--action storePage --space "zcliexamples" --title "csoap-234" --parent "@home" --special " # ~" --content "<p><ac:link><ri:page ri:content-title=~Home~/></ac:link></p>" --noConvert

...

--action storePage --space "zclimarkdown" --title "markdown ampersand" --content "[ABC](https://bobswift.atlassian.net?xxx&yyyzzz=aaa)" --noConvert --markdown

...

--action storePage --space "zclimarkdown" --title "markdown readme with toc" --parent "@home" --file "/opt/atlassian/pipelines/agent/build/src/itest/confluence/resources/readme-flexmark.markdown" --markdown

...

--action storePage --space "zclimarkdown" --title "markdown readme" --parent "@home" --file "/opt/atlassian/pipelines/agent/build/src/itest/confluence/resources/readme.markdown" --markdown

...

--action storePage --space "zclimarkdown" --title "markdown" --markdown --content "Some text with <code>some code</code> inside. [[home]] [[${space}:home]] [[aaa|${space}:home]] [[${space}:]] [[bbb|${space}:]] [[zzz|http://google.com]] " --content2 "Special characters: !@#\$%^&*()_<>'. xxx@xxx.com other: “aaa” ’bbb‘ — – … " --parent "@home"

...

--action storePage --space "zclimarkdown" --title "markdownXss" --file "-" --markdown --parent "@home"

...

--action storePage --space "zclimodify" --title "modify" --content "This is a test page. http://www.test.com:8888/jira" --parent "@home"

...

--action storePage --space "zclipages" --title "This is title 1" --content "This is a test page." --parent "@home"

...

--action storePage --space "zclipages" --title "This is title 1" --content "This is a test page." --parent "Home"

...

--action storePage --space "zclipages" --title "This is title 1" --file "/opt/atlassian/pipelines/agent/build/src/itest/confluence/resources/data.txt" --content2 "content added after file data" --comment "automation updated" --minor

...

--action storePage --space "zclipages" --title "This is title 1" --labels "testLabel"

...

--action storePage --space "zclipages" --title "This is title 2" --content "This is a test page." --parent "This is title 1"

...

--action storePage --space "zclipages" --title "This is title 3" --content "This is a test page." --parent "This is title 2"

...

--action storePage --space "zclipages" --title "This is title 8" --file "-" --content2 "content added after file data"

...

--action storePage --space "zclipages" --title "replace" --home "@home" --content "XXX"

...

--action storePage --space "zclipages" --title "roundTrip" --content "This is a test page." --parent "@home"

...

--action storePage --space "zclipages" --title "roundTrip" --file "build/output/clipages/getPageSourceRoundTrip.txt" --noConvert

...

--action storePage --space "zclipages" --title "template" --parent "@home" --content "Variable 1: \$VAR1\$ Variable 2: %VAR2% Variable 3: (VAR3)" --replace

...

--action storePage --space "zclipages" --title "xxx.,<>_|~!{}[]=//&*%-+'" --content "This is a test page." --parent "@home"

...

--action storePage --space "zclipages4" --title "encoding" --file "/opt/atlassian/pipelines/agent/build/src/itest/confluence/resources/encoding.txt" --encoding "UTF-16"

...

--action storePage --space "zclipages4" --title "encoding2" --file "/opt/atlassian/pipelines/agent/build/src/itest/confluence/resources/encoding2.txt" --encoding "SJIS"

...

--action storePage --space "zclipages4" --title "encoding3" --content "テストテスト testtest 今日明日明後日 あああああ testaaaaaaaaaaaaaaa 123456"

...

--action storePage --space "zclipagesh1" --title "CCC1686187943813" --content "xxx" --parent "BBB"

...

--action storePage --space "zconfluencecli" --title "This is title 1" --content "This is a test page." --parent "Home"

...

--action storePage --space "zconfluencecli" --title "This is title 7" --content "a b c d e,: a b c d e" --findReplace "a b:x y"

...

--action storePage --space "zconfluencecli" --title "This is title 7" --content "a b c d e,: a b c d e" --findReplace "a b:x y" --findReplace ",:;" --findReplace "':':*" --findReplace "d:z" --findReplace "e:z"

...

--action storePage --space "zconfluencecli" --title "This is title 7" --content "a b c d e,: a b c d e" --findReplaceRegex "[abc]:www"

...

--action storePage --space "zexport" --title "Special: &" --content "xxx" --parent "@home"

...

--action storePage --space "zexport" --title "viewRestricted" --content "" --parent "@home" --replace

...

--action storePage --space "zhistory" --title "history" --content "Content for: 1"

...

--action storePage --space "zhistory" --title "history" --content "Content for: 2"

...

--action storePage --space "zhistory" --title "history" --content "Content for: 3"

...

--action storePage --space "zhistory" --title "history" --content "Content for: 4"

...

--action storePage --space "zhistory" --title "history" --content "Content for: 5"

...

--action storePage --space "zhistory" --title "history" --content "Content for: 6"

...

--action storePage --space "zmisc" --title "ampersand" --content "XXX & YYY" --noConvert

...

--action storePage --space "zmisc" --title "ampersand2" --content "XXX & YYY"

...

use the action convertToStorageFormat together with the relevant parameters.

convertToStorageFormat

You can convert to Confluence storage format the following parameters:

  • content

  • content2

  • file

  • input

  • markdown

For more information on the parameters for converting markdown to the storage format, check convertToStorageFormat

convertToStorageFormat Examples

--action convertToStorageFormat --content "{@macroName@:param1=xxxxx}bodyText{@macroName@}" --findReplace "@macroName@:wiki"

--action convertToStorageFormat --content "{wiki:param1=xxxxx}" --file "-" --content2 "{wiki}"

--action convertToStorageFormat --content "{wiki:param1=xxxxx}bodyText" --content2 "{wiki}"