From: Don Armstrong Date: Sat, 27 Oct 2007 01:24:56 +0000 (+0000) Subject: * Fixup urls better in get_sgf X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=98a68a9249b3ea51b1f148cbcbbf061151273506;p=bin.git * Fixup urls better in get_sgf --- diff --git a/get_sgf b/get_sgf index 090ba8d..229424c 100755 --- a/get_sgf +++ b/get_sgf @@ -113,6 +113,8 @@ my $base = 'http://gobase.org/online/sgf2misc/?fname=/games/japan/titles/kisei/3 for my $url (@ARGV) { # strip of leading stuff $url =~ s/[^=]+=//; + $url =~ s{(?:http://)?(?:gobase\.org)?}{}; + $url = qq(/$url) unless $url =~ m{^/}; my $fname = $url; my $uri = URI->new($base); $uri->query_form(mode => $options{mode},