smartparallel-printfile

command module
v0.0.0-...-f5e780d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2019 License: GPL-3.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

spprintfile

See: https://mansfield-devine.com/speculatrix/projects/smartparallel-serial-to-parallel-printer-interface/

Go command line utility for the Raspberry Pi to print a text file via the SmartParallel interface.

Now working, but still (and forever) a work in progress.

There's currently no checking to ensure the file is a valid plain text file. Passing it a binary file or something with weird unicode characters will result in 'undefined behaviour'.

Currently uses the stianeikeland/go-rpio library for accessing the RPi's GPIO pins.

Usage:

spprintfile [flags] -f <file>

The file must be specified this way, otherwise the program throws an error (file not found.)

Optional flags:

-b

Ignore blank lines. ** NOT IMPLEMENTED YET **

-d

Debug mode. Produces more verbose output than -v.

-i

Print info banner. Prints the filename, print mode, date and time before the text.

-m <string>

Print mode. Sets number of columns and print style (assumes Epson control codes). Valid values are: 'norm' - normal, 80-column (default) 'cond' - condensed, 132-column. 'emph' - emphasised, 80-column All other values are ignored and the program will default back to 80.

-s

Split long lines. Normally, any lines longer that the number of columns will be split crudely, simply by splitting at the last column. With this mode selected, it looks for a suitable space earlier in the line and splits there - so that lines don't get split mid-word. If there is no space earlier in the line, the text will simply be split at the defined number of columns. Default: false.

-t

Truncate lines instead of splitting/wrapping them. Default: false.

-v

Verbose mode. Print various entertaining messages. Default: off.

-x

Experimental mode. Will execute a block of code that can be edited for the purposes of mucking about. Default: false.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址