#!/usr/bin/env python
"""
Name:

    playdeliver - Upload screenshots, metadata of your app to the Play Store

Usage:
    playdeliver [options] upload <package> <output_dir>
    playdeliver [options] init <package> <output_dir>
    playdeliver (-h | --help)
    playdeliver --version

Description:

    Upload screenshots, metadata of your app to the Play Store using a
    single command

    deliver can upload app screenshots to google play backend.

    Google login credentials can be passed in different ways. If the credentials
    json file is not passed via 
    `--credentials, --service-email and --service-key`, 
    playdeliver will try to find the filepath either in a environment variable 
    called `PLAY_DELIVER_CREDENTIALS` or in the user folder: 
    `~/.playdeliver/credentials.json`.

Options:

  -h --help
    Show this screen.

  --version
    Show version.

  --service-email=<e>
    Account service email. Use this option together with `--key` to pass a 
    corresponding keyfile for user.

  --key=<k>
    Path to *.p12 keyfile for user specified with `service-email`

  --credentials=<c>
    Path to credentials json file. This file is a alternative solution to log
    into play. Download the file from play service administration page.

  -i --images
    Upload/download images default is all

  -l --listings
    Upload/download listing

  -p --inapp
    Upload/download inapp products
"""

from docopt import docopt
from playdeliver import playdeliver
import playdeliver as deliver

if __name__ == '__main__':
    arguments = docopt(__doc__, version=deliver.__version__)
    playdeliver.execute(arguments)
