Skip to content

Instantly share code, notes, and snippets.

@lopnor
Created April 23, 2010 04:40
Show Gist options
  • Select an option

  • Save lopnor/376182 to your computer and use it in GitHub Desktop.

Select an option

Save lopnor/376182 to your computer and use it in GitHub Desktop.
#!perl
use strict;
use warnings;
use Config::Pit;
use Net::Google::DocumentsList;
# en: english
# zh-TW: Taiwanese
my $target = shift || 'en';
my $cli = Net::Google::DocumentsList->new(pit_get('google.com'));
my $item = $cli->add_item(
{
file => 'osdc.txt',
source_language => 'ja',
target_language => $target,
}
);
$item->export(
{
format => 'txt',
file => 'osdc.'.$target,
}
);
$item->delete({delete => 1});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment