Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added code to get the *estimated* sales report as well.
- Loading branch information
Cornelius Hald
committed
Apr 19, 2012
1 parent
58fcc8e
commit ac0d8fc
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env ruby | ||
# -*- coding: utf-8 -*- | ||
|
||
require './android_checkout_scraper' | ||
require './secrets.rb' | ||
require './config.rb' | ||
|
||
if (ARGV.size != 2) | ||
STDERR.puts "Usage: #{$0} <year> <month>" | ||
exit 1 | ||
end | ||
|
||
year = ARGV[0].to_i | ||
month = ARGV[1].to_i | ||
|
||
scraper = AndroidCheckoutScraper.new | ||
if ($proxy_host != nil) | ||
scraper.proxy_host = $proxy_host | ||
scraper.proxy_port = $proxy_port | ||
end | ||
|
||
scraper.email = $email_address | ||
scraper.password = $password | ||
scraper.dev_acc = $dev_acc | ||
|
||
csv = scraper.getEstimatedSalesReport(year, month) | ||
puts csv |