summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrey Hunner <treyhunner@gmail.com>2012-01-16 07:34:29 -0800
committerTrey Hunner <treyhunner@gmail.com>2012-01-16 07:34:29 -0800
commit2cf13396a48a92d204fb96bc022719920833e53c (patch)
treec66e3f42e3aaa896b7e2caafe205463d6770ca08
parentc9827258f76421a33c3a23619f45170b78eabeaf (diff)
parent1c9f03ee271c5bf463eeea8d73efb58df75c4c6b (diff)
downloadpycco-2cf13396a48a92d204fb96bc022719920833e53c.tar.gz
Merge remote-tracking branch 'laginha/master' into topic/jump-to
-rw-r--r--pycco/main.py5
-rw-r--r--pycco/utils.py1
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 )