/[gentoo]/src/packages/gentoo.py
Gentoo

Diff of /src/packages/gentoo.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.14 Revision 1.15
1#!/usr/bin/python -O 1#!/usr/bin/python -O
2"""These functions mainly take ebuild info (grabbed from the database and 2"""These functions mainly take ebuild info (grabbed from the database and
3 convert it to HTML. See the "main" function at the bottom.""" 3 convert it to HTML. See the "main" function at the bottom."""
4 4
5__revision__ = "$Revision: 1.14 $" 5__revision__ = "$Revision: 1.15 $"
6# $Source: /var/cvsroot/gentoo/src/packages/gentoo.py,v $ 6# $Source: /var/cvsroot/gentoo/src/packages/gentoo.py,v $
7 7
8import config 8import config
9import os 9import os
10import time 10import time
33 results = c.fetchall() 33 results = c.fetchall()
34 if len(results) == 1 and results[0][0]: 34 if len(results) == 1 and results[0][0]:
35 return 1 35 return 1
36 return 0 36 return 0
37 37
38def changelog_to_html(changelog): 38changelog_to_html = changelogs.bugs_to_html
39 """HTML-ize a changelog entry"""
40 html = ""
41 for char in changelog:
42 if char == '\n':
43 html = "%s<br>" % html
44 else:
45 html = "%s%s" % (html, escape(char))
46 html = changelogs.bugs_to_html(html)
47 return html
48 39
49def homepage_to_html(homepage): 40def homepage_to_html(homepage):
50 """convert HOMEPAGE entry to HTML""" 41 """convert HOMEPAGE entry to HTML"""
51 if not homepage.strip(): 42 if not homepage.strip():
52 return "?" 43 return "?"

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20