[Demudi-commits] r6 - in trunk/demudi: debian trac/scripts

Free Ekanayaka free-guest@haydn.debian.org
Mon, 25 Oct 2004 06:49:39 -0600


Author: free-guest
Date: 2004-10-25 06:49:09 -0600 (Mon, 25 Oct 2004)
New Revision: 6

Added:
   trunk/demudi/trac/scripts/gen-sw-descs
Removed:
   trunk/demudi/trac/scripts/software-descriptions
   trunk/demudi/trac/scripts/software-sections
Modified:
   trunk/demudi/debian/changelog
   trunk/demudi/debian/rules
Log:
Better section formatting

Modified: trunk/demudi/debian/changelog
===================================================================
--- trunk/demudi/debian/changelog	2004-10-24 20:58:24 UTC (rev 5)
+++ trunk/demudi/debian/changelog	2004-10-25 12:49:09 UTC (rev 6)
@@ -13,9 +13,12 @@
   * trac:
      - first version of the package
      - automatized creation of software description pages
+     - merged software-sections and software-descriptions in gen-sw-descs
+     - added a table with versions and short descriptions
+     - added named top and back reference link
+  
+ -- Free Ekanayaka <free@agnula.org>  Mon, 25 Oct 2004 14:27:31 +0200
 
- -- Free Ekanayaka <free@agnula>  Sun, 17 Oct 2004 16:00:39 +0200
-
 demudi (0.1) unstable; urgency=low
 
   * tasksel:

