text
stringlengths
1
93.6k
if submitted:
add_row_to_gsheet(
gsheet_connector,
[[author, bug_type, comment, str(date), bug_severity]],
)
st.success("Thanks! Your bug was recorded.")
st.balloons()
expander = st.expander("See all records")
with expander:
st.write(f"Open original [Google Sheet]({GSHEET_URL})")
st.dataframe(get_data(gsheet_connector))
# <FILESEP>
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Reporting tool for querying Sales- and Financial Reports from App Store Connect
#
# This script mimics the official App Store Connect Reporter by Apple which is used
# to automatically retrieve Sales- and Financial Reports for your App Store sales.
# It is written in pure Python and doesn’t need a Java runtime installation.
# Opposed to Apple’s tool, it can fetch App Store Connect login credentials from the
# macOS Keychain in order to tighten security a bit. Also, it goes the extra mile
# and unzips the downloaded reports if possible.
#
# Before Apple in 2018 decided to rebrand it, App Store Connect used to be called
# iTunes Connect or iTC in short – hence the name of this script.
#
# Copyright (c) 2016 fedoco <fedoco@users.noreply.github.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import sys, argparse, urllib.request, urllib.parse, urllib.error, json, gzip, re, datetime, io
if sys.platform == 'darwin':
import keychain
VERSION = '2.2'
ENDPOINT_SALES = 'https://reportingitc-reporter.apple.com/reportservice/sales/v1'
ENDPOINT_FINANCE = 'https://reportingitc-reporter.apple.com/reportservice/finance/v1'
# App Store Connect (formerly named iTC) queries
def itc_get_vendors(args):
command = 'Sales.getVendors'
output_result(post_request(ENDPOINT_SALES, get_credentials(args), command))
def itc_get_status(args):
command = args.service + '.getStatus'
endpoint = ENDPOINT_SALES if args.service == 'Sales' else ENDPOINT_FINANCE
output_result(post_request(endpoint, get_credentials(args), command))
def itc_get_accounts(args):
command = args.service + '.getAccounts'
endpoint = ENDPOINT_SALES if args.service == 'Sales' else ENDPOINT_FINANCE
output_result(post_request(endpoint, get_credentials(args), command))
def itc_get_vendor_and_regions(args):
command = 'Finance.getVendorsAndRegions'
output_result(post_request(ENDPOINT_FINANCE, get_credentials(args), command))
def itc_get_report_version(args):
# service is limited to Sales for now because although documented it doesn't work for Finance
command = 'Sales.getReportVersion, {0},{1}'.format(args.reporttype, args.reportsubtype)
output_result(post_request(ENDPOINT_SALES, get_credentials(args), command))
def itc_get_financial_report(args):
command = 'Finance.getReport, {0},{1},Financial,{2},{3}'.format(args.vendor, args.regioncode, args.fiscalyear, args.fiscalperiod)
output_result(post_request(ENDPOINT_FINANCE, get_credentials(args), command))
def itc_get_sales_report(args):
command = 'Sales.getReport, {0},Sales,Summary,{1},{2}'.format(args.vendor, args.datetype, args.date)
output_result(post_request(ENDPOINT_SALES, get_credentials(args), command))
def itc_get_subscription_report(args):
command = 'Sales.getReport, {0},Subscription,Summary,Daily,{1},{2}'.format(args.vendor, args.date, args.version)
output_result(post_request(ENDPOINT_SALES, get_credentials(args), command))
def itc_get_subscription_event_report(args):
command = 'Sales.getReport, {0},SubscriptionEvent,Summary,Daily,{1},{2}'.format(args.vendor, args.date, args.version)
output_result(post_request(ENDPOINT_SALES, get_credentials(args), command))
def itc_get_subscriber_report(args):