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

Diff of /src/packages/weeks.py

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

Revision 1.2 Revision 1.3
22 'when_found, ' 22 'when_found, '
23 'description, ' 23 'description, '
24 'changelog, ' 24 'changelog, '
25 'arch, ' 25 'arch, '
26 'homepage, ' 26 'homepage, '
27 'license ' 27 'license, '
28 'is_masked '
28 'FROM ebuild,package ' 29 'FROM ebuild,package '
29 'WHERE SUBSTRING(when_found FROM 1 FOR 8) = "%s%02d%02d" ' 30 'WHERE SUBSTRING(when_found FROM 1 FOR 8) = "%s%02d%02d" '
30 'AND ebuild.name = package.name ' 31 'AND ebuild.name = package.name '
31 'AND ebuild.category = package.category ' 32 'AND ebuild.category = package.category '
32 'ORDER BY when_found DESC' % 33 'ORDER BY when_found DESC' %
34 #print query 35 #print query
35 c.execute(query) 36 c.execute(query)
36 results = c.fetchall() 37 results = c.fetchall()
37 return results 38 return results
38 39
39today = time.time() 40today = int(time.time())
40db = ebuilddb.db_connect() 41db = ebuilddb.db_connect()
41for day in range(today,today - (7*SECS_PER_DAY),-SECS_PER_DAY): 42for day in range(today,today - (7*SECS_PER_DAY),-SECS_PER_DAY):
42 #print day 43 #print day
43 gmtime = time.gmtime(day) 44 gmtime = time.gmtime(day)
44 dayname = get_dayname(gmtime) 45 dayname = get_dayname(gmtime)
48 #print results 49 #print results
49 ebuilds = [ gentoo.query_to_dict(i) for i in results ] 50 ebuilds = [ gentoo.query_to_dict(i) for i in results ]
50 #ebuilds.sort(ebuild_sort) 51 #ebuilds.sort(ebuild_sort)
51 if day < (today - NUM_EXPANDED_DAYS*SECS_PER_DAY): 52 if day < (today - NUM_EXPANDED_DAYS*SECS_PER_DAY):
52 continue 53 continue
53 for ebuild in ebuilds: 54 for ebuild in ebuilds[:100]:
54 print ('. <a class="altlink" title="%s" href="%sebuilds/?%s-%s">%s %s</a><br>' % 55 print ('. <a class="altlink" title="%s" href="%sebuilds/?%s-%s">%s %s</a><br>' %
55 (escape(ebuild['description']), 56 (escape(ebuild['description']),
56 config.FEHOME, 57 config.FEHOME,
57 ebuild['name'], 58 ebuild['name'],
58 ebuild['version'], 59 ebuild['version'],

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20