• This repository has been archived on 25/Jan/2019
  • Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    Python
  • Created almost 12 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Create a git repository from the revision history of a document in Google Drive.

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.

More Repositories

1

dockerize

A tool for creating minimal docker images from dynamic ELF binaries.
Python
345
star
2

undocker

Python
296
star
3

ansible-toolbox

Python
189
star
4

gpio-watch

C
89
star
5

py-mpu6050

Micropython code for interacting with an MPU6050 6DOF IMU
Python
80
star
6

virt-utils

Shell
76
star
7

git-remote-ipfs

Python
62
star
8

python-netns

Python
51
star
9

dot-iptables

Python
48
star
10

lvcache

Python
46
star
11

heat-kubernetes

Shell
44
star
12

ldap2json

Convert HTTP GET requests into LDAP queries and return JSON results.
Python
43
star
13

fakeprovide

A tool for generating "fake" rpm packages to resolve otherwise intractable dependency issues.
Shell
37
star
14

neutron-diag

36
star
15

docker-image-logitech-media-server

Shell
33
star
16

initscripts-macvlan

Shell
31
star
17

workinghours

A terrible utility for doing awful things to your repository history
Python
29
star
18

dnsthing

Python
26
star
19

kiwi

Python
24
star
20

openstack-api-samples

Python
20
star
21

novaconsole

Python
20
star
22

envoy-tools

Tools for interacting with the Enphase Envoy.
Python
17
star
23

micropython-noggin

Python
17
star
24

python-ftn

Another stab at creating a suite of Fidonet utilities in python.
Python
17
star
25

systemd-usb-gadget

Shell
16
star
26

restic-systemd-units

Makefile
16
star
27

windows-openstack-image

Shell
15
star
28

ansible-assertive

Python
14
star
29

check_ganglia

Nagios plugin for checking values in gmond
Python
14
star
30

python-actiontec

Utilities for interacting with the Actiontec MI424WR router used by Verizon FIOS.
Python
14
star
31

akmod-sign-modules

Shell
13
star
32

crashmail

CrashMail II is a Fidonet Tosser/Scanner/Areafix manager for Linux
C
13
star
33

arduino-gpib

Arduino
13
star
34

docker-image-thttpd

HTML
10
star
35

ansible-sql-query

Python
9
star
36

pubsub_example

Python
9
star
37

rdo-hangout-multinode-packstack-ansible

9
star
38

python-signalfd

signalfd() wrapper for Python
Python
8
star
39

docker-image-esp-open-sdk

Dockerfile
8
star
40

dotstack

Python
8
star
41

OpenLDAP-Metadirectory-Example

Sample configurations to accompany my blog post on the OpenLDAP meta backend.
8
star
42

azure-tools

Shell
7
star
43

svnbiosis

A gitosis-like wrapper for serving Subversion repositories
Python
7
star
44

configdict

Replacement for brain dead, un-pythonic, and frequently wrong ConfigParser
Python
7
star
45

rdo-hangout-heat-intro

Shell
7
star
46

so-example-jimmyc

Python
7
star
47

git-tools

Shell
7
star
48

gmail-contact-filters

Tools for creating Gmail filters out of your Google Contact groups.
Python
7
star
49

reaper

C
6
star
50

micropython-stepper-motor

Python
6
star
51

gmailfilters

Python
6
star
52

mutt-utils

Utilities for interacting with Mutt
Python
6
star
53

actiontec-utils

Python
6
star
54

gruf

Python
5
star
55

snarl

Python
5
star
56

osp-5-6-ansible

Shell
5
star
57

tm-v71-tools

Python
5
star
58

google-docs-backup

Tools for backing up files to google docs
Python
5
star
59

github-tools

Python
5
star
60

rdo-hangout-multinode-packstack-slides

JavaScript
5
star
61

crux

A utility for creating Keystone objects.
Python
4
star
62

py-st7565

Python
4
star
63

drifter

Yet another cloud provisioning tool trying to impersonate Vagrant.
Python
4
star
64

json-tools

Python
4
star
65

kindle-weather

Python
4
star
66

ganglia-plugin-varnish

A python module for gmond that gathers Varnish statistics.
Python
4
star
67

demo_nova_hooks

Python
4
star
68

osctl

Shell
4
star
69

stackoverflow-example-45659201

Python
4
star
70

python-siggen

Python
3
star
71

docker-tools

Shell
3
star
72

rhel-osp-upgrade-docs

Shell
3
star
73

pipower

Turn an Adafruit Powerboost 1000c into a Raspberry Pi UPS
C
3
star
74

ganglia_iptables

Ganglia plugin for producing iptables accounting metrics
Python
3
star
75

heat-docker-example

3
star
76

mdcam

Python
3
star
77

unix-example-735931-1-1-nat

Python
3
star
78

oschecks

Health checks for openstack
Python
3
star
79

pacemaker-tools

Python
3
star
80

gitblogger

Post to Blogger blogs from a Git repository
Python
3
star
81

mailman-subscribers

Python
3
star
82

imlike

IM-client like behavior for Irssi using growl (os x) or libnotify (linux).
Perl
3
star
83

kubernetes-yaml-examples

Python
3
star
84

afew_filters

Python
3
star
85

ax25-systemd

Makefile
2
star
86

evtbroker

A simple ZeroMQ based event notificatino system. Thing. That does stuff.
Python
2
star
87

check-ssh-key

Nagios/Icinga plugin for checking ssh host keys.
C
2
star
88

docker-image-libvirt

Shell
2
star
89

ansible-kubernetes-nodes

2
star
90

git-snippets

Shell
2
star
91

dismemberd

Maintain cluster membership lists using the Corosync API.
C
2
star
92

icinga-mobile-status

Simple status CGI for Icinga/Nagios.
2
star
93

fidonet

2
star
94

gcron

Execute commands defined in Google Calendar (or other iCal source)
Python
2
star
95

os-placement-tools

Tools for interacting with the OpenStack Placement API
Python
2
star
96

dell-servers

Makefile
2
star
97

blog.oddbit.com-posts

Content for blog.oddbit.com
Makefile
2
star
98

quorum-authorizer

A tool to enable quorum authorization of privileged tasks.
Python
2
star
99

docker-maintenance-units

Makefile
2
star
100

ovn-sandbox

Python
2
star