summaryrefslogtreecommitdiff
path: root/mediawiki-trim
blob: 3e8bcb7ef22164b22385c014b39bc5bd79d43ca5 (plain)
  1. #!/usr/bin/perl
  2. # drop content above initial headline - i.e. treat it as editorial noise
  3. use warnings;
  4. use strict;
  5. use Path::Tiny;
  6. use HTML::Entities;
  7. my $infile = shift;
  8. my $outfile = shift || $infile;
  9. $_ = path($infile)->slurp_utf8;
  10. s!^(?:.*?\n)?= != !s;
  11. path($outfile)->spew_utf8($_);
  12. 1;