/[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.16.2.1 Revision 1.16.2.2
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.16.2.1 $" 5__revision__ = "$Revision: 1.16.2.2 $"
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
58 if not license.strip(): return "?" 58 if not license.strip(): return "?"
59 license = license.replace('|',' ') 59 license = license.replace('|',' ')
60 license = license.replace('(', '') 60 license = license.replace('(', '')
61 license = license.replace(')', '') 61 license = license.replace(')', '')
62 pieces = license.split() 62 pieces = license.split()
63 html = ['<a href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/*checkout*/' 63 html = ['<a href="http://sources.gentoo.org/viewcvs.py/*checkout*/'
64 'licenses/%s">%s</a>' % (piece, piece) for piece in pieces] 64 'gentoo-x86/licenses/%s">%s</a>' % (piece, piece) for piece in pieces]
65 return '<br>\n'.join(html) 65 return '<br>\n'.join(html)
66 66
67def package_to_html(pkginfo, db, full=False): 67def package_to_html(pkginfo, db, full=False):
68 """This function needs a database (db) connection because it performs a 68 """This function needs a database (db) connection because it performs a
69 query_to_dict on the package""" 69 query_to_dict on the package"""
181 """This actually will (should) take either a package or ebuild dict 181 """This actually will (should) take either a package or ebuild dict
182 as an argument""" 182 as an argument"""
183 183
184 import forums 184 import forums
185 185
186 changelogurl = ('http://www.gentoo.org/cgi-bin/viewcvs.cgi/*checkout*/' 186 changelogurl = ('http://sources.gentoo.org/viewcvs.py/*checkout*/'
187 '%s/%s/ChangeLog' % (pkg['category'],pkg['name'])) 187 'gentoo-x86/%s/%s/ChangeLog' % (pkg['category'],pkg['name']))
188 cat_header = '<th class="category">Category</th>' 188 cat_header = '<th class="category">Category</th>'
189 license_header = '<th class="license">License</th>' 189 license_header = '<th class="license">License</th>'
190 category = ('<td class="category">' 190 category = ('<td class="category">'
191 '<a href="%spackages/?category=%s">%s</a></td>' % (config.FEHOME, 191 '<a href="%spackages/?category=%s">%s</a></td>' % (config.FEHOME,
192 pkg['category'], pkg['category'])) 192 pkg['category'], pkg['category']))

Legend:
Removed from v.1.16.2.1  
changed lines
  Added in v.1.16.2.2

  ViewVC Help
Powered by ViewVC 1.1.20