Versions Compared

Key

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

...

  1. Setup an example page 

    No Format
    --action storePage --space xxx --title test --parent @home --content "aaa http://myjira.com bbb"
  2. Construct a modifyPage action for a single page using a simple text replace. Since : (colon) is in the text and is the default key:value separator for CLI, use # instead using the special parameter (spaces are significant!) 

    No Format
    --action modifyPage --space xxx --title at --findReplace "http://myjira.com#http://mynewjira.com" --special " #"
  3. Run against all pages with the link (using unix style escaping - see Tips). Run against your test space first before using @all.

    No Format
    --action runFromContentList --search "\"http://myjira.com\"" --space @all --common "--action modifyPage --id @pageId@ --findReplace \"http://myjira.com#http://mynewjira.com\" --special \" #\" "
  4. Results 

    No Format
    Run: --action modifyPage --id 112197680 --findReplace "http://myjira.com#http://mynewjira.com" --special " #" 
    Page modified: 'at' in space: xxx. Page has id: 112197680
    ...
Tip
titleUse runFromPageList instead

It is sometimes easier to use runFromPageList instead of defining the right search to use with runFromContentList. If the find string is not on the page, then the page will not be changed. The down side is that it may take a bit longer to go through and check each page.

 

Example 2: Renaming a macro

...