×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    Graph Extension: Difference between revisions

    Content added Content deleted
    imported>MattisManzel
    mNo edit summary
    imported>mutante
    m (→‎New: SVG output: colored output,test)
     
    (31 intermediate revisions by 4 users not shown)
    Line 1: Line 1:
    We got this new [[:Category:Mediawiki Extensions|mediawiki extension]] installed now. It needed a few [[perl]] modules to be installed via [[cpan]], esp. it uses ''Graph:Easy''. Even though a few errors occured (that i reported to the author) it seems to work now.
    A [[:Category:Mediawiki Extensions|mediawiki extension]] to create graphs in wiki pages, written by [[User:Tels|Tels]]. It needs a few [[perl]] modules to be installed via [[cpan]], esp. it uses ''[[Graph-Easy|Graph:Easy]]'' and can output graphs as [[ASCII]], [[HTML]] or [[SVG]].


    * Graph::Easy is up to date (0.53).
    * Installed wikimedia-graph 0.21

    Looks a lot better now, thanks Tels.


    You can create graphs like this:
    You can create graphs like this:



    === source examples ===
    === source examples ===
    Line 11: Line 18:
    </graph>
    </graph>
    </pre>
    </pre>



    === result examples ===
    === result examples ===
    Line 41: Line 47:
    [ S23 ] -> [ Neighbor5 ]
    [ S23 ] -> [ Neighbor5 ]
    </graph>
    </graph>



    ==== Nodes with links ====
    ==== Nodes with links ====
    Line 53: Line 58:
    S23:
    S23:
    <graph>
    <graph>
    node { linkbase: http://s23.org/wiki/; }
    node { linkbase: /wiki/; }
    [ WikiNode ] { link: WikiNode; } --> [ Sandbox ] { link: Sandbox; }
    [ WikiNode ] { link: WikiNode; } --> [ Sandbox ] { link: Sandbox; }
    [ WikiNode ] { link: WikiNode; } --> [ RecentChanges ] { link: RecentChanges; }
    [ WikiNode ] --> [ RecentChanges ] { link: RecentChanges; }
    [ WikiNode ] { link: WikiNode; } --> [ Fnord ] { link: Fnord; }
    [ WikiNode ] --> [ Fnord ] { link: Fnord; }
    </graph>
    </graph>


    Line 63: Line 68:
    <graph>
    <graph>
    [ S23 ] {link: http://s23.org/wiki/;} --> [ StarTrek ] { link: http://www.memory-alpha.org/en/index.php/Main_Page; }
    [ S23 ] {link: http://s23.org/wiki/;} --> [ StarTrek ] { link: http://www.memory-alpha.org/en/index.php/Main_Page; }
    [ S23 ] {link: http://s23.org/wiki/;} --> [ Brasil ] { link: http://rio.ifi.unizh.ch/brasilienwiki/index.php/Hauptseite; }
    [ S23 ] --> [ Brasil ] { link: http://rio.ifi.unizh.ch/brasilienwiki/index.php/Hauptseite; }
    [ S23 ] {link: http://s23.org/wiki/;} --> [ Gentoo ] { link: http://gentoo-wiki.com/; }
    [ S23 ] --> [ Gentoo ] { link: http://gentoo-wiki.com/; }
    [ S23 ] {link: http://s23.org/wiki/;} --> [ Python ] { link: http://www.pythonwiki.de/; }
    [ S23 ] --> [ Python ] { link: http://www.pythonwiki.de/; }
    [ S23 ] {link: http://s23.org/wiki/;} --> [ ZZZ ] { link: http://wiki.zzz.ee/index.php/; }
    [ S23 ] --> [ ZZZ ] { link: http://wiki.zzz.ee/index.php/; }
    </graph>
    </graph>


    === New: SVG output ===

    "Dazu braucht man noch einen modernen Browser ([[Firefox]] 1.5, oder Opera 9.0,oder Konqueror 3.5)."


    <graph>
    graph { output: svg; }
    [ S23 ] {link: http://s23.org/wiki/;} --> [ StarTrek ] { link: http://www.memory-alpha.org/en/index.php/Main_Page; }
    [ S23 ] --> [ Brasil ] { link: http://rio.ifi.unizh.ch/brasilienwiki/index.php/Hauptseite; }
    [ S23 ] --> [ Gentoo ] { link: http://gentoo-wiki.com/; }
    [ S23 ] --> [ Python ] { link: http://www.pythonwiki.de/; }
    [ S23 ] --> [ ZZZ ] { link: http://wiki.zzz.ee/index.php/; }
    [ S23 ] --> [AbbeNormal] { link: http://www.ourpla.net/cgi-bin/pikie.cgi?; }
    [ S23 ] --> [AcadWiki] { link: http://xarch.tu-graz.ac.at/autocad/wiki/; }
    [ S23 ] --> [Advogato] { link: http://www.advogato.org/; }
    [ S23 ] --> [AIWiki] { link: http://www.ifi.unizh.ch/ailab/aiwiki/aiw.cgi?; }
    [ S23 ] --> [ALife] { link: http://news.alife.org/wiki/index.php?; }
    [ S23 ] --> [AndStuff] { link: http://andstuff.org/wiki.php?; }
    [ S23 ] --> [Annotation] { link: http://bayle.stanford.edu/crit/nph-med.cgi/; }
    [ S23 ] --> [AwarenessWiki] { link: http://taoriver.net/aware/; }
    [ S23 ] --> [BenefitsWiki] { link: http://www.benefitslink.com/cgi-bin/wiki.cgi?; }
    [ S23 ] --> [Fnord] { link: http://fnord.org; }
    </graph>

    === colored SVG output ===

    <graph>
    node { fill: #ffdead; }

    [ S23 ] {link: http://s23.org/wiki/; fill: #f06060; color: white; }
    -> [ Fnord ], [ Blargh ], [ Foobar ], [ Gazong ] {link: http://s23.org/wiki/Fnord; fill: #f060F0; color: white; }
    [ human ] .. evolve ..> [ ape ] { fill: #e0e0ff; border: bold; }
    </graph>

    <strike>Broken link fixed (or not, weird "iframe-like2 behaviour. how come? it wasnt intended to open like in a frame. [[User:mutante|mutante]] 03:54, 11 December 2005 (CET)</strike>.

    Fixed. [[User:mutante|mutante]] 15:38, 15 June 2006 (CEST)

    Fixed buggy output ("iframe"-effect) caused by missing/wrong redirect rule in Apache config for /wiki/images to /w/images. [[User:mutante|mutante]] 21:39, 12 March 2007 (CET)


    === Links ===
    === Links ===

    Latest revision as of 20:52, 12 March 2007

    A mediawiki extension to create graphs in wiki pages, written by Tels. It needs a few perl modules to be installed via cpan, esp. it uses Graph:Easy and can output graphs as ASCII, HTML or SVG.


    • Graph::Easy is up to date (0.53).
    • Installed wikimedia-graph 0.21

    Looks a lot better now, thanks Tels.

    You can create graphs like this:


    source examples[edit]

    <graph>
     [ S23 ] -> [ Neighbor1 ]
     [ S23 ] -> [ Neighbor2 ]
     [ S23 ] -> [ Neighbor3 ]
    </graph>
    

    result examples[edit]

    check source to see how they workd

    3 nodes[edit]

    <graph>

    [ S23 ] -> [ Neighbor1 ]
    [ S23 ] -> [ Neighbor2 ]
    [ S23 ] -> [ Neighbor3 ]
    

    </graph>

    4 nodes[edit]

    <graph>

    [ S23 ] -> [ Neighbor1 ]
    [ S23 ] -> [ Neighbor2 ]
    [ S23 ] -> [ Neighbor3 ]
    [ S23 ] -> [ Neighbor4 ]
    

    </graph>


    5 nodes[edit]

    <graph>

    [ S23 ] -> [ Neighbor1 ]
    [ S23 ] -> [ Neighbor2 ]
    [ S23 ] -> [ Neighbor3 ]
    [ S23 ] -> [ Neighbor4 ]
    [ S23 ] -> [ Neighbor5 ]
    

    </graph>

    Nodes with links[edit]

    Graph:Easy:

    <graph> node { linkbase: http://www.bloodgate.com/perl/; } [ Graph ] { link: graph/; } --> [ Manual ] { link: graph/manual/; } </graph>

    S23: <graph> node { linkbase: /wiki/; } [ WikiNode ] { link: WikiNode; } --> [ Sandbox ] { link: Sandbox; } [ WikiNode ] --> [ RecentChanges ] { link: RecentChanges; } [ WikiNode ] --> [ Fnord ] { link: Fnord; } </graph>

    InterWiki:

    <graph> [ S23 ] {link: http://s23.org/wiki/;} --> [ StarTrek ] { link: http://www.memory-alpha.org/en/index.php/Main_Page; } [ S23 ] --> [ Brasil ] { link: http://rio.ifi.unizh.ch/brasilienwiki/index.php/Hauptseite; } [ S23 ] --> [ Gentoo ] { link: http://gentoo-wiki.com/; } [ S23 ] --> [ Python ] { link: http://www.pythonwiki.de/; } [ S23 ] --> [ ZZZ ] { link: http://wiki.zzz.ee/index.php/; } </graph>


    New: SVG output[edit]

    "Dazu braucht man noch einen modernen Browser (Firefox 1.5, oder Opera 9.0,oder Konqueror 3.5)."


    <graph> graph { output: svg; } [ S23 ] {link: http://s23.org/wiki/;} --> [ StarTrek ] { link: http://www.memory-alpha.org/en/index.php/Main_Page; } [ S23 ] --> [ Brasil ] { link: http://rio.ifi.unizh.ch/brasilienwiki/index.php/Hauptseite; } [ S23 ] --> [ Gentoo ] { link: http://gentoo-wiki.com/; } [ S23 ] --> [ Python ] { link: http://www.pythonwiki.de/; } [ S23 ] --> [ ZZZ ] { link: http://wiki.zzz.ee/index.php/; } [ S23 ] --> [AbbeNormal] { link: http://www.ourpla.net/cgi-bin/pikie.cgi?; } [ S23 ] --> [AcadWiki] { link: http://xarch.tu-graz.ac.at/autocad/wiki/; } [ S23 ] --> [Advogato] { link: http://www.advogato.org/; } [ S23 ] --> [AIWiki] { link: http://www.ifi.unizh.ch/ailab/aiwiki/aiw.cgi?; } [ S23 ] --> [ALife] { link: http://news.alife.org/wiki/index.php?; } [ S23 ] --> [AndStuff] { link: http://andstuff.org/wiki.php?; } [ S23 ] --> [Annotation] { link: http://bayle.stanford.edu/crit/nph-med.cgi/; } [ S23 ] --> [AwarenessWiki] { link: http://taoriver.net/aware/; } [ S23 ] --> [BenefitsWiki] { link: http://www.benefitslink.com/cgi-bin/wiki.cgi?; } [ S23 ] --> [Fnord] { link: http://fnord.org; } </graph>

    colored SVG output[edit]

    <graph> node { fill: #ffdead; }

    [ S23 ] {link: http://s23.org/wiki/; fill: #f06060; color: white; }

     -> [ Fnord ], [ Blargh ], [ Foobar ], [ Gazong ] {link: http://s23.org/wiki/Fnord; fill: #f060F0; color: white; } 
    
    

    [ human ] .. evolve ..> [ ape ] { fill: #e0e0ff; border: bold; } </graph>

    Broken link fixed (or not, weird "iframe-like2 behaviour. how come? it wasnt intended to open like in a frame. mutante 03:54, 11 December 2005 (CET).

    Fixed. mutante 15:38, 15 June 2006 (CEST)

    Fixed buggy output ("iframe"-effect) caused by missing/wrong redirect rule in Apache config for /wiki/images to /w/images. mutante 21:39, 12 March 2007 (CET)

    Links[edit]

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.