diff options
-rw-r--r-- | pycco/main.py | 5 | ||||
-rw-r--r-- | pycco/utils.py | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/pycco/main.py b/pycco/main.py index 63fab8c..ccb328e 100644 --- a/pycco/main.py +++ b/pycco/main.py @@ -477,7 +477,7 @@ def main(): help='Preserve path structure of original files') parser.add_option('-d', '--directory', action='store', type='string', - dest='outdir', default='docs', + dest='outdir', default='.', help='The output directory that the rendered files should go to.') parser.add_option('-w', '--watch', action='store_true', @@ -497,7 +497,8 @@ def main(): if start.endswith( '*' ): return - start = os.path.dirname( os.path.dirname( start ) ) + start = os.path.dirname( os.path.dirname( os.path.abspath(start) ) ) + #start = os.path.dirname( os.path.dirname( start ) ) if opts.all: sources = [ i for i in get_all_files( filepath or '.', filetype ) ] diff --git a/pycco/utils.py b/pycco/utils.py index 2f0aed8..d110109 100644 --- a/pycco/utils.py +++ b/pycco/utils.py @@ -32,6 +32,7 @@ class Source: self.title = path.basename( self.name ) self.dirpath = path.dirname( self.name ) or '.' self.dirname = path.relpath(self.dirpath, start) + self.start = start def save_path(self): return "docs/%s/%s" %( self.dirname, self.title ) |