Forums

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

How to use Bob Swift CLI with removeContent?

ryder
Contributor
July 21, 2020

We already use the Bob Swift CLI.

Now I want to remove some content of plenty pages.

I suppose the removeContent is the right action for that, but documentation is minimalistic.

Is there some examples out there how to remove content from pages via CLI?

 

Thanks,

ciao

ryder

1 answer

1 accepted

0 votes
Answer accepted
Michael Kuhl {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2020

Hello @ryder - The way to remove content from many pages at once is to use the runFromPageList action with removeContent as the common action.  

Here's an example where you would remove all of the pages that have a certain label:

--action runFromPageList --labels "my-label" --common "--action removeContent --id @pageId@"

 BTW - I'm the product manager for the Bob Swift CLI apps.

ryder
Contributor
July 21, 2020

thanks for that example. But this is not what I need.

And sorry for my bad explenation.

This is what I need and I thought, removeContent is the right action. But it seems, it is not.

I have on a set of page a special heading. This heading is always the same. And I want to remove this heading on every page. So I know how to find my pages with runFromPageList, but I do not understand how to remove the heading from pages.

 

ciao

ryder

Like # people like this
Michael Kuhl {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2020

No worries.  In that case try storePage with the findReplace or findReplaceRegex parameter to change or remove the heading.

Like Cody Wooten {Appfire} likes this
ryder
Contributor
July 22, 2020

@Michael Kuhl {Appfire} 

Thanks for this hint. Pls. let know, there is no explizit action for delete or remove page content, right?

I had to use findReplace for finding the text content and when I want to remove this content. I had to replace it with nothing, right?

Like Cody Wooten {Appfire} likes this
Michael Kuhl {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 22, 2020

Yes, that's the correct way to do it.

Like Cody Wooten {Appfire} likes this

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