Ali Onur Cinar
Articles

JUSTIFY 1.01
FORMATING PLAIN TEXT FROM SHELL

A set of utilities to format plain text documents from shell. Functionality includes creating justified paragraphs, documents with multiple columns.

Justify

Justify is a simple program for manipulating plain text documents. Justify allows you to define a column width for your document, then it reads the input lines from STDIN and produces justified text to STDOUT.

Here is an example of how justify can be used:


   $ justify 40 < my_raw_document.txt > my_formated_document.txt
 

Please note that justify considers line breaks as paragraphs; therefore, before processing your documents with justify, please make sure that there are no line-breaks inside paragraphs. In other words, paragraphs should span a single line.

Collide

Collide reads from STDIN, creates pages consisting of lines_per_page lines with column_per_pages columns. Columns are separated from each other by space_between_columns spaces. Collide outputs the produced document to STD- OUT.

It is suggested to use collide with justify. Here is an example of how collide can be used:


 cat  my_raw_document.txt  |  justify 30 | collide 2 66 4 > my_formated_docu-
 ment.txt
 

This command produces a document consisting of pages containing 2 columns with 66 lines, columns are separated from each other by 4 spaces

Download it as RPM from

Requires


Your Comments


12/31/69 17:00

Name:
Comment:

Valid XHTML 1.0! Valid CSS! FuseBox Inside This is my Google PageRank. - SmE Rank free service Powered by Scriptme

This page was last updated on Sun January 21 2007 06:55:03 PM