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

Contents of /src/packages/categories.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download) (as text)
Thu May 27 05:03:40 2004 UTC (10 years, 3 months ago) by marduk
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/x-python
FILE REMOVED
We use categories2.py, not categories.py to generate the categories page.
Also removed config.py to prevent overwriting it on the server.

1 #!/usr/bin/python -OO
2
3 import time
4 import MySQLdb
5 import ebuilddb
6 import config
7 import gentoo
8
9 def get_categories():
10 db = ebuilddb.db_connect()
11 c = db.cursor()
12 query = ('SELECT DISTINCT(category) '
13 'FROM ebuild '
14 'ORDER BY category ')
15 #print query
16 c.execute(query)
17 results = c.fetchall()
18 return results
19
20 categories = [x[0] for x in get_categories()]
21 for category in categories:
22 #print category
23 print ('. <a class="altlink" href="%spackages/?category=%s">%s</a><br>' %
24 (config.FEHOME,
25 category,
26 category))
27 print '<br>'

  ViewVC Help
Powered by ViewVC 1.1.20