wiki:TipAndDoc/project/trac/plugins

Version 9 (modified by mitty, 10 years ago) (diff)

--

  • Plugins for Trac

maybe install

WikiRename

  • Trac 0.12には標準でページ移動機能があり、またこのプラグインを用いたページ移動は「TitleIndexマクロのリストが更新されない」/「ページ移動履歴の日時がおかしくなる」等の問題があるので使わない方が良い
  • trac-hacks:wiki:WikiRenamePlugin

graphvizplugin

Dependencies

  • sudo aptitude install -R -y graphviz
  • sudo aptitude install -R -y ttf-vlgothic
    • 日本語を表示するために必要

warning

  • 2010/09/21現在のHEAD(r9009)では以下の警告が出る
    $ sudo trac-admin /path/to/trac/test/ permission list
    /path/to/global/trac/plugins/graphviz-0.7.6dev-py2.6.egg/graphviz/graphviz.py:23: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
    
    • 以下のようにして修正すればよい(というか警告のママ)
      $ svn diff graphvizplugin/
      Index: graphvizplugin/0.11/graphviz/graphviz.py
      ===================================================================
      --- graphvizplugin/0.11/graphviz/graphviz.py    (revision 9009)
      +++ graphvizplugin/0.11/graphviz/graphviz.py    (working copy)
      @@ -20,7 +20,7 @@
       import locale
       import os
       import re
      -import sha
      +import hashlib
       import subprocess
       import sys
      
      • 上記だけではNG
    • svn diff 0.11/graphviz/graphviz.py
      Index: 0.11/graphviz/graphviz.py
      ===================================================================
      --- 0.11/graphviz/graphviz.py   (revision 9708)
      +++ 0.11/graphviz/graphviz.py   (working copy)
      @@ -20,7 +20,7 @@
       import locale
       import os
       import re
      -import sha
      +import hashlib
       import subprocess
       import sys
      
      @@ -310,7 +310,7 @@
               encoded_cmd = (processor + unicode(self.processor_options)) \
                       .encode(self.encoding)
               encoded_content = content.encode(self.encoding)
      -        sha_key  = sha.new(encoded_cmd + encoded_content).hexdigest()
      +        sha_key  = hashlib.sha1(encoded_cmd + encoded_content).hexdigest()
               img_name = '%s.%s.%s' % (sha_key, processor, out_format)
               # cache: hash.<dot>.<png>
               img_path = os.path.join(self.cache_dir, img_name)
      

Attachments (1)

Download all attachments as: .zip