Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence CLI use @title@ with runFromCsv

ryder
Contributor
July 23, 2020

Hi,

I alread you the following command to create backup from pages:

/opt/atlassian-cli/acli confluence --action runFromPageList --space MBSU --id 1214709818 --continue --descendents --regex "A.\d.\d.\d.*" --common "--action copyPage --id @pageId@ --parent \"@title@\" --newTitle \"@title@-anf\""

This is quite smart, because the backup page has a similar name as the original page.

For runFromPageList it is quite necessary to use a good regex to find the right pages.

But sometimes runFromCsv is much easier.

So I used runFromCsv with modifyPage action. And inside the structure information I try to use @title@. But this did not work.

Is there a way to use @title@ in the structure data information?

Here is my test command using @title@:

acli confluence --action runFromCsv --file ./test.csv --propertyFile ./cli.properties --common "--action modifyPage --space TEST --special \" #\" --findReplaceRegex \"xyz#<p>my test</p><p><br /></p><ac:structured-macro ac:name='include' ac:schema-version='1' data-layout='default' ac:macro-id='74fa2cb1-1e12-44ad-a17b-a810cb8cb943'><ac:parameter ac:name=''><ac:link><ri:page ri:content-title='@title@' ri:version-at-save='5' /></ac:link></ac:parameter></ac:structured-macro><p><br /></p>\""     

 Any hints?

ciao

ryder

1 answer

0 votes
Amulya Akula {Appfire} July 24, 2020

Hi @ryder ,

We are from the Bobswift team. We have created a request on your behalf and would like to work with you over a Support Request 4403.

Thanks for signing up for the portal.

Regards,

Amulya Akula

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events