aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Fitzgerald <fitzgen@gmail.com>2010-06-29 08:13:02 -0700
committerNick Fitzgerald <fitzgen@gmail.com>2010-06-29 08:13:02 -0700
commitde95c312b690a02f98f3acd93423f156ae8cf3be (patch)
treeacca0b2baf17c3eb587522af63c118caf4bfc294
parent8c243f31782ea3f4053d5a4a4f7a73f413b5d6ca (diff)
downloadpycco-de95c312b690a02f98f3acd93423f156ae8cf3be.tar.gz
pycco-de95c312b690a02f98f3acd93423f156ae8cf3be.zip
Little changes
-rw-r--r--pocco.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/pocco.py b/pocco.py
index 7a51c23..18065db 100644
--- a/pocco.py
+++ b/pocco.py
@@ -65,7 +65,7 @@ def parse(source, code):
save(docs_text, code_text)
return sections
-# Highlights a single chunk of code, using **Pygments** over stdio, and runs the
+# Highlights a single chunk of code using the **Pygments** module, and runs the
# text of its corresponding comment through **Markdown**.
#
# We process the entire file in a single call to Pygments by inserting little
@@ -87,7 +87,7 @@ def highlight(source, sections):
# Once all of the code is finished highlighting, we can generate the HTML file
# and write out the documentation. Pass the completed sections into the template
-# found in `resources/pocco.jst`
+# found in `resources/pocco.html`
def generate_html(source, sections):
title = path.basename(source)
dest = destination(source)
@@ -122,7 +122,8 @@ languages = {
".coffee": { "name": "coffee-script", "symbol": "#" },
".js": { "name": "javascript", "symbol": "//" },
".rb": { "name": "ruby", "symbol": "#" },
- ".py": { "name": "python", "symbol": "#" }
+ ".py": { "name": "python", "symbol": "#" },
+ ".scm": { "name": "scheme", "symbol": ";;" },
}
# Build out the appropriate matchers and delimiters for each language.
@@ -146,7 +147,7 @@ def get_language(source):
return languages[ source[source.rindex("."):] ]
# Compute the destination HTML path for an input source file path. If the source
-# is `lib/example.coffee`, the HTML will be at `docs/example.html`
+# is `lib/example.py`, the HTML will be at `docs/example.html`
def destination(filepath):
name = filepath.replace(filepath[ filepath.rindex("."): ], "")
return "docs/" + path.basename(name) + ".html"