summaryrefslogtreecommitdiff
path: root/markdown-tidy
blob: cba5b6232d3b800e658bf021e9fa5cf550c9d01a (plain)
  1. #!/usr/bin/perl
  2. # extract and decode markdown content from HTML source
  3. use warnings;
  4. use strict;
  5. use Path::Tiny;
  6. my $infile = shift;
  7. my $outfile = shift || $infile;
  8. $_ = path($infile)->slurp_utf8;
  9. s!.*?<div class=\"panel-heading\">!!s;
  10. s!</?div[^>]*>!!g;
  11. s!\S+png\S+!!g;
  12. path($outfile)->spew_utf8($_);
  13. 1;