class documentation
class SummaryExtractor(nodes.NodeVisitor): (source)
Constructor: SummaryExtractor(document, maxchars)
A docutils node visitor that extracts first sentences from the first paragraph in a document.
| Method | __init__ |
No summary |
| Method | unknown |
Ignore all unknown nodes |
| Method | visit |
Undocumented |
| Method | visit |
Undocumented |
| Method | visit |
Undocumented |
| Instance Variable | maxchars |
Undocumented |
| Instance Variable | other |
Undocumented |
| Instance Variable | summary |
Undocumented |
| Constant | _SENTENCE |
Undocumented |
| Parameters | |
document:nodes.document | The docutils document to extract a summary from. |
maxchars:int | Maximum of characters the summary can span. Sentences are not cut in the middle, so the actual length might be longer if your have a large first paragraph. |