gpup - Google Photosへ写真/動画をアップロード
Google Photosを使っている人は多いでしょう。多くの場合はスマートフォンの写真を自動的にアップロードしていると思いますが、すでに手元にたくさんの写真データが存在する人もいるはずです。Webブラウザでアップロードもできますが、とても面倒です。 そこで使ってみたいのがgpupです。ターミナルから利用できるGoogle Photosアップローダーです。
gpupの使い方
アップロードは写真または動画のパスを指定するだけです。
$ gpup /path/to/devrelcon-tokyo-2018.jpg
2019/01/14 16:34:48 The following 1 items will be uploaded:
#1: /path/to/devrelcon-tokyo-2018.jpg
2019/01/14 16:34:48 Queued 1 item(s)
2019/01/14 16:34:48 Uploading devrelcon-tokyo-2018.jpg (1326 kB)
2019/01/14 16:34:51 Adding 1 item(s)
#1: /path/to/devrelcon-tokyo-2018.jpg: OK
アップロードされました。
ヘルプです。
$ gpup --help
2019/01/14 16:35:11 Usage:
gpup [OPTIONS] <file | DIRECTORY | URL>...
Version 1.6
Application Options:
-a, --album=TITLE Add files to the album or a new album if it does not exist
-n, --new-album=TITLE Add files to a new album
--request-header=KEY:VALUE Add the header on fetching URLs
--request-auth=USER:PASS Add the basic auth header on fetching URLs
--gpupconfig= Path to the config file (default: ~/.gpupconfig) [$GPUPCONFIG]
--debug Enable request and response logging [$DEBUG]
Options read from gpupconfig:
--google-client-id= Google API client ID [$GOOGLE_CLIENT_ID]
--google-client-secret= Google API client secret [$GOOGLE_CLIENT_SECRET]
--google-token= Google API token [$GOOGLE_TOKEN]
Help Options:
-h, --help Show this help message
gpupは細かく条件を指定することもできますが、基本的には写真や動画の入ったディレクトリを指定するだけで自動的にアップロードを行ってくれます。Google Photosへ写真管理を移行したい、撮りためた写真を一気にアップロードしたいときに便利そうです。
gpupはGo製のオープンソース・ソフトウェア(Apache Licnese 2.0)です。