@comoelagua.org/bra2text

1.0.1 • Public • Published

bra2text

Braille ASCII to text

usage

import { readFile, writeFile, writeFileSync } from 'node:fs';
import { bytesBra2bytesAscii } from '@comoelagua.org/bra2text'

/**
 * Usage file braille to text ISO-8859
 */
function fileBra2textIso8859(path) {

  readFile(path, (err, bytesBra) => {
    if (err) throw err

    const bytesAscii = bytesBra2bytesAscii(bytesBra)

    const fileDest = path.slice(0, -4) + '-8859.txt'
    const data = Buffer.from(bytesAscii)
    writeFile(fileDest, data, (err) => {
      if (err) throw err
    })

  })
}

fileBra2textIso8859('./debug/example-braille-ascii.bra')

Readme

Keywords

Package Sidebar

Install

npm i @comoelagua.org/bra2text

Weekly Downloads

3

Version

1.0.1

License

GPL-3.0-or-later

Unpacked Size

25.7 kB

Total Files

8

Last publish

Collaborators

  • mugedoc