while we're on the subject of scripts ...

Cheryl Homiak chomiak at chartermi.net
Wed Dec 11 00:23:10 EST 2002

Is there a solution for this one?
I have nfbtrans on my system and I can convert web braille to a text file which
can be read with speech. The nfbtrans program was irritating me by shutting down
after each file. sO i did this:

for i in $(ls *.brf); do
echo item: $i

Actually, I probably didn't need the $ls *.brf) I probably could have just done
Anyway, this clears the screen, puts up the brf filename I'm converting and goes
into nfbtrans with the filename still at the top of the screen so I can find it
to put in the corresponding text filename.
But what i would really like to do is have nfbtrans run without any help from
me. I don't know if it is possible to pass information to the program or whether
I would have to get into the nfbtrans code to do it.
the nfbtrans program first gives you a choice of what you want to do with 1
"translate a file" as the default; I always want "3" for backtranslating. Then
if asks for the name of the file being translated; you enter that and hit enter.
Next it asks for the name of the translated file and you hit enter. Finally, it
asks for how many copies with the default being one. then it creates the new
text file. If I could pass these variables to the nfbtrans program, I could run
a simple script that would merrily translate all the .brf files in a directory
to .brf files. I could easily even get more automated by adding wget into the
script to download all the files, though this means some work of finding out how
many volumes books have and writing a file with the urls for wget. Anyway, i
could get pretty automated about the whole thing.
Does anybody know: can I pass the information into the nfbtrans program somehow
or would this involve reworking the nfbtrans code?
I realize the above script is also very incomplete in that if you enter
something wrong while running a file in nfbtrans you don't get an error message
or a chance to try again; that file just gets skipped and you have to go in and
do it by hand later. But for my purposes at the moment, it's adequate, except
it requires my constant supervision and input.


More information about the Speakup mailing list