Index: Dev/pukiwikiplus/getsource.pl
===================================================================
--- Dev/pukiwikiplus/getsource.pl	(revision 74f778c0eeed802c12174e0e6cff4851670e050d)
+++ Dev/pukiwikiplus/getsource.pl	(revision 74f778c0eeed802c12174e0e6cff4851670e050d)
@@ -0,0 +1,33 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+use utf8;
+
+use Web::Scraper;
+use URI;
+use Data::Validate::URI qw(is_uri);
+use Encode;
+
+if (@ARGV < 1) {
+    print "$0: url_to_pukiwikiplus_page\n";
+    exit;
+}
+
+my $url = $ARGV[0];
+die "$0: '$url' is not URI" unless is_uri($url);
+
+if ($url !~ /cmd=source/ ) {
+    $url =~ s#\?(.+)#\?cmd=source&page=$1#;
+}
+
+print STDERR "getting: '$url'\n";
+
+my $source = scraper {
+    process "pre#source", "source" => "TEXT";
+    result "source";
+};
+
+my $text = $source->scrape( URI->new($url) );
+
+print encode('utf8', $text);
