Skip to content

Commit

Permalink
Add new product types.
Browse files Browse the repository at this point in the history
Add support for new report fields. They aren’t yet used but they won’t crash.
Update version and copyright.
  • Loading branch information
Iain McManus authored and Iain McManus committed Oct 31, 2015
1 parent d30cfd4 commit cd8ea4b
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 41 deletions.
4 changes: 2 additions & 2 deletions HarvestReports/Common.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python

# Harvest Reports v0.1.3
# Copyright (c) 2014 Iain McManus. All rights reserved.
# Harvest Reports v0.1.5
# Copyright (c) 2014-2015 Iain McManus. All rights reserved.
#
# Harvest Reports is a wrapper around Apple's AutoIngestion Java Class.
# Harvest Reports can download all of the recent daily data and will produce
Expand Down
16 changes: 8 additions & 8 deletions HarvestReports/SKUData.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python

# Harvest Reports v0.1.4
# Copyright (c) 2014 Iain McManus. All rights reserved.
# Harvest Reports v0.1.5
# Copyright (c) 2014-2015 Iain McManus. All rights reserved.
#
# Harvest Reports is a wrapper around Apple's AutoIngestion Java Class.
# Harvest Reports can download all of the recent daily data and will produce
Expand Down Expand Up @@ -488,8 +488,8 @@ def autolabel(rects):

fileName = os.path.join(basePath, self.SKU + "_AllInstallsAndUpdates.png")
plt.savefig(fileName,bbox_inches='tight',dpi=100)
plt.clf()
plt.cla()

plt.close('all')

self.Graphs.update({"AllInstallsAndUpdates":fileName})

Expand Down Expand Up @@ -526,8 +526,8 @@ def autolabel(rects):

fileName = os.path.join(basePath, self.SKU + "_Proceeds_{code}.png".format(code=currencyCode))
plt.savefig(fileName,bbox_inches='tight',dpi=100)
plt.clf()
plt.cla()

plt.close('all')

self.Graphs.update({"Proceeds_{code}".format(code=currencyCode):fileName})

Expand All @@ -546,8 +546,8 @@ def generateAndSaveCountryInstallsChart(self, fileName, title, countries, instal
plt.title(title)

plt.savefig(fileName, bbox_inches='tight', dpi=100)
plt.clf()
plt.cla()

plt.close('all')

def saveCountryDistributionGraphs(self, basePath):
reportList = dict();
Expand Down
49 changes: 26 additions & 23 deletions HarvestReports/SalesReportFile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python

# Harvest Reports v0.1.4
# Copyright (c) 2014 Iain McManus. All rights reserved.
# Harvest Reports v0.1.5
# Copyright (c) 2014-2015 Iain McManus. All rights reserved.
#
# Harvest Reports is a wrapper around Apple's AutoIngestion Java Class.
# Harvest Reports can download all of the recent daily data and will produce
Expand Down Expand Up @@ -36,27 +36,30 @@

class SalesReportFile:
fields = [
["Provider"],
["Provider Country"],
["SKU"],
["Developer"],
["Title"],
["Version"],
["Product Type Identifier"],
["Units"],
["Developer Proceeds (per item)"],
["Begin Date"],
["End Date"],
["Customer Currency"],
["Country Code"],
["Currency of Proceeds"],
["Apple Identifier"],
["Customer Price"],
["Promo Code"],
["Parent Identifier"],
["Subscription"],
["Period"],
["Category"]
["Provider"], # 0
["Provider Country"], # 1
["SKU"], # 2
["Developer"], # 3
["Title"], # 4
["Version"], # 5
["Product Type Identifier"], # 6
["Units"], # 7
["Developer Proceeds (per item)"], # 8
["Begin Date"], # 9
["End Date"], #10
["Customer Currency"], #11
["Country Code"], #12
["Currency of Proceeds"], #13
["Apple Identifier"], #14
["Customer Price"], #15
["Promo Code"], #16
["Parent Identifier"], #17
["Subscription"], #18
["Period"], #19
["Category"], #20
["CMB"], #21
["Device"], #22
["Supported Platforms"] #23
]

def __init__(self, reportFile, isNewFile, fieldRemapper):
Expand Down
17 changes: 13 additions & 4 deletions HarvestReports/fields_productTypes.csv
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
1,Free or paid app (iOS)
7,Update (iOS)
IA1,In-App Purchase (iOS)
IA9,In-App Purchase (iOS)
IAY,In-App Purchase (iOS)
IAC,In-App Purchase (iOS)
IA1-M,In-App Purchase (OSX)
IA9,In-App Purchase Subscription (iOS)
IA9-M,In-App Purchase Subscription (OSX)
IAY,In-App Purchase Auto-renewable Subscription (iOS)
IAY-M,In-App Purchase Auto-renewable Subscription (OSX)
IAC,In-App Purchase Free Subscription (iOS)
IAC-M,In-App Purchase Free Subscription (OSX)
1F,Free or paid app (iOS - Universal)
7F,Update (iOS - Universal)
1T,Free or paid app (iOS - iPad)
Expand All @@ -13,4 +17,9 @@ F7,Update (OSX)
FI1,In-App Purchase (OSX)
1E,Paid app (iOS - Custom iPhone and iPod Touch)
1EP,Paid app (iOS - Custom iPad)
1EU,Paid app (iOS - Custom Universal)
1EU,Paid app (iOS - Custom Universal)
1-B,App Bundle
3,Redownload (iOS)
3F,Redownload (iOS - Universal)
3T,Redownload (iOS - iPad)
F3,Redownload (OSX)
8 changes: 4 additions & 4 deletions HarvestReports/harvestReports.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python

# Harvest Reports v0.1.4
# Copyright (c) 2014 Iain McManus. All rights reserved.
# Harvest Reports v0.1.5
# Copyright (c) 2014-2015 Iain McManus. All rights reserved.
#
# Harvest Reports is a wrapper around Apple's AutoIngestion Java Class.
# Harvest Reports can download all of the recent daily data and will produce
Expand Down Expand Up @@ -468,10 +468,10 @@ def usage():
print " -c List of country codes to download the rating and review data for"

def main(argv):
print "Harvest Reports v0.1.4"
print "Harvest Reports v0.1.5"
print "Written by Iain McManus"
print ""
print "Copyright (c) 2014 Iain McManus. All rights reserved"
print "Copyright (c) 2014-2015 Iain McManus. All rights reserved"
print ""

propertiesFile = ""
Expand Down

0 comments on commit cd8ea4b

Please sign in to comment.