1 """ display unused directories in data/pages
2
3 For moin up to 1.2.x only!
4 """
5
6 import filecmp
7
8 # put your wiki base directory here:
9 base = "/org/org.linuxwiki"
10
11 left = base + "/data/text"
12 right = base + "/data/pages"
13
14 d = filecmp.dircmp(left,right)
15 for p in d.right_only:
16 # this just prints a list of directories only found
17 # under pages/, having no corresponding page file under text/
18 print "%s/%s" % (right,p)
19
20 # use this to generate some cleanup script,
21 # which you can use (after review) for removing
22 # unused page/xxx directories
23 # print "rm -rf %s/%s" % (right,p)
24
25 # use this or sth similar for review
26 # print "find %s/%s" % (right,p)
27
28 # EOF