# Introduction

This document contains information needed to run the command line user interface contained in the package. Note that this software doesn't target end users directly, but rather developers of user interfaces or braille systems. The functionality in the user interface does not demonstrate the full capability of the package.

# First Run

To run the user interface, download and extract the latest release. If you do not have Java installed on your machine, you have to download and install that as well.

On the command line, navigate to the extracted folder and type: `java -jar brailleUtils-ui-1.1.0.jar`. Press enter.

This will bring up a list of applications (or features):

- emboss
- text2pef
- pef2text
- validate
- split
- merge
- generate

These are explained in detail below. To start one of them, append their name as the first argument, for example: `java -jar brailleUtils-ui-1.1.0.jar emboss`

# Emboss

Send a PEF-file to an embosser for embossing.

One argument is required, and can be one of the following:

- path to a file
- `-clear`
- `-setup`

Upon the first run, the application will ask the user for the required setup:

- device
- embosser model
- embosser table (if applicable)
- paper size

The file will be sent directly to the embosser on subsequent runs. To change settings, use either `-setup` or `-clear`.

## Setup

Setup will ask all the user to verify all settings.

## Clear

Clear will delete the current settings. The next time the application is started, it runs as on the first run.

## Device

The device is the address where the embosser can be contacted. In most cases this should be intuitive. If your device does not show up, make sure that the embosser is turned on.

## Embosser Model

Note that the same embosser model may communicate differently depending on firmware or hardware version. Make sure that the embosser version is correct.

## Embosser Table

Some embossers require that a table is chosen by the user for the purpose of communication. Make sure that the table chosen in the user interface matches the value expected by the embosser.

## Paper Size

Verify that the paper in the embosser matches the value in the user interface. Some embossers uses rolls of paper. In this case, select a paper size that matches the intended paper size once cut.

# Text to PEF

Convert a text braille file into a PEF-file.

Two arguments are required path to input file and path to output file.

The input file should be a "braille ready" text file, i.e. broken in rows an pages (using the form feed character), and using one unique character to represent each braille pattern.

Optional arguments include:

- mode
- identifier
- date
- author
- title
- language
- duplex

The options `identifier`, `date`, `author`, `title` and `language` all involve setting the meta data of the resulting file. It will not affect the contents of the file in any way.

## Mode

Choose a table to use when converting. Note that, if a character is encountered in the file that isn't in the selected table, an error will occur. The default mode is to attempt to detect. If this fail, choose between the tables suggested in the detector failure message.

## Duplex

Set the duplex property of the resulting file.

# PEF to Text

Convert a PEF-file document into a text braille file.

Two arguments are required path to input file and path to output file.

Optional arguments include:

- range
- table
- breaks
- fallback
- replacement

## Range

Output a range of pages.

## Table

Set the table (character mapping) to use.

## Breaks

Set the line break style. Most braille applications use DOS line breaks.

## Fallback

Set the action to use if an eight dot pattern is encountered and the current table does not support eight dot:

- mask
- replace
- remove

## Replacement

Set the replacement character to use if an eight dot pattern is encountered and fallback is set to "replace".

# Validate a PEF-file

Validate a PEF-file.

One argument is required: path to input file

Optional arguments include:

- mode

## Mode

Set the validation mode:

- full
- light

# Split a PEF-file

Split a PEF file into several files, one file per volume.

The purpose is to facilitating the use of PEF files with braille editors that do not support multi volume files.

Two arguments are required: path to input file and path to output folder.

# Merge several PEF-files

Merge several PEF files into one.

The purpose is to facilitating the use of PEF-files with braille editors that do not support multi volume files.

Three arguments are required: path to input folder, path to output file and identifier.

Optional arguments include:

- sort

## Sort

Set the sorting method to use when ordering files in the input folder.

# Generate a PEF-file

Generate a random PEF-file for testing purposes.

One argument is required: path to output file

Optional arguments include:

- volumes
- pages
- eightdot
- rows
- cols
- duplex

## Volumes

Set the number of volumes to generate.

## Pages

Set the number of pages in each volume.

## Eight dot

Set to true to include 8-dot patterns.

## Rows

Set the maximum numbers of rows on a page.

## Cols

Set the maximum number of characters on a row.

## Duplex

Set the duplex property.

# Plugins

Plugins can be added by creating a directory called plugins in the software folder and placing the plugin (.jar) in that folder.