changeset 8:f7fa35f972f4

more stubbing
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 01 Aug 2011 22:56:25 -0700
parents 6bf82220a04c
children 62bd66061329
files document_it.py example.manifest
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/document_it.py	Mon Aug 01 22:51:12 2011 -0700
+++ b/document_it.py	Mon Aug 01 22:56:25 2011 -0700
@@ -111,11 +111,18 @@
     if options.list:
         for item in files:
             print '%s -> %s/%s' % (item[0], baseurl.rstrip('/'), item[1].lstrip('/'))
-    
 
     # render and upload READMEs
     if options.directory:
-        pass
+
+        # create a directory if needed
+        if os.path.exists(options.directory):
+            assert os.path.isdir(options.directory), "'%s' - not a directory" % options.directory
+        else:
+            os.makedirs(options.directory)
+
+        # TODO render to directory
+        
     else:
         # TODO check credentials
         raise NotImplementedError
--- a/example.manifest	Mon Aug 01 22:51:12 2011 -0700
+++ b/example.manifest	Mon Aug 01 22:56:25 2011 -0700
@@ -1,3 +1,3 @@
 #!/usr/bin/env document-it
 
-README.txt
\ No newline at end of file
+README.txt DocumentIt
\ No newline at end of file