Utility for Viewing Grade 2 Braille Files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached is a simple program which can be used for viewing Grade 2 files 
such as those on Web-Braille and bookshare. To compile it type
gcc -o brffilt brffilt.c

As the name suggests, this is a filter. It takes input from stdin, changes 
capitals to lower-case and characters like [ to {, and then puts it out to 
stdout. To use it, type something like
<bookname brffilt |less

You can also direct the output to a file. Change to 6-dot braille when 
using brltty to turn off translation. You can then read the book using the 
ordinary l;ess commands. If you use the screen utility, you can keep 
several books open at once and return to them as you wish.

Hope this is of some use.
John


-- 
Computers to Help People, Inc.
http://www.chpi.org
825 East Johnson; Madison, WI 53703

#include <stdio.h>
int
main (int argc, char **argv)
{
  int ch = 0;
  while ((ch = getchar ()) != EOF)
    {
      if (ch == '[' || ch == '\\' || ch == '^' || ch == ']' || ch == '@'
	  || (ch >= 'A' && ch <= 'Z'))
	ch |= 32;
      if (ch == 12)		/*form-feed */
	continue;
      putchar (ch);
    }
  return 0;
}

[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]