summaryrefslogtreecommitdiff
path: root/pycco/main.py
diff options
context:
space:
mode:
authorTrey Hunner <treyhunner@gmail.com>2012-04-15 11:40:59 -0700
committerTrey Hunner <treyhunner@gmail.com>2012-04-15 11:40:59 -0700
commitf11250168f24b6fb06c5f547a8f71dcabfc07cf6 (patch)
tree9ed81784b3b57d7d3fc914a274861a30fcc59356 /pycco/main.py
parent3daf6c368cb0807756309904098812ab1688d71a (diff)
downloadpycco-topic/jump-to.tar.gz
Fix style (PEP8 mostly)topic/jump-to
Diffstat (limited to 'pycco/main.py')
-rw-r--r--pycco/main.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/pycco/main.py b/pycco/main.py
index c6d9054..7e2053b 100644
--- a/pycco/main.py
+++ b/pycco/main.py
@@ -35,7 +35,6 @@ import sys, os
sys.path.append( os.path.dirname( os.path.dirname( os.path.abspath( __file__ ) ) ) )
-
# === Main Documentation Generation Functions ===
def generate_documentation(source, outdir=None, preserve_paths=True):
@@ -399,7 +398,7 @@ def process(sources, preserve_paths=True, outdir=None):
css = open(path.join(outdir, "pycco.css"), "w")
css.write(pycco_styles)
css.close()
-
+
for s in sources:
dest = destination(s.save_path(), preserve_paths=preserve_paths, outdir=outdir)
@@ -460,7 +459,7 @@ def monitor(sources, opts):
observer.join()
-from utils import *
+from utils import get_all_files, Source
SOURCES=[]
def main():
@@ -476,26 +475,26 @@ def main():
parser.add_option('-w', '--watch', action='store_true',
help='Watch original files and re-generate documentation on changes')
-
+
parser.add_option('-a', '--all', action='store_true',
help='Get all files from subfolders')
-
+
opts, sources = parser.parse_args()
-
+
if not sources:
return
-
+
filepath = os.path.dirname(sources[0])
start, filetype = os.path.splitext(sources[0])
-
+
if start.endswith('*'):
return
-
+
start = os.path.dirname(os.path.dirname(os.path.abspath(start)))
-
+
if opts.all:
sources = [i for i in get_all_files(filepath or '.', filetype)]
-
+
global SOURCES
SOURCES = sorted([Source(name, start) for name in sources])