Permalink
Browse files

atbl: Generate pretty ascii from command line

  • Loading branch information...
olof committed Aug 8, 2012
1 parent 2b757ad commit e763639cdce1399ecd3b65415d6a7142c1cbf672
Showing with 17 additions and 0 deletions.
  1. +17 −0 atbl
View
17 atbl
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+use warnings FATAL => 'all';
+use strict;
+use Text::ASCIITable;
+
+my $title = shift;
+my $cols = shift;
+
+
+my $tbl = Text::ASCIITable->new({headingText=>$title});
+$tbl->setCols(split /:/, $cols);
+
+for(@ARGV) {
+ $tbl->addRow(split /:/);
+}
+
+print $tbl;

0 comments on commit e763639

Please sign in to comment.