]> rtime.felk.cvut.cz Git - wvtest.git/blobdiff - tools/wvwrap
Add description of some scripts
[wvtest.git] / tools / wvwrap
index 189481d0f52c26b0db017af8252132fab3493a31..184b50393a356f24e8ea89375f35a2afb49401fc 100755 (executable)
@@ -6,6 +6,10 @@
 #       Licensed under the GNU Library General Public License, version 2.
 #       See the included file named LICENSE for license information.
 #
+# This script wraps long wvtest protocol lines. I use it as follows to
+# produce nicely formated emails:
+# COLUMNS=80 wvformat < wvtest.log | wvwrap | mail -s Log me@example.com
+
 use strict;
 use Getopt::Long;
 
@@ -16,6 +20,9 @@ sub usage() {
 
 usage() if (@ARGV > 0);
 
+# Optional prefix of wvtest protocol lines
+my $prefix_re = '\([0-9]+\) (?:#   )?';
+
 my $istty = -t STDOUT && $ENV{'TERM'} ne "dumb";
 my $columns;
 if ($istty) {