GithubHelp home page GithubHelp logo

brat's Introduction

(Br)aille P(at)tern

A tool for converting braille symbols to and from binary numbers.

Use Cases

  • Accessibility: create Braille symbols that can be printed out and used to label objects or identify locations in a space.

  • Art and Design: create custom Braille patterns that can be incorporated into artwork or design projects.

  • ⢹⠁⣟ ⡱⢎ ⢹⠁ converters: make physical embossed printout using Braille symbols

Usage

To encode braille symbols, simply pass in the binary string patterns that represent the symbol:

python brat.py 10001111 1 
# ⢹ ⠁
python brat.py --by-row 101011 101
# ⠧ ⠃
python brat.py --by-row --format 1011 111011
# 1011 -> ⠓
# 111011 -> ⠯
python brat.py -a A B C
# ⡁ ⡃ ⡉

Trailing zeros can be omitted.

To decode braille symbols to their corresponding binary pattern, pass in the symbols to brat.

python brat.py -e ⣒ ⡱ 
# 01010101 10010110
python brat.py --by-row --encode ⣒ ⡱ 
# 00110011 10010110

Installation

Simply clone the GitHub repository you should be good to go!

git clone https://github.com/your-username/brat.git
cd brat
python brat.py 1011101

Logic

There are 8 bits that represent the possible positions where a dot may be present in a Braille symbol: 4 bits for the first column, and 4 for the last. A value of 1 indicates the presence of a dot, while 0 indicates the absence.

In total, there are 256 braille symbols (2^8), so their binary values range from 00000000 to 11111111. This allows for fast conversion between the symbols and their binary value.

Future plans

  • Add support for decoding symbols
  • Add support for ascii converters
  • Use argparse instead of manual parsing
  • Add suport for text to embossed braille printout
  • Add pip support

Contributing

Contributions are highly appreciated! If you have any suggestions, please don't hesitate to open an issue or pull request.

brat's People

Contributors

helionsmoker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.