Modified: trunk/demudi/debian/rules
===================================================================
--- trunk/demudi/debian/rules	2004-10-24 20:58:24 UTC (rev 5)
+++ trunk/demudi/debian/rules	2004-10-25 12:49:09 UTC (rev 6)
@@ -24,9 +24,8 @@
 build-stamp:
 	cd tasksel && ./makedesc.pl descs/ demudi-tasks.desc && cd ..
 	cat tasksel/lists/* | sort > debian-cd/tasks/demudi-tasksel
-	wget -O trac/db/trac.db http://demudi.alioth.debian.org/db/trac.db
-	./trac/scripts/software-sections     $(SECTIONS)
-	./trac/scripts/software-descriptions $(SECTIONS)
+#	wget -O trac/db/trac.db http://demudi.alioth.debian.org/db/trac.db
+	./trac/scripts/gen-sw-descs $(SECTIONS)
 	for i in DocsSoftware*; do trac-admin trac wiki import $$i $$i; done
 	touch build-stamp
 

Copied: trunk/demudi/trac/scripts/gen-sw-descs (from rev 5, trunk/demudi/trac/scripts/software-descriptions)
===================================================================
--- trunk/demudi/trac/scripts/software-descriptions	2004-10-24 20:58:24 UTC (rev 5)
+++ trunk/demudi/trac/scripts/gen-sw-descs	2004-10-25 12:49:09 UTC (rev 6)
@@ -0,0 +1,76 @@
+#!/usr/bin/python
+
+import apt_pkg
+import sys
+import os
+
+apt_pkg.init()
+
+sections = sys.argv[1:]
+cache    = apt_pkg.GetCache()
+records  = apt_pkg.GetPkgRecords(cache)
+
+out = file('DocsSoftware', 'w')
+
+print >> out, '= DeMuDi software sections ='
+print >> out, ''
+
+for section in sections:
+     print >> out, ' * [wiki:DocsSoftware%s %s]' % (section.capitalize(), section.capitalize())
+
+for section in sections:
+     packages = ((file( 'tasksel/lists/%s' % (section) , 'r')).read()).split('\n')
+     packages.pop()
+     put, get = os.popen4('tasksel --task-desc %s' % (section))
+     description = get.read()
+     
+     out = file('DocsSoftware%s' % (section.capitalize()), 'w')
+     
+     print >> out, "{{{"
+     print >> out, "#!html"
+     print >> out, ''
+     print >> out, '<h1><a name="top">Packages in the %s section</a></h1>' % (section)
+     print >> out, '<br>%s<br>' % (description)
+     print >> out, ' <br><table border="1">'
+     
+     for package in packages:
+          item = cache[package]
+         
+          IGNORE_DPKG_STATUS = 1
+         
+          pack_vers = item.VersionList[0]
+          pack_file, index = pack_vers.FileList[0]
+          records.Lookup((pack_file,index))
+          if pack_file.IndexType != 'Debian Package Index' and IGNORE_DPKG_STATUS == 1:
+               continue
+          print >> out, '  <tr><th><a href="#%s">%s</a><td>%s<td>%s' % (package, package, pack_vers.VerStr, records.ShortDesc)
+
+     print >> out, " </table><br>"
+     print >> out, "}}}"
+	
+     for package in packages:           
+          item = cache[package]
+          
+          IGNORE_DPKG_STATUS = 1
+          
+          pack_vers = item.VersionList[0]
+          pack_file, index = pack_vers.FileList[0]
+          records.Lookup((pack_file,index))
+          if pack_file.IndexType != 'Debian Package Index' and IGNORE_DPKG_STATUS == 1:
+               continue
+          print >> out, "{{{"
+          print >> out, "#!html"
+          print >> out, '<h1><a name=%s>%s</a></h1>' % (package, package)
+          print >> out, "}}}"
+          print >> out, ""
+          print >> out, "'''Version''':    ", pack_vers.VerStr, "[[BR]]"
+          print >> out, "'''Description:'''", records.ShortDesc
+          print >> out, "{{{"
+          print >> out, records.LongDesc[len(records.ShortDesc):]
+          print >> out, "}}}"
+          print >> out, ""
+          print >> out, "{{{"
+          print >> out, "#!html"
+          print >> out, "<a href=\"#top\">Top</a>"
+          print >> out, "}}}"
+          print >> out, "[[BR]]"

Deleted: trunk/demudi/trac/scripts/software-descriptions
===================================================================
--- trunk/demudi/trac/scripts/software-descriptions	2004-10-24 20:58:24 UTC (rev 5)
+++ trunk/demudi/trac/scripts/software-descriptions	2004-10-25 12:49:09 UTC (rev 6)
@@ -1,54 +0,0 @@
-#!/usr/bin/python
-
-import apt_pkg
-import sys
-import os
-
-apt_pkg.init()
-
-cache = apt_pkg.GetCache()
-records = apt_pkg.GetPkgRecords(cache)
-sections = sys.argv[1:]
-
-for section in sections:
-     packages = ((file( 'tasksel/lists/%s' % (section) , 'r')).read()).split('\n')
-     packages.pop()
-     put, get = os.popen4('tasksel --task-desc %s' % (section))
-     description = get.read()
-     
-     out = file('DocsSoftware%s' % (section.capitalize()), 'w')
-     
-     print >> out, '= Packages in the %s section =' % (section)
-     print >> out, ''
-     print >> out, description
-     print >> out, "{{{"
-     print >> out, "#!html"
-     print >> out, " <ul>"
-     
-     for package in packages:
-          print >> out, '  <li><a href="/cgi-bin/trac.cgi/wiki/DocsSoftware%s#%s">%s</a></li>' % (section.capitalize(), package, package)
-
-     print >> out, " </ul>"
-     print >> out, "}}}"
-	
-     for package in packages:
-          item = cache[package]
-          
-          IGNORE_DPKG_STATUS = 1
-               
-          pack_vers = item.VersionList[0]
-          pack_file, index = pack_vers.FileList[0]
-          records.Lookup((pack_file,index))
-          if pack_file.IndexType != 'Debian Package Index' and IGNORE_DPKG_STATUS == 1:
-               continue
-          print >> out, "{{{"
-          print >> out, "#!html"
-          print >> out, '<h1><a name=%s>%s</a></h1>' % (package, package)
-          print >> out, "}}}"
-          print >> out, ""
-          print >> out, "'''Version''':    ", pack_vers.VerStr, "[[BR]]"
-          print >> out, "'''Description:'''", records.ShortDesc
-          print >> out, "{{{"
-          print >> out, records.LongDesc[len(records.ShortDesc):]
-          print >> out, "}}}"
-          print >> out, ""

Deleted: trunk/demudi/trac/scripts/software-sections
===================================================================
--- trunk/demudi/trac/scripts/software-sections	2004-10-24 20:58:24 UTC (rev 5)
+++ trunk/demudi/trac/scripts/software-sections	2004-10-25 12:49:09 UTC (rev 6)
@@ -1,13 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-sections = sys.argv[1:]
-
-out = file('DocsSoftware', 'w')
-
-print >> out, '= DeMuDi software sections ='
-print >> out, ''
-
-for section in sections:
-     print >> out, ' * [wiki:DocsSoftware%s %s]' % (section.capitalize(), section.capitalize())