Google Play 内购应用收益明细导出工具gsutil tool使用方法

一、简介

gsutil is a Python application that lets you access Cloud Storage from the command line. You can use gsutil to do a wide range of bucket and object management tasks, including:

  • Creating and deleting buckets.
  • Uploading, downloading, and deleting objects.
  • Listing buckets and objects.
  • Moving, copying, and renaming objects.
  • Editing object and bucket ACLs.

gsutil performs all operations, including uploads and downloads, using HTTPS and transport-layer security (TLS).

二、实战

  1. Open a terminal window.
  2. 执行命令安装 Google Cloud SDK:

curl https://sdk.cloud.google.com | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   443  100   443    0     0    395      0  0:00:01  0:00:01 --:--:--   395
Downloading Google Cloud SDK install script: https://dl.google.com/dl/cloudsdk/channels/rapid/install_google_cloud_sdk.bash
######################################################################## 100.0%
Running install script from: /var/folders/yq/gzptf7bj5zv09crl9rtq2hsm0000gn/T/tmp.XXXXXXXXXX.uLN3qRZA/install_google_cloud_sdk.bash
which curl
curl -# -f https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz
######################################################################## 100.0%

3.  exec -l $SHELL
4. gcloud init
Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.

Checking network connection...done.
Reachability Check passed.
Network diagnostic passed (1/1 checks passed).

You must log in to continue. Would you like to log in (Y/n)? 此时选择Y

Your browser has been opened to visit:

    https://accounts.google.com/o/oauth2/auth?code_challenge=r43_m7lU1Y3z0qA4TjPIsQzOWdAbVSD7pgJNUFCco9I&prompt=select_account&code_challenge_method=S256&access_type=offline&redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&response_type=code&client_id=32555940559.apps.googleusercontent.com&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth

此时,如果本地有浏览器会直接打开浏览器,并弹出如下页面:

点击,"Allow"之后,

    如果会进入到一个页面,并有一串码可以提供复制,复制之粘贴到刚执行终端的提示即可,完成登录。

    如果本地有浏览器,那么无需复制粘贴就可以完成自动登录了。登录终端如下图:

You are logged in as: [****@gmail.com].

Pick cloud project to use:
 [1] ****-f90b1
 [2] sunny-sunbeam-293008
 [3] wide-gamma-294510
 [4] Create a new project
Please enter numeric choice or text value (must exactly match list
item):  1

Your current project has been set to: [****-f90b1].

5. 下一步就可以执行查询了,具体例子:

gsutil cp -r gs://pubsite_prod_************/sales/salesreport_202010* /root/google

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

FeelTouch Labs

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值