/
Script - list of user macros
Script - list of user macros
List of user macros
{cache:refresh=7d|showRefresh=true|showDate=true|checkAttachments=false} {run-now:exportFile=^user_macros.html|autoExport=true} {groovy:output=wiki} import com.atlassian.confluence.setup.bandana.ConfluenceBandanaContext import com.atlassian.confluence.renderer.UserMacroConfig def excludeList = ['xxxx'] // user macros that cause formatting errors def userMacroKey = 'atlassian.confluence.user.macros' def userMacros = bandanaManager.getValue(new ConfluenceBandanaContext(), userMacroKey) if (excludeList.size() > 0) { println 'Exclude list: ' excludeList.each { exclude -> println '- ' + exclude } } println '\n{table-plus:autoNumber=true|sortColumn=1|sortIcon=true}' println '|| Name || Body type || Output type || Has Body || Macro ||' if (userMacros != null) { // null if no user macros defined userMacros.keySet().sort().each { key -> if (!(key in excludeList)) { // something with this one messes up formatting def macro = userMacros.get(key) def template = '{noformat} ' + macro.getTemplate().replaceAll("noformat", "_noformat_").replaceAll("table-plus", "_table-plus_") + ' {noformat}' println "| ${macro.getName()} | ${macro.getBodyType()} | ${macro.getOutputType()} | ${macro.isHasBody()} | " + template + ' | ' } } } println '{table-plus}' {groovy} {run-now} {cache}
, multiple selections available,
Related content
Run-now macro - 6.x
Run-now macro - 6.x
More like this
Groovy macro
Groovy macro
More like this
List the links to all space templates
List the links to all space templates
More like this
Filter users by email domain
Filter users by email domain
More like this
Part 5 - Combining all the components into one
Part 5 - Combining all the components into one
More like this
_HowToDealWithTemplatesOnConfluence43AndLater
_HowToDealWithTemplatesOnConfluence43AndLater
More like this