Git Product home page Git Product logo

gver's Introduction

INSTALLATION

Example install, using VirtualEnv:

# install/use python virtual environment
virtualenv ~/virtenv_scratch --no-site-packages

# activate the virtual environment
source ~/virtenv_scratch/bin/activate

# upgrade pip in the new virtenv
pip install -U pip setuptools

# install this package in DEVELOPMENT mode
python setup.py develop

# or simply install
# python setup.py install

ACCESS CREDENTIALS

To allow a script to use Google Drive API we need to authenticate our self towards Google. To do so, we need to create a project, describing the tool and generate credentials. Please use your web browser and go to Google console and :

  • Click on the button "Create Project".
  • A dialog box appears, so give your project a name and an ID and click on "Create" button.
  • In section "Boost your app with a Google API" click on "Enable an API" button.
  • A table of available APIs is shown. Switch "Drive API" to "ON" state. Other APIs might be switched off, for our purpose.
  • On the left-side menu click on "APIS & auth" -> "Credentials".
  • In section "OAuth" click on "Create new client ID" button
  • A dialog box appears. Select "Installed application" item and click on "Configure consent screen".
  • From drop-down box select your email address and give your product a name. Then click on "Save" button.
  • A dialog box "Create Cliend ID" appears. Select "Installed application" item as "APPLICATION TYPE" and "Other" item as "INSTALLED APPLICATION TYPE".
  • Click on "Create Client ID" button.
  • Click on "Download JSON" button and store the downloaded file on your file system. Please be aware, the file contains your private credentials, so take care of the file in the same way you care of your private SSH key; i.e. move downloaded JSON file to ~/.gdrive_private.
  • Then, the first time you run it your browswer window will open a google authorization request page. Approve authorization and then the credentials will work as expected.

USAGE

$ gver --help
usage: gver [-h] [-v] [-d]
            FILE
            {status,launch,sync,remove,upload,init,call,download,checkout} ...

Control version of Google files

positional arguments:
  FILE                  Full path to file or file id
  {status,launch,sync,remove,upload,init,call,download,checkout}
                        Actions
    checkout            Swith to another version or create one
    init                Create new File and linked it with local DataBase
    sync                Connect gFile with local DataBase
    status              Show the working file status
    call                Set up label to file ID
    download            Download file in particular format
    remove              Remove particular version
    upload              Upload file in particular format
    launch              Launch file in browser

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         turn verbose logging ON
  -d, --debug           turn debug logging ON

gver's People

Contributors

maybelinot avatar

Watchers

 avatar

gver's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.