/[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.4 Revision 1.5
1#!/usr/bin/python -OO 1#!/usr/bin/python -OO
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.4 $" 5__revision__ = "$Revision: 1.5 $"
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
318 ebuild['time'].gmtime().strftime("%a, %d %b %Y %H:%M:%S +0000")) 318 ebuild['time'].gmtime().strftime("%a, %d %b %Y %H:%M:%S +0000"))
319 ) 319 )
320 320
321 fp.write("</channel>\n</rss>\n") 321 fp.write("</channel>\n</rss>\n")
322 322
323if __name__ == '__main__': 323def main(argv=Null):
324 argv = argv or sys.argv
324 try: 325 try:
325 if sys.argv[1] == '-g': 326 if argv[1] == '-g':
326 ebuilddb.main() 327 ebuilddb.main()
327 except IndexError: 328 except IndexError:
328 pass 329 pass
329 330
330 db = ebuilddb.db_connect() 331 db = ebuilddb.db_connect()
381 382
382 rss2 = open(os.path.join(config.LOCALHOME, "archs", arch, branch, 383 rss2 = open(os.path.join(config.LOCALHOME, "archs", arch, branch,
383 config.RSS2), 'w') 384 config.RSS2), 'w')
384 ebuilds_to_rss(rss2, ebuilds, simple=True, subtitle=subtitle) 385 ebuilds_to_rss(rss2, ebuilds, simple=True, subtitle=subtitle)
385 rss.close() 386 rss.close()
387
388if __name__ == '__main__':
389 sys.exit(main())

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20