Braille on Ubuntu

Creating a bash script to analyze a Braille TTY configuration file

Assignment

1. Overview

In this assignment, you will learn about writing bash scripts, parsing files, and regular expressions. You will also learn about the system configuration file of an assistive technology.

A refreshable braille display is a computer hardware which has a series of refreshable, or fluid, braille cells on its surface. Most displays contain a single line with anywhere from fourteen to eighty braille cells. Instead of small holes in a piece of paper, each braille dot in these cells is represented by a tiny pin which can be raised or lowered. This allows individuals who are blind to read information in braille by running their fingers over the refreshable braille cells and then advancing the display to show the next set of characters.

Screen readers are assistive technology that are frequently used by people with visual impairments or learning disabilities. It is also helpful for people learning English (or another language) and for the elderly. Typically, a screen reader will start at the top of a website or document and read any text (including alternate text for images).

This video illustrates both screen reading technology and refreshable braille display.

BRLTTY (https://brltty.app) is a background process providing access to the console screen (when in text mode) for a blind person using a refreshable braille display. BRLTTY expects to find its configuration file in "/etc/brltty.conf”. Each configuration entry consists of a keyword followed by its operand. An arbitrary amount of white space, (blanks and/or tabs), may occur before the keyword, as well as before and after the operand. Keyword processing is not case sensitive.

2. Requirements

Write a bash script which will use regular expressions to perform the following function: It will run like so:
>./brltty.sh /etc/brltty.conf
The script should parse the brltty configuration file and print information about the braille refreshable display or the screen reader settings. You will work with a group of students, each group will be assigned a number. Based on your group number, your script should find the corresponding information.

3. Groups with an odd number

A deaf blind person can use a computer, if it is accessible, using Braille. Create a script that summarizes the available Braille settings on the linux lab machine The script should report the following:

  1. The number of braille-drivers
  2. The list of braille-devices
  3. The number of text-tables
  4. The number of contraction-tables

4. Groups with an even number

A blind person may access the computer screen content using a screen reader. Create a script that summarizes the available speech and keyboard settings on the linux lab machine The script should report the following:

  1. The list of speech drivers
  2. The number of speech drivers
  3. The list of speech driver parameters
  4. The list of keyboard-tables

4. Instructions

  1. Your implementation must be named brltty.sh
  2. Implement the requirements
  3. Test your code with the conf file
  4. Check the results to make sure that your script is producing the correct output

Hint: grep and awk will be useful in parsing the file.

5. Submission

Submit the following to Canvas:

  1. Upload your file brltty.sh
  2. Select one of the brltty settings assigned to your group and describe it in more detail, e.g., its usefulness, and the various values it accepts.

6. Output

Sample tty file

Sample output

Copyright © 2023