xyaku - English-Japanese or English-Korean translation program for X11… more info»

README

xyaku
=====
xyaku is an English-Japanese translation program and more.
Furthermore, xyaku is yet another Web search engine front-end,
and yet another search front-end through dictionary.
xyaku works as follows,
it invokes an add-in commands by specified key combinations.
Then, xyaku sends the contents of X selection buffer(*) into add-in's stdin,
and receives the output from the add-in command (from add-in's stdout).
Finally, xyaku shows the result on a pop-up window.
(Or, when xyaku works as a Web search engine front-end, it's up to Mozilla to show the result.)
(*)If you are not familiar with X selection buffer, you could imagine something like clipboard.
You can see addin/ADDIN.txt about standard add-in commands.
Usage
=====
xyaku [toolkit options] [-config {rc-file}] [-parsemsg [1|0]]
Select a word by a usual X seletion buffer method.
For example, double-click a word on kterm(xterm).
Pressing the key combination specified in .xyakurc, you will see the translation on a popup window.
Default key combination is Control plus F1 key.
If the translated word isn't found, no window is popped up.
Please see config file ($prefix/lib/xyaku/xyakurc or ~/.xyakurc) to find what key combinations
are assigned to functions.
You press the key combination again, and the popup window disappears.
If you want to use xyaku as yet another Web search engine front-end, select a word by the same way.
Press the key combination specified in .xyakurc, such as Control+F3 or Control+F4 keys as default.
The current implemention depends on Netscape's '-remote' feature, and you can see the result from
Web search engine on Netscape's browser.
Shift plus F1 is assigned to help as default.
Automode
========
In automode(you can specify in xyakurc file), you don't need to press key.
When you select a word, you can see the translation automatically.
You can know whether xyaku is in automode by seeing bolder window border.
Internally, it does polling with timeout callback. So, it might annoy you.
Warning
=======
I have to warn you here.
Sometimes, you could implicitly select words. For example, type ctrl-k on Emacs.
xyaku passes it to add-in commands, and some of add-in commands are simple shell scripts,
and they don't examine the input so carefully.
That implies it could be dangerous if you accidentally select something backquoted string etc.
In automode, this danger could occur accidentally.
Misc.
=====
Cache feature can be enabled by config file.
There is no cache compaction mechanism.
If you use xyaku for a long time and you worry about memory, you can clear the cache as follow,
$ killall -HUP xyaku
Config file(xyakurc) format
===========================
Please read comments in the sample file.
Add-in modules
==============
I believe you can easily create your own add-in module.
It must follow the rules below,
* Get the target word from the standard input.
* Put the result to the standard output.
There is one thing you have to remember.
An add-in module must return.
In other words, the process must end up.
I will show you a simple example, which may help you to understand what I meant.
An illegal script, because it won't return, unless you will kill xterm.
#!/bin/sh
xterm
A legal script, because it will return
(xterm won't return, but it doesn't matter.)
#!/bin/sh
xterm &
Copyright
=========
GPL applies all portions of the code I wrote. Please see COPYING file.
Bug report, requests, etc.
==========================
Send e-mail to the address below,
inoue@ainet.or.jp
I'd be happy if you let me know your cool add-in modules.
You can get access to the URL below,
http://www.ainet.or.jp/~inoue/software/xyaku/ (Japanese)
http://www.ainet.or.jp/~inoue/software/xyaku/index-e.html (English)