mktar: Use `wc` instead of `du` in summary message
[sunny256-utils.git] / outl
blobc322b897c83a935fb1a296e41d2fed1a459f1260
1 #!/usr/bin/env perl
3 # outl
4 # File ID: e9ab7e9e-5d41-11df-92c4-90e6ba3022ac
5 # Lager en outline over HTML-dokumenter.
7 use strict;
8 use warnings;
10 while(<>) {
11 if (/<h([1-6]).*?>(.*)<\/h[1-6]>/i) {
12 my ($Cnt, $Txt) = ($1, $2);
13 while($Cnt--) {
14 print("\t");
16 $Txt =~ s/<a name=.+?>//g;
17 $Txt =~ s/<\/a>//g;
18 $Txt =~ s/^\s+//;
19 $Txt =~ s/\s+$//;
20 print "$Txt\n";