1.0.1 • Published 2 years ago

@comoelagua.org/bra2text v1.0.1

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
2 years ago

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')
1.0.1

2 years ago

1.0.0

2 years ago