Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge git://github.com/jasonbaker/nanny

  • Loading branch information...
commit 0e28d317b392acfc443feb82a2a31a6eecbae44f 2 parents ef2d21d + 5134538
@nathanmarz nathanmarz authored
View
14 README
@@ -29,8 +29,13 @@ That should be enough for you to get started. Type "nanny help" to see all the c
INSTALLATION:
1. Install Python if you don't already have it
-2. Install paramiko (http://www.lag.net/paramiko/). Easiest way is to "easy_install paramiko".
-3. Put the nanny source code somewhere and fill in _config/nannyconstants.py with the following:
+2. From within the source code directory do the following:
+
+ python setup.py install
+
+3. Create a .nanny config file in your home directory that looks something like this:
+
+[nanny]
REPOSITORY_HOST = {HOST WITH THE REPOSITORY}
REPOSITORY_USER = {USERNAME TO LOG IN AS}
REPOSITORY_PATH = {PATH TO THE REPOSITORY ON THE HOST}
@@ -38,11 +43,6 @@ REPOSITORY_PATH = {PATH TO THE REPOSITORY ON THE HOST}
You need to make sure you can ssh to that machine as that user without typing any passwords (check out public/private keys to accomplish this)
4. Make the REPOSITORY_PATH on REPOSITORY_HOST and make sure REPOSITORY_USER has permissions to read/write from it
-5. You'll want to create a small shell script in your path so that you can execute nanny globally. It should look something like this (the "$@" requotes arguments so args like "my push message" don't get split up into multiple arguments):
-
-#!/bin/sh
-
-python /Users/marz/opensource/nanny/nanny.py "$@"
------------------------------
GUIDE
View
1  _config/__init__.py
@@ -1 +0,0 @@
-
View
3  _config/nannyconstants.py
@@ -1,3 +0,0 @@
-REPOSITORY_HOST = "fill.me.in"
-REPOSITORY_USER = "FILLMEIN"
-REPOSITORY_PATH = "/FILL/ME/IN"
View
14 nanny.py
@@ -28,7 +28,19 @@
from optparse import OptionParser
-from _config.nannyconstants import *
+try:
+ from _config.nannyconstants import *
+except ImportError:
+ from ConfigParser import SafeConfigParser
+ from os.path import expanduser, exists
+
+ nanny_file = expanduser('~/.nanny')
+ if not exists(nanny_file):
+ raise OSError, "File does not exist %s" % nanny_file
+
+ parser = SafeConfigParser()
+ parser.read(expanduser('~/.nanny'))
+
import sys
import os
import subprocess
Please sign in to comment.
Something went wrong with that request. Please try again.