Skip to end of banner
Go to start of banner

Site scripts

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Scripts used to help manage this site

 


Other tips and techniques

How to

In order to produce a page with links to all the how to pages, we use howto labels on all pages and content by label macro. In order to do this, we need a quick way to make sure all the existing how to pages had the right label. This is what was used. I We also removed howto labels from the simple topic pages. This uses the Confluence Command Line Interface (CLI) or CLI Plugin for Confluence (requires version 3.0.0 - available soon).

Adding labels to all the how pages
confluence --action runFromList --common "--action runFromPageList --common \"--action addLabels --id @pageId@ --labels howto\" --regex \"How to \s*.*\" --space @entry@" --list "ACLI, BCLI, CRDCLI, CRUCLI, CSOAP, FCLI, JCLI, BGTP, CACHE, DTBL, XL, FLASH, GVIZ, HTML, JSPR, LIBSEC, CMSP, RUN, LIBSCRPT, SCRP, SLID, SQL, TBL, CVP, WORD, CWP, CCLI, JCPP, CSOT, JSOAPLIB, CSOAPLIB, GINT"
Remove labels from topic pages
confluence --action runFromList --common "--action runFromPageList --common \"--action removeLabels --id @pageId@ --labels howto\" --regex \"How to\" --space @entry@" --list "ACLI, BCLI, CRDCLI, CRUCLI, CSOAP, FCLI, JCLI, BGTP, CACHE, DTBL, XL, FLASH, GVIZ, HTML, JSPR, LIBSEC, CMSP, RUN, LIBSCRPT, SCRP, SLID, SQL, TBL, CVP, WORD, CWP, CCLI, JCPP, CSOT, JSOAPLIB, CSOAPLIB, GINT"

Checking page restrictions

Occasionally, pages are hidden until ready for production use. However, it is easy to forget to remove the restriction. The following produces a list of pages that have view or edit restrictions. It can be scanned for pages that are not intended to be hidden. It should be run with the id that is restricting pages. Requires ACLI 3.3 or above.

Page permission list
atlassian confluence -a runFromPageList --space @all --common " --action getPermissionList --id @pageId@ --outputFormat 2 --file permissionList.csv --append"
  • No labels