Extension:QuickGV/pl

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:QuickGV and the translation is 6% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎日本語 • ‎polski • ‎sicilianu • ‎中文
Podręcznik rozszerzeń MediaWikiManual:Extensions
Crystal Clear action run.svg
QuickGV

Status wydania:Extension status stabilne

Quickgv-sample-default.png
RealizacjaTemplate:Extension#type Tag
OpisTemplate:Extension#description Generate graph with few code.
AutorzyTemplate:Extension#username Raymond Wu (小璋丸talk)
Ostatnia wersjaTemplate:Extension#version 0.2.3 (2016-03-18)
Zmiany w bazie danychTemplate:Extension#needs-updatephp Nie
LicencjaTemplate:Extension#license Apache v2
Pobieranie
Cache mechanism
PrzykładTemplate:Extension#example http://www.graphviz.org/Gallery.php
TagiTemplate:Extension#tags
<quickgv>
Użyte hakiTemplate:Extension#hook
ParserFirstCallInitManual:Hooks/ParserFirstCallInit

Przetłumacz rozszerzenie QuickGV jeżeli jest dostępne na translatewiki.net

Sprawdź wykorzystywanie i version matrix.

The QuickGV extension helps you generate graph with few code.

All you have to do is giving the nodes and edges, styles are not necessary.

How to

Just a tag

Default graph.

<quickgv name="nothing" />

Quickgv-sample-default.png


Metadata

Default graph and metadata.

<quickgv name="withmeta" showmeta="true"/>

Quickgv-sample-showmeta.png


Usage option

ER Model (usage="er")

Quickgv-sample-ermodel.png

<quickgv name="ER_Model" usage="er">
   // node 123456789012345678901
   A [label="<fT> user_data | <fPK> [PK] user_id\l | <f0> user_type\l | <f1>gender\l | <f2> country\l | <f3> city\l }"];
   B [label="<fT> user_type | <fPK> [PK] user_type\l | desc\l"];
   C [label="<fT> gender | <fPK> [PK] gender\l | desc\l"];

   // edges
   A:f0 -> B:fPK [label="1 .. N"];
   A:f1 -> C:fPK [label="1 .. N"];
   A:f3 -> A:f2;
</quickgv>

Mindmap (usage="mindmap")

Quickgv-sample-mindmap.png

<quickgv name="MM" usage="mindmap">
start = "A";

A [label="Project"];
B1 [label="Budget"];
B2 [label="Risk"];
B3 [label="Members"];

A -> {B1 B2 B3};
</quickgv>

Theme option

Default (theme="default")

Quickgv-sample-theme-default.png

<quickgv name="Pointer1" usage="ram">
   A [label="RAM (0x71xx) | 0x710c\l | 0x7108\l | <fsrc> 0x7104 - 0x830c\l (int* a) | 0x7100\l "];
   B [label="RAM (0x83xx) | <fdst> 0x830c - 0x00ff\l | 0x8308\l | 0x8304\l | 0x8300\l"];
   A:fsrc -> B:fdst [label="a = 0x830c;\l*a = 0x00ff;\l"];
</quickgv>

Cold (theme="cold")

Quickgv-sample-theme-cold.png

<quickgv name="Pointer2" usage="ram" theme="cold">
   A [label="RAM (0x71xx) | 0x710c\l | 0x7108\l | <fsrc> 0x7104 - 0x830c\l (int* a) | 0x7100\l "];
   B [label="RAM (0x83xx) | <fdst> 0x830c - 0x00ff\l | 0x8308\l | 0x8304\l | 0x8300\l"];
   A:fsrc -> B:fdst [label="a = 0x830c;\l*a = 0x00ff;\l"];
</quickgv>

Warm (theme="warm")

Quickgv-sample-theme-warm.png

<quickgv name="Pointer3" usage="ram" theme="warm">
   A [label="RAM (0x71xx) | 0x710c\l | 0x7108\l | <fsrc> 0x7104 - 0x830c\l (int* a) | 0x7100\l "];
   B [label="RAM (0x83xx) | <fdst> 0x830c - 0x00ff\l | 0x8308\l | 0x8304\l | 0x8300\l"];
   A:fsrc -> B:fdst [label="a = 0x830c;\l*a = 0x00ff;\l"];
</quickgv>

Sakura (theme="sakura")

Quickgv-sample-theme-sakura.png

<quickgv name="Pointer4" usage="ram" theme="sakura">
   A [label="RAM (0x71xx) | 0x710c\l | 0x7108\l | <fsrc> 0x7104 - 0x830c\l (int* a) | 0x7100\l "];
   B [label="RAM (0x83xx) | <fdst> 0x830c - 0x00ff\l | 0x8308\l | 0x8304\l | 0x8300\l"];
   A:fsrc -> B:fdst [label="a = 0x830c;\l*a = 0x00ff;\l"];
</quickgv>

Attribute Reference

Attribute Available Values Opis
name RegExp: [a-zA-Z0-9_]+ Name of the graph. (default G)
showmeta true, false Set true to show metadata. (default false)
showdot true, false Set true to show dot source code. (default false)
theme default, cold, warm, sakura See theme option.
usage default, neato (mindmap), record (er, ram) See usage option.

Instalacja

Install repository

Step 1: Install from GitHub

cd /path/to/wiki/extensions
git clone https://github.com/virus-warnning/mw-quickgv.git QuickGV

Install zip package

Step 1: Install from zip package

  • Download ZIP package from QuickGV Releases
  • unzip package
  • rename mw-quickgv to QuickGV

Step 2: Apply this extension

Append following code to LocalSettings.php

require_once("$IP/extensions/QuickGV/QuickGV.php");

Requirements

  • Graphviz 2.38 or later
    • OSX: brew install graphviz
    • CentOS: yum install graphviz
    • Ubuntu: sudo apt-get install graphviz
    • Windows: Install from an Installer package (Tested on Win7)
  • PHP 5.x, and need these functions
    • exec()
    • proc_open()
    • proc_close()

Changelog

  • 0.2.4 (Latest)
    • Extension registration.
    • JSON format language file.
  • 0.2.3 (2016-03-18)
    • Support URL attribute of node, open the link in new tab.
    • Set arrowsize=0.6.
    • Set splines=ortho for usage not set.
    • Set splines=curved for usage="neato".
    • Set splines=spline for usage="record".

The project is hosted at wikimedia.org since 0.2.4, see project dashboard.