wiki:TipAndDoc/project/trac/plugins

Version 11 (modified by mitty, 13 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
    
    • 以下のようにして修正すればよい(というか警告のママ)
      • graphvizplugin/0.11/graphviz/graphviz.py

        $ svn diff graphvizplugin/
         
        2020import locale 
        2121import os 
        2222import re 
        23 import sha 
         23import hashlib 
        2424import subprocess 
        2525import sys 
      • 上記だけではNG
    • svn diff 0.11/graphviz/graphviz.py
      • 0.11/graphviz/graphviz.py

         
        2020import locale 
        2121import os 
        2222import re 
        23 import sha 
         23import hashlib 
        2424import subprocess 
        2525import sys 
        2626 
         
        310310        encoded_cmd = (processor + unicode(self.processor_options)) \ 
        311311                .encode(self.encoding) 
        312312        encoded_content = content.encode(self.encoding) 
        313         sha_key  = sha.new(encoded_cmd + encoded_content).hexdigest() 
         313        sha_key  = hashlib.sha1(encoded_cmd + encoded_content).hexdigest() 
        314314        img_name = '%s.%s.%s' % (sha_key, processor, out_format) 
        315315        # cache: hash.<dot>.<png> 
        316316        img_path = os.path.join(self.cache_dir, img_name) 

Attachments (1)

Download all attachments as: .zip