Fun Scripts and Programs
Many students and instructors of the Chinese language
have a need to display pinyin with tone marks in their documents. A number
of fonts have been created for PC and Macintosh which allow the easy input
of pinyin (for example, Easytone by James Dew). I developed a Macintosh
application to convert documents between many of these fonts called Pinyin
Font Converter. With the growth of Unicode's popularity and the ease
with which users can now display unicode, especially in their browsers,
many of us want to produce pinyin with tones in unicode.
Installation: Download the script. The script contains a function which does the conversion. Below this is some code used by my site to output the results, you will need to customize this according to your own needs.
Installation: Download the script. Change the name from template.txt to template.pl (at the command line this might be mv template.txt template.pl).
Usage: Put the header.html and footer.html files (or one or the other) into the same directory as the template.pl file. Run the template.pl script from the command line and a header.js and footer.js files will be created. To run the script, you may have to add the execute permission (for example chmod +x template.pl) and indicate the script as being in the current directory (for example ./template.pl). This script has only been tested on Linux and Mac OS X.