Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
Added some file-level documentations for added clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
callumfrance committed Jun 3, 2020
1 parent fb5414b commit fddaa93
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 31 deletions.
10 changes: 9 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
"""
Main
The input-independent means of controlling the brailler program
The input-independent means of controlling the brailler program.
This file contains the loops for
- The entire program
- The read cycle
- The write cycle
Depending on how the program was compiled, this file also instantiates the
appropriate view (ViewBraille or ViewCLI).
"""
from os import listdir, mkdir
from os.path import isfile, isdir, join, normpath
Expand Down
4 changes: 4 additions & 0 deletions pi/gpio_in_out.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
This is a test file to ensure that the pins being used on the Raspberry Pi
for both input and output are operational.
"""
import gpiozero

pinout = [18, 23, 24, 25, 12, 16]
Expand Down
4 changes: 4 additions & 0 deletions pi/gpio_out.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
This is a test file to ensure that the pins being used on the
Raspberry Pi are operational.
"""
from gpiozero import LED
from time import sleep

Expand Down
30 changes: 0 additions & 30 deletions pi/pi.py

This file was deleted.

8 changes: 8 additions & 0 deletions reader/read.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
This is the Reader class, which is responsible for directly interfacing
with the Liblouis library functions.
This class allows for the program to output Braille from English,
and to turn input Braille into English to be interpreted by the wider
program or to store in a text file.
"""
from louis import translateString, backTranslateString
"""
Some possible tables:
Expand Down
9 changes: 9 additions & 0 deletions views/view_braille.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
This is the ViewBraille class, used to interface this program via a
hardware device such as the Raspberry Pi Zero W or equivalent.
The class seeks to replicate the same functionality as the ViewCLI class,
but instead of displaying on the CLI, it displays on the GPIO pins.
Despite being referred to as a 'view' it also includes support for input.
"""
import gpiozero
from time import sleep

Expand Down
8 changes: 8 additions & 0 deletions views/view_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
"""
This is the ViewCLI class, used to interface this program via
the console (e.g. terminal, commandline, or shell).
This class can be used to demonstrate the functionality of the ViewBraille
class on a computer via the shell.
Despite being referred to as a 'view' it also includes support for input.
"""

class ViewCLI:

Expand Down
3 changes: 3 additions & 0 deletions views/view_factory.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
This class determines what
"""
# import views.view_cli as view_cli
# import views.view_braille as view_braille

Expand Down
5 changes: 5 additions & 0 deletions views/view_type.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""
This is an abstract class that can be used as the basis for the
creation of new views. The only two views of the program -
ViewBraille and ViewCLI - are both inheritors of this class.
"""
import abc


Expand Down
6 changes: 6 additions & 0 deletions writer/braille_cell.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""
The BrailleCell class is used to represent a single Braille cell object.
It provides tools so that it can check itself to see if it is blank,
translate itself into the unicode format, and check equivalency.
"""
import writer.write as write


Expand Down

0 comments on commit fddaa93

Please sign in to comment.