An open API service indexing awesome lists of open source software.

https://github.com/tinybird/Wendy

Simple Appstore sales report bot
https://github.com/tinybird/Wendy

Last synced: 10 days ago
JSON representation

Simple Appstore sales report bot

Awesome Lists containing this project

README

        

Wendy the sales bot
===================

NOTE: This is not currently usable off the shelf. It currently requires an external tool to download the reports, which is not included here.

Introduction
------------

This is a simple bot originally based on the iTunesConnectArchiver script from rouge amoeba, found at:

http://www.rogueamoeba.com/utm/2009/05/04/itunesconnectarchiver/

It has since departed quite a bit from that, and doesn't use the HTML scraping code at all.

Setting up site wide settings
-----------------------------

$ mkdir -p ~/.wendy
$ cat > ~/.wendy/site_config.rb << EOF
ActionMailer::Base.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => "yourdomain.com",
:authentication => :plain,
:user_name => "[email protected]",
:password => "yourpassword"
}

# Mandatory sender email address.
Settings.sender = '[email protected]'

# Optional, amount of seconds to sleep between polling attemps. Default is 2 hours.
# Settings.sleep_duration = 2*60*60

# List of addresses to send reports to.
# Settings.report_email_addresses = [ '[email protected]' ]

# Optional list of addresses to notify if the bot dies.
# Settings.admin_email_addresses = [ '[email protected]' ]

# Mandatory iTunes connect account information.
Settings.itc_username = 'me'
Settings.itc_password = 'myPassword'
Settings.itc_vendorid = 'myVendorID'
EOF

Mapping Product ID to names
---------------------------

To get nicer reports, the Product ID of each app can optionally be mapped to a more friendly name. This is done by placing a JSON dict in ~/.wendy/pidMap.json. Example:

{
'100' : 'My app',
'101' : 'My other app'
}

Report groups
-------------

In case you want to divide groups of apps and send reports to different addresses:

Settings.report_groups = [
{
'name' => 'My App',
'pids' => [ 'pid1', 'pid2', 'pid3' ],
'emailAddresses' => [ 'myemail1', 'myemail2' ]
}
]

Starting the daemon
-------------------

$ ./wendy.rb

Maintenance
-----------

In case something goes wrong with the database due to changed iTunes Connect report format, you can open the database file using sqlite3 and remove days. An example:

sqlite3 sales.sqlite
delete from sales where sales.date == "2011-01-06";
.quit