| 1 | #!/usr/bin/perl -w | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | |||
| 5 | use WWW::Scraper::Gmail; | ||
| 6 | use Getopt::Long; | ||
| 7 | |||
| 8 | my $signature; | ||
| 9 | my $getinbox=''; | ||
| 10 | my $getcount=''; | ||
| 11 | my $maxpage=100; | ||
| 12 | |||
| 13 | GetOptions( "get_count" => \$getcount, | ||
| 14 | "signature=s" => \$signature, | ||
| 15 | "get_inbox" => \$getinbox, | ||
| 16 | "max_per_page=i" => \$maxpage); | ||
| 17 | |||
| 18 | |||
| 19 | my $woah = WWW::Scraper::Gmail::setPrefs({ Signature => $signature, MaxPer => $maxpage }) if ($signature or $maxpage != 100); | ||
| 20 | print "Settings changed\n" if ($woah); | ||
| 21 | print "Failure in changing\n" if (!$woah); | ||
| 22 | print WWW::Scraper::Gmail::countMail, "\n" if ($getcount); | ||
| 23 | print WWW::Scraper::Gmail::outputMail, "\n" if ($getinbox); |