summaryrefslogtreecommitdiff
path: root/mediawiki-trim
blob: a67d205ccd8b724101fe5f7077a6effd06a56efc (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;