def __init__(self, file, rootdir, relthis): self.__body = None root, ext = os.path.splitext(file) html = root + '.html' p = self.__parser = HTParser(file, 'Barry A. Warsaw', '*****@*****.**') f = self.__linkfixer = LinkFixer(html, rootdir, relthis) p.process_sidebar() p.sidebar.append(BLANKCELL) # massage our links self.__d = {'rootdir': rootdir} self.__linkfixer.massage(p.sidebar, self.__d) # tweak p.sidebar.append(('http://www.python.org/', ''' <center> <img border="0" src="%(rootdir)s/images/PythonPoweredSmall.gif"></center>''' % self.__d)) p.sidebar.append(BLANKCELL) copyright = self.__parser.get('copyright', '1996-%d' % time.localtime()[0]) p.sidebar.append((None, '© ' + copyright)) p.sidebar.append((None, 'Barry A. Warsaw')) Sidebar.__init__(self, p.sidebar) # # fix up our site links, no relthis because the site links are # relative to the root of my web pages # sitelink_fixer = LinkFixer(f.myurl(), rootdir) sitelink_fixer.massage(sitelinks, self.__d, aboves=1) Banner.__init__(self, sitelinks, cols=2) # kludge! for i in range(len(p.sidebar)-1, -1, -1): if p.sidebar[i] == 'Email Us': p.sidebar[i] = 'Email me' break
def __init__(self, file, rootdir, relthis): root, ext = os.path.splitext(file) html = root + '.html' p = self.__parser = HTParser(file, self.AUTHOR) f = self.__linkfixer = LinkFixer(html, rootdir, relthis) self.__body = None self.__cont = None # calculate the sidebar links, adding a few of our own self.__d = {'rootdir': rootdir} p.process_sidebar() p.sidebar.append(BLANKCELL) # it is important not to have newlines between the img tag and the end # end center tags, otherwise layout gets messed up p.sidebar.append(('http://sourceforge.net/projects/spambayes', ''' <div align="right"> <img alt="" border="0" src="http://sourceforge.net/sflogo.php?group_id=61702&type=1"></div> ''')) self.__linkfixer.massage(p.sidebar, self.__d) SpamBayesSidebar.__init__(self, p.sidebar) # # fix up our site links, no relthis because the site links are # relative to the root of our web pages # sitelink_fixer = LinkFixer(f.myurl(), rootdir) sitelink_fixer.massage(sitelinks, self.__d, aboves=1) Banner.__init__(self, sitelinks)
def __init__(self, file, rootdir, relthis): root, ext = os.path.splitext(file) html = root + '.html' p = self.__parser = HTParser(file, '*****@*****.**') f = self.__linkfixer = LinkFixer(html, rootdir, relthis) self.__body = None self.__cont = None # calculate the sidebar links, adding a few of our own self._d = {'rootdir': rootdir} p.process_sidebar() p.sidebar.append(BLANKCELL) # it is important not to have newlines between the img tag and the end # end center tags, otherwise layout gets messed up p.sidebar.append(('http://www.python.org/', ''' <center> <img border="0" src="%(rootdir)s/images/PythonPoweredSmall.gif"></center> ''' % self._d)) self.__linkfixer.massage(p.sidebar, self._d) Sidebar.__init__(self, p.sidebar) # # fix up our site links, no relthis because the site links are # relative to the root of our web pages # sitelink_fixer = LinkFixer(f.myurl(), rootdir) sitelink_fixer.massage(sitelinks, self._d, aboves=1) Banner.__init__(self, sitelinks, cols=2)
def __init__(self, file, rootdir, relthis): root, ext = os.path.splitext(file) html = root + '.html' p = self.__parser = HTParser(file, self.AUTHOR) f = self.__linkfixer = LinkFixer(html, rootdir, relthis) self.__body = None self.__cont = None # calculate the sidebar links, adding a few of our own self.__d = {'rootdir': rootdir} p.process_sidebar() p.sidebar.append(BLANKCELL) # it is important not to have newlines between the img tag and the end # end center tags, otherwise layout gets messed up p.sidebar.append(('%(rootdir)s', ''' <center> <img alt="" border="0" src="%(rootdir)s/pics/PythonPoweredSmall.gif"></center> ''' % self.__d)) self.__linkfixer.massage(p.sidebar, self.__d) Sidebar.__init__(self, p.sidebar) # # fix up our site links, no relthis because the site links are # relative to the root of our web pages # sitelink_fixer = LinkFixer(f.myurl(), rootdir) sitelink_fixer.massage(sitelinks, self.__d, aboves=1) Banner.__init__(self, sitelinks) # calculate the random corner # XXX Should really do a list of the pics directory... NBANNERS = 64 i = whrandom.randint(0, NBANNERS - 1) s = "PyBanner%03d.gif" % i self.__d['banner'] = s self.__whichbanner = i
def __init__(self, file, rootdir, relthis): root, ext = os.path.splitext(file) html = root + '.html' p = self._parser = HTParser(file) self._linkfixer = LinkFixer(html, rootdir, relthis) self.__body = None p.process_sidebar() self._linkfixer.massage(p.sidebar) Sidebar.__init__(self, p.sidebar)
def __init__(self, file, rootdir, relthis): root, ext = os.path.splitext(file) html = root + '.html' p = self.__parser = HTParser(file, 'x@y') f = self.__linkfixer = LinkFixer(html, rootdir, relthis) self.__body = None self.__cont = None # calculate the sidebar links, adding a few of our own self._d = {'rootdir': rootdir} p.process_sidebar() # remove "Email us" and use replacement del p.sidebar[-2:] p.sidebar.append('Contact') p.sidebar.append( ('http://lists.sourceforge.net/lists/listinfo/jython-users', 'Questions on Jython?<br>jython-users')) p.sidebar.append(BLANKCELL) # it is important not to have newlines between the img tag and the end # end center tags, otherwise layout gets messed up p.sidebar.append(('http://www.python.org/', ''' <center> <img border="0" src="%(rootdir)s/images/PythonPoweredSmall.gif"></center> ''' % self._d)) p.sidebar.append(BLANKCELL) p.sidebar.append(('http://sourceforge.net/', ''' <center> <img src="http://sourceforge.net/sflogo.php?group_id=12867" width="88" height="31" border="0" alt="SourceForge Logo"></center> ''' % self._d)) if self.webmaster: # webmaster -> jython-dev p.sidebar.append(BLANKCELL) p.sidebar.append(BLANKCELL) p.sidebar.append(('mailto:[email protected]', 'webmaster')) self.__linkfixer.massage(p.sidebar, self._d) Sidebar.__init__(self, p.sidebar) # # fix up our site links, no relthis because the site links are # relative to the root of our web pages # sitelink_fixer = LinkFixer(f.myurl(), rootdir) sitelink_fixer.massage(self.sitelinks, self._d, aboves=1) Banner.__init__(self, self.sitelinks, cols=2)
def __init__(self, file, rootdir, relthis): root, ext = os.path.splitext(file) self.html = root + '.html' p = self.__parser = HTParser(file) f = self.__linkfixer = LinkFixer(self.html, rootdir, relthis) self.__body = None self.__cont = None # Calculate the sidebar links, adding a few of our own. self.__d = {'rootdir': rootdir} p.process_sidebar() p.sidebar = p.sidebar[:-2] self.make_assoc(p.sidebar) self.find_buttons(p.sidebar) self.test_buttons() self.collapse_links(p.sidebar, self.html) Sidebar.__init__(self, p.sidebar) Banner.__init__(self, ()) # Rollover script self.rollover = '''<script>
def __init__(self, file, rootdir, relthis): root, ext = os.path.splitext(file) html = root + '.html' p = self.__parser = HTParser(file, self.AUTHOR, self.EMAIL) f = self.__linkfixer = LinkFixer(html, rootdir, relthis) self.__body = None self.__cont = None # Calculate the sidebar links, adding a few of our own. self.__d = {'rootdir': rootdir} p.process_sidebar() p.sidebar.append(BLANKCELL) # It is important not to have newlines between the img tag and the end # end center tags, otherwise layout gets messed up. p.sidebar.append(('http://www.python.org/', ''' <center> <img alt="[Python Powered]" border="0" src="PythonPoweredSmall.png"></center> ''' % self.__d)) self.__linkfixer.massage(p.sidebar, self.__d) Sidebar.__init__(self, p.sidebar) p.sidebar.append(BLANKCELL) copyright = self.__parser.get('copyright', '1999-%d' % time.localtime()[0]) p.sidebar.append((None, '© ' + copyright)) p.sidebar.append(('http://www.python.org/psf/', 'Python Software Foundation')) p.sidebar.append((None, '<hr>')) p.sidebar.append((file, '[page source]')) # Fix up our site links, no relthis because the site links are # relative to the root of our web pages. sitelink_fixer = LinkFixer(f.myurl(), rootdir) sitelink_fixer.massage(sitelinks, self.__d, aboves=1) Banner.__init__(self, sitelinks) # kludge! for i in range(len(p.sidebar)-1, -1, -1): if p.sidebar[i] == 'Email Us': p.sidebar[i] = 'Email me' break