tips:gource_analysis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tips:gource_analysis [2010-05-16 15:51] – 79.85.106.47 | tips:gource_analysis [2010-05-17 18:39] – andi | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | I am fond of the wonderful videos made with Gource. This tool makes a representation of changes made on a version control system like git or SVN. Then I remember that DokuWiki is also a version control system like any other ... Just have a look in the folder tree to find the directory **dokuwiki/ | + | ====== Visualize Changes in Gource |
+ | I am fond of the wonderful videos made with [[http:// | ||
- | More information on this [[http:// | ||
+ | More information on this [[http:// | ||
I wrote a small python script to generate logs from **.changes** files that can be used by Gource : | I wrote a small python script to generate logs from **.changes** files that can be used by Gource : | ||
- | <code python> | + | <code python |
# | # | ||
Line 31: | Line 32: | ||
read them and output them in gource' | read them and output them in gource' | ||
""" | """ | ||
+ | WHITE = " | ||
+ | GREEN = " | ||
+ | start_page_name = " | ||
for root, dirs, files in os.walk(path): | for root, dirs, files in os.walk(path): | ||
for i in files: | for i in files: | ||
Line 37: | Line 41: | ||
myfile = open(fichier, | myfile = open(fichier, | ||
for line in myfile.readlines(): | for line in myfile.readlines(): | ||
- | mots = line.split() | + | mots = line.split(' |
- | if len(mots)> | + | if len(mots)> |
resultat = mots[0] + " | resultat = mots[0] + " | ||
- | resultat += mots[5] + " | + | |
+ | mots[4] | ||
+ | | ||
resultat += translate(mots[2]) + " | resultat += translate(mots[2]) + " | ||
- | resultat += fichier | + | resultat += mots[3].replace(':', |
+ | if mots[3].rfind(start_page_name) == len(mots[3])-len(start_page_name): | ||
+ | resultat += " | ||
+ | else: | ||
+ | resultat += " | ||
print resultat | print resultat | ||
- | | + | |
resultat = mots[0] + " | resultat = mots[0] + " | ||
resultat += translate(mots[2]) + " | resultat += translate(mots[2]) + " | ||
resultat += fichier | resultat += fichier | ||
+ | resultat += " | ||
print resultat | print resultat | ||
myfile.close() | myfile.close() | ||
Line 53: | Line 64: | ||
def translate(mot): | def translate(mot): | ||
""" | """ | ||
- | C -> A | + | |
- | E -> M | + | |
+ | D (also dc and hc from discssion plugin) -> D | ||
other -> M | other -> M | ||
""" | """ | ||
- | if mot == " | + | if mot.upper |
return " | return " | ||
- | elif mot == " | + | elif mot.upper |
return " | return " | ||
+ | elif mot.upper == " | ||
+ | return " | ||
else: | else: | ||
return " | return " | ||
Line 96: | Line 110: | ||
if __name__ == " | if __name__ == " | ||
main(sys.argv[1: | main(sys.argv[1: | ||
- | |||
- | </ | ||
- | |||
- | launch the script inside your dokuwiki directory : | ||
- | <code bash> | ||
- | python gourcedoku.py -d ~/ | ||
</ | </ | ||
then you can use Gource to watch logs : | then you can use Gource to watch logs : |
tips/gource_analysis.txt · Last modified: 2010-05-20 15:53 by 193.9.13.135