forked from AuroraMiddleware/gtk
let title and logo be configurable so that GNOME can use this script too.
2000-02-25 Jonathan Blandford <jrb@redhat.com> * docs/make-todo (lineno): let title and logo be configurable so that GNOME can use this script too. * TODO.xml: added logourl and a title
This commit is contained in:
parent
e97e6e632e
commit
1af201e9bb
@ -1,3 +1,10 @@
|
||||
2000-02-25 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* docs/make-todo (lineno): let title and logo be configurable so
|
||||
that GNOME can use this script too.
|
||||
|
||||
* TODO.xml: added logourl and a title
|
||||
|
||||
Fri Feb 25 11:12:00 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* TODO.xml: Added some UI items, and an explanatory
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-02-25 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* docs/make-todo (lineno): let title and logo be configurable so
|
||||
that GNOME can use this script too.
|
||||
|
||||
* TODO.xml: added logourl and a title
|
||||
|
||||
Fri Feb 25 11:12:00 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* TODO.xml: Added some UI items, and an explanatory
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-02-25 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* docs/make-todo (lineno): let title and logo be configurable so
|
||||
that GNOME can use this script too.
|
||||
|
||||
* TODO.xml: added logourl and a title
|
||||
|
||||
Fri Feb 25 11:12:00 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* TODO.xml: Added some UI items, and an explanatory
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-02-25 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* docs/make-todo (lineno): let title and logo be configurable so
|
||||
that GNOME can use this script too.
|
||||
|
||||
* TODO.xml: added logourl and a title
|
||||
|
||||
Fri Feb 25 11:12:00 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* TODO.xml: Added some UI items, and an explanatory
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-02-25 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* docs/make-todo (lineno): let title and logo be configurable so
|
||||
that GNOME can use this script too.
|
||||
|
||||
* TODO.xml: added logourl and a title
|
||||
|
||||
Fri Feb 25 11:12:00 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* TODO.xml: Added some UI items, and an explanatory
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-02-25 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* docs/make-todo (lineno): let title and logo be configurable so
|
||||
that GNOME can use this script too.
|
||||
|
||||
* TODO.xml: added logourl and a title
|
||||
|
||||
Fri Feb 25 11:12:00 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* TODO.xml: Added some UI items, and an explanatory
|
||||
|
@ -1,3 +1,10 @@
|
||||
2000-02-25 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* docs/make-todo (lineno): let title and logo be configurable so
|
||||
that GNOME can use this script too.
|
||||
|
||||
* TODO.xml: added logourl and a title
|
||||
|
||||
Fri Feb 25 11:12:00 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* TODO.xml: Added some UI items, and an explanatory
|
||||
|
3
TODO.xml
3
TODO.xml
@ -7,7 +7,8 @@
|
||||
$ docs/make-todo > /dev/null
|
||||
|
||||
before committing, or you may screw up the online version -->
|
||||
<todo>
|
||||
<todo logourl="gtk-logo-rgb.gif">
|
||||
<title>GTK+ TODO list</title>
|
||||
<section>
|
||||
<title>GDK</title>
|
||||
|
||||
|
@ -124,6 +124,8 @@ class TodoParser (xmllib.XMLParser):
|
||||
self.data = ""
|
||||
self.section = None
|
||||
self.entry = None
|
||||
self.logourl = None
|
||||
self.title = None
|
||||
self.sections = []
|
||||
|
||||
self.entitydefs = {}
|
||||
@ -131,6 +133,8 @@ class TodoParser (xmllib.XMLParser):
|
||||
def start_todo(self,attributes):
|
||||
if self.in_todo:
|
||||
raise ParseError, "<todo> tags may not be nested"
|
||||
if attributes.has_key ("logourl"):
|
||||
self.logourl = attributes["logourl"]
|
||||
self.in_todo = 1
|
||||
|
||||
def end_todo(self):
|
||||
@ -150,8 +154,8 @@ class TodoParser (xmllib.XMLParser):
|
||||
self.section = None
|
||||
|
||||
def start_title(self,attributes):
|
||||
if not self.section and not self.entry:
|
||||
raise ParseError, "<title> tag must be in <section> or <entry>"
|
||||
if not self.in_todo:
|
||||
raise ParseError, "<title> tag must be in <todo>, <section> or <entry>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <title> tag in content"
|
||||
self.in_data = 1
|
||||
@ -160,10 +164,11 @@ class TodoParser (xmllib.XMLParser):
|
||||
self.in_data = 0
|
||||
if self.entry:
|
||||
self.entry.title = self.data
|
||||
self.data = ""
|
||||
else:
|
||||
elif self.section:
|
||||
self.section.title = self.data
|
||||
self.data = ""
|
||||
else:
|
||||
self.title = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_description(self,attributes):
|
||||
if not self.entry:
|
||||
@ -295,18 +300,21 @@ while 1:
|
||||
lineno = lineno + 1
|
||||
|
||||
parser.close()
|
||||
if parser.title == None:
|
||||
sys.stderr.write ("<todo> Document must have a <title>\n")
|
||||
sys.exit (1)
|
||||
|
||||
print '''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>GTK+ TODO List</title>
|
||||
<title>%s</title>
|
||||
</head>
|
||||
<body bgcolor="#ffffff">
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<table width="100%%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<h1>GTK+ TODO List</h1>'''
|
||||
<h1>%s</h1>''' % (parser.title, parser.title)
|
||||
|
||||
|
||||
for section in parser.sections:
|
||||
@ -318,14 +326,16 @@ for section in parser.sections:
|
||||
print '<a href="#%s">%s</a> (%d items)<br>' % (id,section.title,ntasks)
|
||||
|
||||
print '''
|
||||
</td>
|
||||
<td align="right">
|
||||
<img src="gtk-logo-rgb.gif" alt="GTK+ Logo"></img>
|
||||
</td>
|
||||
</td>'''
|
||||
if parser.logourl != None:
|
||||
print ''' <td align="right">
|
||||
<img src="%s" alt="Logo"></img>
|
||||
</td>''' % parser.logourl
|
||||
print '''
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
'''
|
||||
'''
|
||||
|
||||
first = 1
|
||||
for section in parser.sections:
|
||||
|
Loading…
Reference in New Issue
Block a user