summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-04-30 10:47:47 +0000
committerfukachan <fukachan>2001-04-30 10:47:47 +0000
commit0d57b10f72bf3ab6e1e984e15d759e973ce3d891 (patch)
treeeb8e774baed4984ba6e362089aad970aaa4fa6ac /fml
parent349da330e30ba855a208e44d6bb0ebc8f2de1de6 (diff)
downloadfml8-0d57b10f72bf3ab6e1e984e15d759e973ce3d891.tar.gz
fml8-0d57b10f72bf3ab6e1e984e15d759e973ce3d891.tar.bz2
fml8-0d57b10f72bf3ab6e1e984e15d759e973ce3d891.zip
table-ify tool (useful ??)
Diffstat (limited to 'fml')
-rw-r--r--fml/utils/bin/gen_table.pl44
1 files changed, 44 insertions, 0 deletions
diff --git a/fml/utils/bin/gen_table.pl b/fml/utils/bin/gen_table.pl
new file mode 100644
index 00000000..3161ff0a
--- /dev/null
+++ b/fml/utils/bin/gen_table.pl
@@ -0,0 +1,44 @@
+#!/usr/local/bin/perl
+#-*- perl -*-
+#
+# Copyright (C) 2001 Ken'ichi Fukamachi
+# All rights reserved. This program is free software; you can
+# redistribute it and/or modify it under the same terms as Perl itself.
+#
+# $FML$
+#
+
+use strict;
+use Carp;
+use FileHandle;
+use File::Basename;
+
+print "<UL>\n";
+
+for my $f (@ARGV) {
+ my $fn = basename($f);
+ print "\t<LI><A HREF=\"$f\">$fn</A>\n\n";
+
+ my $fh = new FileHandle $f;
+ my $p = 0;
+
+ IN:
+ while (<$fh>) {
+ next if /^\s*$/;
+ last if $_;
+ }
+
+ IN:
+ while (<$fh>) {
+ $p++ if /^\s*$/;
+
+ print $_ if $p == 2;
+ last IN if $p > 2;
+ }
+
+ print "\n";
+}
+
+print "</UL>\n";
+
+exit 0;