Topic or keyword help page.
(topic)
| 2577 | return 'Keywords', contents |
| 2578 | |
| 2579 | def html_topicpage(topic): |
| 2580 | """Topic or keyword help page.""" |
| 2581 | buf = io.StringIO() |
| 2582 | htmlhelp = Helper(buf, buf) |
| 2583 | contents, xrefs = htmlhelp._gettopic(topic) |
| 2584 | if topic in htmlhelp.keywords: |
| 2585 | title = 'KEYWORD' |
| 2586 | else: |
| 2587 | title = 'TOPIC' |
| 2588 | heading = html.heading( |
| 2589 | '<strong class="title">%s</strong>' % title, |
| 2590 | ) |
| 2591 | contents = '<pre>%s</pre>' % html.markup(contents) |
| 2592 | contents = html.bigsection(topic , 'index', contents) |
| 2593 | if xrefs: |
| 2594 | xrefs = sorted(xrefs.split()) |
| 2595 | |
| 2596 | def bltinlink(name): |
| 2597 | return '<a href="topic?key=%s">%s</a>' % (name, name) |
| 2598 | |
| 2599 | xrefs = html.multicolumn(xrefs, bltinlink) |
| 2600 | xrefs = html.section('Related help topics: ', 'index', xrefs) |
| 2601 | return ('%s %s' % (title, topic), |
| 2602 | ''.join((heading, contents, xrefs))) |
| 2603 | |
| 2604 | def html_getobj(url): |
| 2605 | obj = locate(url, forceload=1) |
no test coverage detected
searching dependent graphs…