Ocrat API
The following document discusses the Roshisoft Ocrat API.
Ocrat API is a simple interface for accessing animated Chinese characters showing stroke orders, originally created by Ocrat. (The Ocrat site closed down in 2005. For more information, you can visit an Ocrat mirror.)
This interface is specially designed for users who know how to type the characters, but do not know the animated character filenames.
http://api.roshisoft.com/ocrat
Press the Enter or Return key and -- Tadaaa!! -- the following image should appear.
The Roshisoft Ocrat API returns an animated GIF image in response to a URL.
The image is 56 pixels tall and 56 pixels wide.
As you can see from the first example, parameters are not required. (same as in the Chop API)
You can place Ocrat API images directly into web pages using the <img> tag. This allows you to place your Ocrat API image on pretty much any web page.
For example:
<img src="http://api.roshisoft.com/ocrat">
You should also get this:
We are now ready to customize our Ocrat API image.
Roshisoft Ocrat API URLs should be typed in the following format, all on one line:
http://api.roshisoft.com/ocrat?z=[character]
Here is an example Ocrat API image:
The only paramater of this Ocrat API image URL is called 'z', which is exactly one Chinese character.
http://api.roshisoft.com/ocrat?z=字Place this URL in <IMG> tags and you can do this:
<img src="http://api.roshisoft.com/ocrat?z=字">The 'z' parameter is Optional. The default character (as seen above) is:
URI/Endpoint: http://api.roshisoft.com/ocrat Formats: GIF89a Animated GIF (56 x 56 pixels) Method: GET Parameters: * z Optional. -- Chinese Character (utf-8, multi-btye) Example URI: http://api.roshisoft.com/ocrat?z=叉
Ocrat was a special project when it first started. Many of the ideas that we use every day were pioneered by the design team.
It is my pleasure to share my interface with you to honor Ocrat's efforts to improve Chinese language learning.
Thank you. :-)
Translations: