Continuing my prior post where I talk about my server replacement, a Synology NAS (DS211j). In essence, a cheap, tiny dedicated Linux box featuring an ARM CPU and custom web UI specially designed for SUPER EASY RAID array maintenance and creation. There’s a 4 drive version, some many-more drive versions, but they cost more.
This time, I’m here to talk about a little tool for getting your daily sales data from Apple’s iTunes Connect website. AppDailySales!
This is a python script I was recommended some months back, but it needed a few things IMO. So in a shocking rare case of OSS justice, I added the features I wanted myself and submitted a patch:
Just a few days ago (nine months later), version 2.9 was released (sparked by Apple’s change to the system), now including my patches! 😀
To run the script, all you need is Python. Before I used to run this on Windows XP (Python installed in C:\Python2.7\, with PATH environment variable set to include this).
Now with the NAS, I SSH in to the device (Go download Putty if on Windows), login as root (same password as admin), and install the python package.
ipkg install python
Place the AppDailySales.py script somewhere on your computer, likely in the same folder you want your stats placed. Then simply invoke it with –help to get a list of arguments.
python appdailysales.py --help
I run it from a batch file or script. My old Batch File Version looks like this:
python appdailysales.py -a firstname.lastname@example.org -p mypassword -f %%Y/%%Y-%%m/Daily-%%Y-%%m-%%d.txt -u -d 14 -v -n
The new, shockingly similar shell script version (i.e. only single %’s) is this:
python appdailysales.py -a email@example.com -p mypassword -f %Y/%Y-%m/Daily-%Y-%m-%d.txt -u -d 14 -v -n
This creates files like so:
Nice and easy to read names, unlike the default files generated by iTunes Connect.
In the next section, I’ll talk more about setting it up as a service. In other words, totally automated!