-
-
Save adamcheasley/e92bae2416860a61b3f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# quick and dirty skin script to audit a site's content | |
# stucture is {portal_type: {state: count}} | |
brains = context.portal_catalog.searchResults() | |
types = {} | |
for brain in brains: | |
ctype = brain['portal_type'] | |
state = brain['review_state'] | |
state_counts = types.setdefault(ctype, {}) | |
count = state_counts.setdefault(state, 0) | |
state_counts[state] = count + 1 | |
print types | |
return printed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment