Cloud Shogi Diagram Generator

ツイート Follow @sfenreader_gae このエントリーをはてなブックマークに追加
Language:

Abstract

Cloud Shogi Diagram Generator is the web service that you can create a shogi diagram image.
There is also a Web API for the developers. (e.g. Twitter shogi engine bot programmer.)

This service can use for tweeting a shogi diagram on Twitter, or pasting a diagram image (e.g. theme diagrams, mate problems) on your blog directly (don't need to save to local disk).This service DOES NOT use a disk space on your blog.

This service is provided "AS IS" BASIS. So, there is no guarantee. Please, understand it.

I took a hint from Google Chrome Extension SFEN Reader by ginsho.


Create a Shogi diagram on the Web


Create a diagram using Kifu for Windows(Japanese)

Paste the diagram string that can get from Kifu for Windows Menu ([編集](Edit) -> [局面のコピー](Paste) -> [通常]) on the clipboard. and, push the "Convert" button. Then, generate the image URL and the img tag for your blog, and you can preview that.

You can enter Player Names (Black and White), and a diragram title.
Player names and diagram title can use non-ascii character, but you can't use Unicode pieces character ☗☖. Please use ▲△(▽) intstead of it.


Diagram of "Kifu for Windows"

Black Name: (*not required)
White Name: (*not required)
Title: (*not required)
Last Move: Square (Example:76 84 * not required)
Which to move: Black White Do not display
Piece Kind: Kanji Alphabet(beta) International
Complete

URL : (Required Twitter Account)
vs Diagram SFEN:
Paste on your blog.

Preview

Setting a display size

Width: Height: Keep Aspect Ratio

How to use (Web API)

Send a HTTP GET Request to get a diagram image.
http://sfenreader.appspot.com/sfen?sfen=sfen_string&lm=last_move_square_num&sname=name_of_sente&gname=name_of_gote&title=title&piece=kanji_or_alphabet_or_international&turn=on_or_off
This WebAPI returns a png image indicates by sfen_string
sfen_string must be URIencoded, because it includes spaces.
sfen_string is the required parameter.

Parameter lm emphasis a square of last_move_square_num. Generally , this parameter uses for the last move.
lm is not the required parameter.

sname is the black name (Sente Name), and gname is the white name (Gote Name).These parameters must be URIencoded on UTF-8.
These parameters are not the requred parameters. You can only show the black name, or only show the white name.

title is the title of a shogi diagram. This shows upon the shogi board image.
This must be URIencoded on UTF-8 same as sname and gname. [Example: (First game of 52nd Oui-sen) or (Last move ▲68 - K)]

piece indicates a kind of piece. "kanji" indicates Japanese kanji pieces, "alphabet" indicates alphabet one character pieces, "international" indicates international pieces (by HIDETCHI).

turn is a flag either emphasis or not which to move to black mark or white mark.
You specify &turn=on or &turn=off.
If you omit this parameter, default value is on.
If SFEN has no information which to move, image doesn't include that information.

When you want to use this API for a twitter bot, you specify /twiimg instead of /sfen. Like this.

http://sfenreader.appspot.com/twiimg?sfen=sfen_string&lm=last_move_square_num&sname=name_of_sente&gname=name_of_gote&title=title&piece=kanji_or_alphabet_or_international&turn=on_or_off
When you access the URL, you can get a html page which is embedded twitter card tags.
▼Show Guide▲Hide Guide

Example

▼Show example▲Hide example

Initial Position(kanji)

img tag


Legendary ▲G - 52(international pieces)


../sfen?sfen=ln1g5%2F1r2S1k2%2Fp2pppn2%2F2ps2p2%2F1p7%2F2P6%2FPPSPPPPLP%2F2G2K1pr%2FLN4G1b%20w%20BGSLPnp%2061&lm=52&sname=Yoshiharu%20Habu&gname=Hifumi%20Katou&title=The%2038th%20NHK%20Cup%20tournament&piece=international

img tag


Mate Problems(Shogi Zukou No.1)

../sfen?sfen=1pG1B4%2FGs%2BP6%2FpP7%2Fn1ls5%2F3k5%2FnL4%2Br1b%2F1%2Bp1p%2BR4%2F1S7%2F2N6%20b%20SPgnl11p

img tag



Links


Contacts

If you think this program generates wrong shogi diagrams, please mention to @shibacho2 with URL or SFEN string. Please tell me your computer's OS and browser environment. That is helpful information.

Acknowledgement


History


Powered by Google App Engine