brailler is software that you can put onto a Raspberry Pi to make a hand-held controller that will interpret an alphabetical English text file into a Braille output, as well as interpret a Braille input into an alphabetical English text file.
In the likely event you do not have a Braille controller, you can also use this software as a wrapper for the LibLouis library. Read plaintext alphabetical files into braille on your console. Practice writing braille into alphabetical English.
Here is the example schematic for a Braille interface. Note that the motors are outputs and the pushbuttons are inputs. This is connected in the same manner as written in the program.
- Take Braille unicode input and write it to a text file in alphabetical English
- Open a text file and print out a Braille unicode translation
- User can choose to perform this program using a command line interface, or using a braille interface
- Install LibLouis on the device
- Setup LibLouis for Python
- Install and setup this program (brailler)
- Ways to run:
make cli
runs the app in the consolemake braille
runs the app in the Braille mode (for use with the Raspberry Pi)make fastbraille
runs the app in the Braille mode but does not check pip requirementsmake test
runs the pytestmake coverage
runs the pytest and checks how much code has been tested
-
Ensure your device has the following packages, using
apt
or equivalent installer:sudo apt-get install autoconf m4 libtool perl pkg-config
-
Clone (or download) the latest tarball from the LibLouis Github releases
mkdir louis cd louis git clone https://github.com/liblouis/liblouis.git git tag git checkout v3.13.0 git branch -l
-
Navigate into the LibLouis folder
cd liblouis/
-
In terminal run the following commands in order to install LibLouis:
sudo ./autogen.sh sudo ./configure sudo make sudo make install sudo /sbin/ldconfig -v
-
The following command should now work in terminal:
echo this is a test sentence | lou_translate unicode.dis,en-ueb-g2.ctb
-
Ensure your device has the following packages, using
apt
or equivalent:sudo apt install python3-distutils
-
In terminal go to python folder
cd ~/Documents/LibLouis/liblouis-.../python
-
Install python binding with
sudo python3 setup.py install
-
The following python snippet should now work, demonstrating a successful installation:
import louis a_test = louis.translate(['unicode.dis', 'en-ueb-g2.ctb'], "a test string") print(a_test[0])
More information on the available methods and their parameters is found in liblouis.../python/init.py
- Ensure your device has the following packages using,
apt
or equivalent:sudo apt install python3-pip python3-env
- Clone or download this repository
mkdir brailler cd brailler git clone https://github.com/callumfrance/brailler.git
- Install the requirement packages (alternatively rely on venv exclusively)
pip3 install -r requirements.txt
- Create a directory for the programs virtual environment to run inside of
python3 -m venv venv
If you want to run this program as the first thing that happens when you power on a Raspberry Pi device (as intended), you can do the following. Note that this advice applies to the Raspbian Lite (console view, not desktop view).
First, edit the raspi-config
to not require a login.
Next, you need to edit the file rc.local
. Ensure that the exit condition, if
present, is removed or commented out, and add the following line to the bottom
of the file:
(cd home/pi/brailler && make Braille)
This will run program, provided that the directory you have installed it in is
home/pi/brailler/
.