Coder Social home page Coder Social logo

gitdriver's Introduction

Synopsis

gitdriver.py [-h] [--config CONFIG] [--text] [--html] docid

Options

  • --config CONFIG, -f CONFIG -- path to configuration file
  • --text, -T -- fetch plain text content (Look out for BOM)
  • --html, -H -- fetch HTML content
  • --mime-type -- specify arbitrary mime type

Example usage:

$ python gitdriver.py 1j6Ygv0_this_is_a_fake_document_id_a8Q66mvt4
Create repository "Untitled"
Initialized empty Git repository in /home/lars/projects/gitdriver/Untitled/.git/
[master (root-commit) 27baec9] revision from 2013-01-08T21:57:38.837Z
 1 file changed, 1 insertion(+)
 create mode 100644 content
[master 132175a] revision from 2013-01-08T21:57:45.800Z
 1 file changed, 1 insertion(+), 1 deletion(-)
[master eb2302c] revision from 2013-01-09T01:47:29.593Z
 1 file changed, 5 insertions(+), 1 deletion(-)
$ ls Untiled
content
$ cd Untitled
$ git log --oneline
d41ad6e revision from 2013-01-09T01:47:29.593Z
8d3e3ec revision from 2013-01-08T21:57:45.800Z
ccc0bdd revision from 2013-01-08T21:57:38.837Z

Google setup

You will need to create an OAuth client id and secret for use with this application, the Drive API Python quickstart has links to the necessary steps.

Configuration

In order to make this go you will need to create file named gd.conf where the code can find it (typically the directory in which you're running the code, but you can also use the -f command line option to specify an alternate location).

The file is a simple YAML document that should look like this:

googledrive:
  client id: YOUR_CLIENT_ID
  client secret: YOUR_CLIENT_SECRET

Where YOUR_CLIENT_ID and YOUR_CLIENT_SECRET are replaced with the appropriate values from Google that you established in the previous step.

gitdriver's People

Contributors

dlazesz avatar gausie avatar larsks avatar martinomensio avatar mircea avatar mirelon avatar timwis avatar

Watchers

 avatar

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.