Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Wiki macro for redmine. The macro render graph-image from wiki contents as dot.
Ruby HTML

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
assets/stylesheets
config
lang
test
COPYRIGHT.txt
GPL.txt
README.rdoc
Rakefile
init.rb
routes.rb

README.rdoc

Redmine Wiki Graphviz-macro plugin

Redmine Wiki Graphviz-macro plugin will allow Redmine's wiki to render graph image.

Features

  • Add wiki macro {{graphviz}} and {{graphviz_me}}

  • Write wiki page as dot format, and the macros makes it graph image.

{{graphviz}} macro

  • This macro render graph image from other wiki page's content.

    {{graphviz(Foo)}}
    {{graphviz(option=value,Foo)}}
    {{graphviz(layout=neato,target=_blank,with_source,Foo)}}
  • format={png|jpg}

  • layout={dot|neato|fdp|twopi|circo}

  • target={_blank|any}

  • with_source : Display both image and its source(dot)

  • no_map : Disable clickable map.

  • wiki=page : Link image to specified wiki page.

  • link_to_image : Link image to itself.

  • align=value : Additional attr for IMG.

    e.g.) right, left
  • width=value : Additional attr for IMG.

    It is recommended to use no_map option together.
    e.g.) 100px, 200%
  • height=value : Additional attr for IMG.

    It is recommended to use no_map option together.
    e.g.) 100px, 200%

{{graphviz_me}} macro

  • This macro render graph image from the wiki page which is include this macro.

  • Use this macro *commented out*. If not commented out, renderer fails syntax error.

    // {{graphviz_me()}}
    // {{graphviz_me(option=value)}}
  • options: See graphviz macro.

Requirement

  • Redmine 0.8.0 RC1 or later.

  • Graphviz www.graphviz.org

    • There are 2ways about setting up graphviz for this plugin.

    • The one is using Gv which is ruby binding of graphviz.

      • Recommended for unix system.

    • The other one is using external dot command which is on the PATH.

      • Recommended for Windows system.

      e.g.) RPMs which are installed in my environment(CentOS 5.4).

      graphviz-2.26.0-1.el5
      graphviz-gd-2.26.0-1.el5
      graphviz-ruby-2.26.0-1.el5

      e.g.) Ubuntu (10.04)

      graphviz
      graphviz-dev
      libgv-ruby

      e.g.) Windows XP Pro SP3(ja)

      graphviz-2.26.3
  • memcached (optional)

Getting the plugin

A copy of the plugin can be downloaded from passing.breeze.cc/mt/redmine_plugin

Source code: git://github.com/tckz/redmine-wiki_graphviz_plugin.git

Install

  1. Copy the plugin tree into #{RAILS_ROOT}/vendor/plugins/

    e.g.)
    #{RAILS_ROOT}/vendor/
      plugins/
        wiki_graphviz_plugin/
  2. Restart Redmine.

Optional

  • If you want to use caching feature for rendered images, must configure your cache_store.

  • This plugin expects the store like ActiveSupport::Cache::MemCacheStore which provides marshaling when set/get the value.

  1. Setup caching environment, like memcached.

  2. Configure cache_store.

    e.g.) config/environments/production.rb
    config.action_controller.perform_caching = true
    config.action_controller.cache_store = :mem_cache_store, "localhost"
  3. Restart Redmine.

  4. Login to Redmine as an Administrator

  5. Setup wiki graphviz-macro settings in the Plugin settings panel

License

This plugin is licensed under the GNU GPL v2. See COPYRIGHT.txt and GPL.txt for details.

My environment

  • CentOS 5.5

  • ruby-1.8.7-p299(from source)

  • memcached-1.2.6-1.el5.rf

  • MySQL-server-5.0.51a-tritonn.1.0.10

  • graphviz-2.26.3-1.el5

  • graphviz-gd-2.26.3-1.el5

  • graphviz-ruby-2.26.3-1.el5

  • passenger (2.2.15)

  • redmine-1.0.0

My environment 2

  • CentOS 5.4

  • ruby-1.8.7-p248(from source)

  • mysql-server-5.0.77-3.el5

  • graphviz-2.26.0(from source)

  • redmine-0.9.2

My environment 3

  • Windows XP Pro SP3(ja)

  • ruby-1.8.7-p299(provided by rumix. ruby.morphball.net/rumix/)

  • sqlite-3.7.0

  • graphviz-2.26.3

  • redmine-1.0.0

Something went wrong with that request. Please try again.