Giter Site home page Giter Site logo

gfreespace'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 "Calendar 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 or specify location in config file.
  • Then, the first time you run it your browswer window will opena google authorization request page. Approve authorization and then the credentials will work as expected.

CONFIGURATION

Example configuration:

domain: example.com
resource: Conference Room

Save configuration file to ~/.gfreespace

USAGE

$ gfreespace -v -n brno -max 10
>> Room brno1-03-cyan-room-6-p isn't booked
>> Room brno1-00-apple-room-8 isn't booked
>> Room brno1-02-blue-room-6 is booked by [email protected]
>> Room brno1-02-yellow-room-6-p is booked by [email protected]
>> Room brno1-04-autumn-meeting-room-8 isn't booked

gfreespace's People

Contributors

maybelinot avatar

Watchers

 avatar  avatar

gfreespace'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.