====== Go Diagram Plugin ====== ---- plugin ---- description: Edit and display Go diagrams (boards) in DokuWiki author : Andreas Gohr email : andi@splitbrain.org type : syntax lastupdate : 2016-02-03 compatible : 2005-05-05+ depends : conflicts : similar : chessdiagram, weiqi tags : media, images, diagram, game, mediawiki downloadurl: https://github.com/splitbrain/dokuwiki-plugin-godiag/zipball/master sourcerepo : https://github.com/splitbrain/dokuwiki-plugin-godiag/ bugtracker : https://github.com/splitbrain/dokuwiki-plugin-godiag/issues donationurl: http://donate.dokuwiki.org/godiag ---- This plugin allows to create board setting diagrams for the Asian game Go. The board is displayed as image and can be downloaded in SGF format. Hyperlinks can be added to single stones of the board. ===== Download and Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. This plugin needs PHP with libGD and Freetype support. ==== Changes ==== {{rss>https://github.com/splitbrain/dokuwiki-plugin-godiag/commits/master.atom date}} ===== Usage and Syntax ===== The plugin is a more or less direct port of the [[http://meta.wikimedia.org/wiki/Go_diagrams|Go diagrams extension]] for MediaWiki, so the same syntax applies((Exception: different styles are not supported)). The syntax has to be placed between '''' tags. The first line then starts with ''$$'' and some optional switches, followed by a description of the board. The following switches can be used after the ''$$'' preamble. | ''B'' | black player makes move 1 (default) | | ''W'' | white player makes move 1 | | ''b'' | insert a break after the image; The following text will appear below the image. | | ''c'' | draw coordinate markers | | ''l'' | float left | | ''r'' | float right (default) | | ''1''--''40'' | specify board size (default is 19). Useful for sizes above 19 and as a hint to SGF. | The following lines then define the board with each line representing one row on the board. You can use these symbols: | ''%%|%%'' | vertical border | | ''-'' | horizontal border | | ''.'' | unoccupied point | | '','' | hoshi point | | ''X'' | black | | ''O'' | white | | ''B'' | black circled | | ''W'' | white circled | | ''#'' | black with square | | ''@'' | white with square | | ''C'' | circled point | | ''S'' | point with square | | ''0-9'' | numbered moves (0=10); black is first by default | | ''a-z'' | marked points | | ''_'' | empty space (useful as separator and for other effects) | After the board layout, hyperlinks can be added to marked stones using square brackets like this: [a|WikiPageAboutMarkedPointA] [3|WikiPageAboutMarkedStone3] [C|http://link.to.example.com/circled-point.html] Adding "X at Y" hints to the SGF generator in the title, e.g. "A mysterious disappearance (9 at 3)" will create an SGF with moves 3 and 9 on the same spot. ==== Simple Example ==== {{:plugin:godiag1.png?nolink }} $$c A simple example with extra spacing ------------------- | . . . . . . . . . | | . . . . . . . . . | | . . , . 2 . , . . | | . . . . . . . . . | | . . . . 1 . . . . | | . . . . . . . . . | | . . , . . . , . . | | . . . . . . . . . | | . . . . . . . . . | ------------------- ==== Complex Example ==== {{:plugin:godiag2.png?nolink }} $$ A complicated example with marks, numbers, hyperlinks, border just on one side |..1.__.2. |..a.__.b. |..W.__.@. |..B.__.#. |..C.__.S. [2|wikipage] [a|http://example.com] [S|wiki:page2] [@|wikipage3] ===== Limitations ===== * No [[:interwiki]], mail or windows share links are supported for hyperlinks * Generated images and SGF files are **not** protected by ACL, everyone who knows the URL to the image can download it