Skip to content

A simple tool to convert ready braille files between different braille encodings

Notifications You must be signed in to change notification settings

Futyn-Maker/brlc-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Braille Encoding Converter

Braille Encoding Converter (brlc-converter) is a simple tool to convert ready braille files between different braille encodings. A braille encoding is a character set used to represent braille patterns in digital form. For historical reasons, different countries, and even different Braille printing houses within the same country, use different character sets when preparing texts for embossing in braille. This is largely due to the equipment used, as well as the peculiarities of a specific alphabet. This tool is designed to solve the problem of incompatibility of Braille encodings when it is necessary to emboss a file prepared for the equipment of one printing house on the equipment of another one, or to read this file using a braille display.

Supported braille encodings

For now, the following formats are supported:

Usage

There are two ways of using this app: as a command line tool or as a web service.

The command line tool

Depending on whether you use an already compiled executable file or run the app from the source code, type in the terminal: brlc-converter --help OR node brlc-converter.js --help (in the second case it is assumed that you've already installed Node.js.

Usage: brlc-converter [options]

Converts braille files between different braille encodings

Options:
  -V, --version        output the version number
  -f, --from <format>  The braille encoding of the input file (default:
                       "unicode")
  -t, --to <format>    The braille encoding of the output file (default:
                       "unicode")
  -i, --input <file>   Path to the file to be converted
  -o, --output <file>  Path to the output file
  -h, --help           display help for command

The arguments for from and to options are following:

  • unicode (default) — Braille Unicode.
  • brf — BRF.
  • logos — Logos braille encoding.
  • chtenie — Chtenie Publishing House braille encoding.
  • gost — GOST braille encoding.

For example, to convert the BRF file to the Braille Unicode format, you can type: brlc-converter -f brf -t unicode -i mybook.brf -o mybook.txt

Using the web service

Instead of using the command line tool, you can just go here and use the simple form to select input and output formats and upload your file (this UI is available in Russian language only). After pressing "convert" button, the link for downloading converted file will appear after a few seconds.

Running from source and building

If you would like to run the app from source, or build it for your platform, do following:

  1. Install Node.js.
  2. Clone this repo with git clone https://github.com/Futyn-Maker/brlc-converter.git. Then move to the project directory with cd brlc-converter.
  3. Install the dependencies with npm install. After this, you can run the app using "brlc-converter.js". If you want to get an executable file, follow next.
  4. Install Pkg with npm install -g pkg.
  5. Run pkg . and wait for completing packaging. This will create the "dist" folder with the executable file for your platform containing a command line tool.
  6. Copy the "data" folder from the root directory of the app to created "dist" folder.

The web version of the app can't work locally due to the Content-Security-Policy. You should deploy the app using your own server or one of the free static-site hostings, such as GitHub Pages, Cloudflare Pages, or Surge. To do this you need:

  1. Clone the repo with git clone https://github.com/Futyn-Maker/brlc-converter.
  2. Create a new directory, for example, "web" and copy there following:
  • "data" directory;
  • "index.html".;
  • "convert.min.js".
  1. Deploy the project using this folder.

Note: the file "convert.min.js" was created by Browserify. You can get it yourself from "convert.js". To do this, install Browserify with npm install -g browserify, then, in the project directory, run browserify -o convert.min.js -s convert convert.js.