On fait un suivi pour les thmes utiliss et on peut voir ce qui sont
inutiliss depuis un moment au besoin. darcs-hash:20060503093216-72cb0-26f58a5c4fac902e107608ba06606778e9742e27.gz
This commit is contained in:
parent
4932d680f1
commit
5fef4d885f
1 changed files with 38 additions and 0 deletions
38
munin/wiki_themes
Executable file
38
munin/wiki_themes
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: iso-8859-15 -*-
|
||||
|
||||
# Thèmes wiki utilisés
|
||||
|
||||
import sys, commands
|
||||
|
||||
THEMES = commands.getoutput("grep -i ^theme_name /var/local/wiki/data/user/* | awk -F '=' '{print $2}' | sort | uniq -c").split('\n')
|
||||
|
||||
try :
|
||||
arg = sys.argv[1]
|
||||
except :
|
||||
arg = ''
|
||||
|
||||
if arg == "config" :
|
||||
print 'host_name web'
|
||||
print 'graph_category wiki'
|
||||
print 'graph_title Thèmes wiki utilisés'
|
||||
print 'graph_scale no'
|
||||
print "graph_vlabel nb d'utilisateurs"
|
||||
for theme in THEMES :
|
||||
nom = theme.strip().split(' ')[1]
|
||||
for char in [' ','_','-','/','\\',':',';','.'] :
|
||||
nom = nom.replace(char, '')
|
||||
print '%s.label %s' % (nom, theme.strip().split(' ')[1])
|
||||
if THEMES.index(theme) == 0 :
|
||||
print '%s.draw AREA' % nom
|
||||
else :
|
||||
print '%s.draw STACK' % nom
|
||||
|
||||
else :
|
||||
for theme in THEMES :
|
||||
nom = theme.strip().split(' ')[1]
|
||||
nb = theme.strip().split(' ')[0]
|
||||
for char in [' ','_','-','/','\\',':',';','.'] :
|
||||
nom = nom.replace(char, '')
|
||||
print '%s.value %s' % (nom, nb)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue