On September 8, 2010 Apple completely updated the Sales and Trends section of iTunes Connect. The old script for downloading the daily reports no longer worked. After a good bit of work I came up with a new script that works with the new website.
Attached is a bash shell script that will allow you to automate the downloading of daily Sales/Trend Reports from Apple. I am making this available as a courtesy to other developers but it is not supported in any way and I do not plan on maintaining it. Use this for your own use and your own risk.
Time will tell how well it works as the new site is updated. One big improvement with this script is that it automatically determines all available reports for your account and attempts to download all missing daily reports.
This script just downloads the data. That's it. What you do with it is up to you.
UPDATES:- October 3, 2010: v1.1: Support changes made to iTunes Connect on September 29, 2010.
- October 4, 2010: v1.1.1: Fix premature removal of file when DLEV set to 0.
- October 29, 2010: v1.1.2: Fix iTunes Connect change make on October 29, 2010.
- December 11, 2010: v1.1.3: Fix hardcoded date used for weekly date parameter.
- March 11, 2011: v1.1.4: Update for changes in sales website.
- March 12, 2011: v.1.1.5: Add support for downloading weekly reports.
- August 16, 2011: v.1.1.6: Update for changes in sales website.
- August 17, 2011: v.1.1.7: Update for changes in sales website.
With the introduction of Apple's new auto-ingest tool, I'd suggest people start using it instead of this script.