From aeb52d3cb260e0d2f228af1c804cd34e2f25c9cf Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 26 Jan 2015 18:13:55 +0100 Subject: Fix add markdown-tidy script. --- markdown-tidy | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 markdown-tidy diff --git a/markdown-tidy b/markdown-tidy new file mode 100755 index 0000000..cba5b62 --- /dev/null +++ b/markdown-tidy @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +# extract and decode markdown content from HTML source + +use warnings; +use strict; + +use Path::Tiny; + +my $infile = shift; +my $outfile = shift || $infile; + +$_ = path($infile)->slurp_utf8; + +s!.*?
!!s; +s!]*>!!g; +s!\S+png\S+!!g; + +path($outfile)->spew_utf8($_); + +1; -- cgit v1.2.3