File: JyLocalGenerator.py

package info (click to toggle)
jython 2.5.3-3%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 43,404 kB
  • ctags: 105,521
  • sloc: python: 351,322; java: 216,346; xml: 1,547; sh: 330; perl: 124; ansic: 102; makefile: 101
file content (29 lines) | stat: -rw-r--r-- 957 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""Generates the documentation for the Jython distribution"""

import JyGenerator


class JyLocalGenerator(JyGenerator.JyGenerator):

    sitelinks = [
        ('http://www.jython.org/',               'Home'),
        ('http://www.python.org/',                'www.python.org'),
        ('http://www.jython.org/download.html',  'Download'),
        ('%(rootdir)s/index.html',                'Documentation'),
        ]

    webmaster = 0
    
    def __init__(self, file, rootdir, relthis):
        if rootdir == '..':
            rootdir = '.'
        JyGenerator.JyGenerator.__init__(self, file, rootdir, relthis)

    def get_corner(self):
        # it is important not to have newlines between the img tag and the end
        # anchor and end center tags, otherwise layout gets messed up
        return '''
<center>
    <a href="http://www.jython.org/">
    <img border="0" src="%(rootdir)s/images/jython-new-small.gif"></a></center>''' % \
    self._d