# HG changeset patch # User Jeff Hammel # Date 1312328800 25200 # Node ID d9026d1146550bb167fea8d5c0b3237164a1eb8b # Parent 145a11393a7337750621ecbaa8dcbf23bc4d73ac deal with eccentricities of local directories diff -r 145a11393a73 -r d9026d114655 document_it.py --- a/document_it.py Tue Aug 02 16:40:10 2011 -0700 +++ b/document_it.py Tue Aug 02 16:46:40 2011 -0700 @@ -95,7 +95,7 @@ parser = optparse.OptionParser(usage=usage, description=__doc__, formatter=PlainDescriptionFormatter()) parser.add_option('-d', '--directory', dest='directory', help='render the documentation from this directory') - parser.add_option('--dest', dest='dest', + parser.add_option('-o', '--dest', dest='dest', default=default_dir, help='base directory or URL of destination [DEFAULT: %default]') parser.add_option('-u', '--user', dest='user', @@ -117,7 +117,7 @@ if '://' in options.dest: baseurl = options.dest else: - baseurl = 'file://' + options.dest + baseurl = 'file://' + os.path.abspath(options.dest) # read the manifests files = [] @@ -142,7 +142,9 @@ # TODO render to directory for src, dest in files: - dest = os.path.join(options.dest, dest) + + if dest.startswith('file://'): + dest = dest[len('file://'):] # create a directory if needed dirname = os.path.dirname(dest)