Monthly Archives: February 2010

TextFileToTable Version 1.1

NEVER MIND. THE GNU PROJECT IMPRESSES AGAIN.

Please check out the org-mode to emacs for a program that did all this years ago.

http://orgmode.org/

Made a small change to the TextFileToTable script.  Now the user is able to exploit more of the Text::ASCIITable work with the addition of horizontal lines.

By inserting a ‘<<hr>>’ on a line by itself, the program will put another horizontal rule there.

# COMMAND

perl TextFileToTable.pl [delimiter] [File to be read]
perl TextFileToTable.pl \& data.txt

# INPUT

ID&Fruit&Color
1&apple&red
2&banana&yellow
<<hr>>
3&orange&orange

# OUTPUT

.----------------------.
| ID | Fruit  | Color  |
+----+--------+--------+
|  1 | apple  | red    |
|  2 | banana | yellow |
+----+--------+--------+
|  3 | orange | orange |
'----+--------+--------'

Grab the new script here:
http://www.megaupload.com/?d=H0N17GF9

Leave a comment

Filed under Computing, Content