-rw-r--r-- | development/documents/opie-todo.html | 46 | ||||
-rw-r--r-- | development/documents/opie-todo.inc | 262 | ||||
-rw-r--r-- | development/documents/opie-todo.xml | 59 | ||||
-rw-r--r-- | development/documents/opie.dtd | 24 |
4 files changed, 391 insertions, 0 deletions
diff --git a/development/documents/opie-todo.html b/development/documents/opie-todo.html new file mode 100644 index 0000000..839fe39 --- a/dev/null +++ b/development/documents/opie-todo.html | |||
@@ -0,0 +1,46 @@ | |||
1 | <!-- | ||
2 | <?php | ||
3 | $page = false; | ||
4 | if (file_exists('../page.inc')) { | ||
5 | include "../page.inc"; | ||
6 | page("verFeature3_2"); | ||
7 | $page = true; | ||
8 | } | ||
9 | ?> | ||
10 | --> | ||
11 | |||
12 | <?php | ||
13 | |||
14 | $version = "1.0"; | ||
15 | |||
16 | require_once "opie-todo.inc"; | ||
17 | |||
18 | parse("opie-todo.xml"); | ||
19 | ?> | ||
20 | |||
21 | <table width="100%" border="0"> | ||
22 | <tr><td bgcolor="red"><div align="center">TODO</div></td><td bgcolor="#ffeeee"> | ||
23 | |||
24 | <?php echo printHtml($version,'todo') ?> | ||
25 | |||
26 | </td></tr> | ||
27 | |||
28 | <tr><td bgcolor="yellow"><div align="center">In Progress</div></td><td bgcolor="#ffffee"> | ||
29 | |||
30 | <?php echo printHtml($version,'inprogress') ?> | ||
31 | |||
32 | </td></tr> | ||
33 | |||
34 | <tr><td bgcolor="green"><div align="center">Finished</div></td><td bgcolor="#eeffee"> | ||
35 | |||
36 | <?php printHtml($version,'done') ?> | ||
37 | |||
38 | </td></tr> | ||
39 | </table> | ||
40 | |||
41 | <?php | ||
42 | if ($page) { | ||
43 | footer(); | ||
44 | } | ||
45 | |||
46 | ?> | ||
diff --git a/development/documents/opie-todo.inc b/development/documents/opie-todo.inc new file mode 100644 index 0000000..69b4baa --- a/dev/null +++ b/development/documents/opie-todo.inc | |||
@@ -0,0 +1,262 @@ | |||
1 | <?php | ||
2 | |||
3 | class KFeatures | ||
4 | { | ||
5 | var $type = 'kdefeatures'; | ||
6 | var $parentID = null; | ||
7 | var $children = array(); | ||
8 | |||
9 | function setParentID($id) | ||
10 | { | ||
11 | $this->parentID = $id; | ||
12 | } | ||
13 | function getParentID() | ||
14 | { | ||
15 | return $this->parentID; | ||
16 | } | ||
17 | function addChild(&$child) | ||
18 | { | ||
19 | $this->children[] = &$child; | ||
20 | } | ||
21 | function getHtml($target, $status) | ||
22 | { | ||
23 | $out = ''; | ||
24 | foreach ($this->children as $child) { | ||
25 | $out .= $child->getHtml($target, $status); | ||
26 | } | ||
27 | return $out; | ||
28 | } | ||
29 | |||
30 | } | ||
31 | |||
32 | class KCategory extends KFeatures | ||
33 | { | ||
34 | |||
35 | var $type = 'category'; | ||
36 | var $name = ''; | ||
37 | var $children = array(); | ||
38 | |||
39 | function KCategory($name) | ||
40 | { | ||
41 | $this->name = $name; | ||
42 | } | ||
43 | function getHtml($target, $status) | ||
44 | { | ||
45 | $out = ''; | ||
46 | foreach ($this->children as $child) { | ||
47 | $temp = $child->getHtml( $target, $status); | ||
48 | # don't display empty categories | ||
49 | if ($child->type == "category" && strlen($temp)) | ||
50 | { | ||
51 | $out .= sprintf("\t<li>%s\t</li>\n", $temp); | ||
52 | } else { | ||
53 | $out .= $temp; | ||
54 | } | ||
55 | } | ||
56 | if (strlen($out)) { | ||
57 | return sprintf("<h2>%s</h2>\n\t<ul>\n%s\t</ul>\n\n",$this->name,$out); | ||
58 | } | ||
59 | return ''; | ||
60 | } | ||
61 | } | ||
62 | |||
63 | class KFeature extends KFeatures | ||
64 | { | ||
65 | |||
66 | var $resp_name = array(); | ||
67 | var $resp_email = array(); | ||
68 | var $summary = ''; | ||
69 | var $status = ''; | ||
70 | var $target = ''; | ||
71 | var $type = 'feature'; | ||
72 | |||
73 | function KFeature($status, $target) | ||
74 | { | ||
75 | $this->status = $status; | ||
76 | $this->target = $target; | ||
77 | } | ||
78 | function getStatus() | ||
79 | { | ||
80 | return $this->status; | ||
81 | } | ||
82 | function getTarget() | ||
83 | { | ||
84 | return $this->target; | ||
85 | } | ||
86 | function setResponsible($name = null, $email = null) | ||
87 | { | ||
88 | $this->resp_name[] = $name; | ||
89 | $this->resp_email[] = $email; | ||
90 | } | ||
91 | function getResponsible() | ||
92 | { | ||
93 | # Nobody responsible? | ||
94 | if (count($this->resp_name) == 0) return ''; | ||
95 | |||
96 | $out = '<em>'; | ||
97 | for ($i = 0; $i < count($this->resp_name); $i++) { | ||
98 | if ($i > 0) $out .= ', '; | ||
99 | if ($this->resp_name[$i]) { | ||
100 | $out .= $this->resp_name[$i]; | ||
101 | } | ||
102 | if ($this->resp_name[$i] && $this->resp_email[$i]) $out .= " "; | ||
103 | if ($this->resp_email[$i]) { | ||
104 | $out .= '<'.$this->resp_email[$i].'>'; | ||
105 | } | ||
106 | } | ||
107 | $out .= '</em>'; | ||
108 | return $out; | ||
109 | } | ||
110 | function setSummary($summary) | ||
111 | { | ||
112 | $this->summary .= $summary.' '; | ||
113 | } | ||
114 | function getHtml($target, $status){ | ||
115 | if ($this->target == $target && $this->status == $status) { | ||
116 | return sprintf("\t\t<li>%s%s</li>\n",$this->summary,$this->getResponsible()); | ||
117 | } | ||
118 | return ''; | ||
119 | } | ||
120 | |||
121 | } | ||
122 | |||
123 | function startElement($parser, $name, $attrs) { | ||
124 | global $tags; | ||
125 | global $parentID; | ||
126 | |||
127 | global $insummary; | ||
128 | global $pcdata; | ||
129 | global $curtag; | ||
130 | |||
131 | switch ($name) { | ||
132 | case 'FEATURES': | ||
133 | $parentID = 0; | ||
134 | $obj = new KFeatures(); | ||
135 | $tags = array($obj); | ||
136 | |||
137 | $insummary = false; | ||
138 | $pcdata = ''; | ||
139 | $curtag = ''; | ||
140 | break; | ||
141 | case 'CATEGORY': | ||
142 | $obj = new KCategory($attrs['NAME']); | ||
143 | $obj->setParentID($parentID); | ||
144 | $tags[] = $obj; | ||
145 | $currentID = count($tags) - 1; | ||
146 | $tags[$parentID]->addChild($tags[$currentID]); | ||
147 | $parentID = $currentID; | ||
148 | |||
149 | break; | ||
150 | case 'FEATURE': | ||
151 | $obj = new KFeature($attrs['STATUS'], $attrs['TARGET']); | ||
152 | $obj->setParentID($parentID); | ||
153 | $tags[] = $obj; | ||
154 | $currentID = count($tags) - 1; | ||
155 | $tags[$parentID]->addChild($tags[$currentID]); | ||
156 | $parentID = $currentID; | ||
157 | break; | ||
158 | case 'RESPONSIBLE': | ||
159 | $n = count($tags) - 1; | ||
160 | $tags[$n]->setResponsible(@$attrs['NAME'], @$attrs['EMAIL']); | ||
161 | break; | ||
162 | case 'SUMMARY': | ||
163 | $insummary = true; | ||
164 | $pcdata = ''; | ||
165 | break; | ||
166 | default: | ||
167 | if (!$insummary) { | ||
168 | break; | ||
169 | } | ||
170 | $curtag = strtolower($name); | ||
171 | $att = ''; | ||
172 | foreach ($attrs as $k => $v) { | ||
173 | $att .= ' '.strtolower($k).'="'.$v.'"'; | ||
174 | } | ||
175 | |||
176 | $pcdata .= '<'.$curtag.$att.'>'; | ||
177 | break; | ||
178 | } | ||
179 | } | ||
180 | |||
181 | function endElement($parser, $name) { | ||
182 | global $parentID; | ||
183 | global $tags; | ||
184 | |||
185 | global $curtag; | ||
186 | global $pcdata; | ||
187 | global $insummary; | ||
188 | |||
189 | switch ($name) { | ||
190 | case "FEATURE": | ||
191 | $n = count($tags) - 1; | ||
192 | $parentID = $tags[$n]->getParentID(); | ||
193 | break; | ||
194 | case "CATEGORY": | ||
195 | $parentID = $tags[$parentID]->getParentID(); | ||
196 | break; | ||
197 | case "SUMMARY": | ||
198 | $n = count($tags) - 1; | ||
199 | $tags[$n]->setSummary($pcdata); | ||
200 | |||
201 | $insummary = false; | ||
202 | $pcdata = ''; | ||
203 | break; | ||
204 | default: | ||
205 | if ($insummary) { | ||
206 | $pcdata .= '</'.$curtag.'>'; | ||
207 | } | ||
208 | break; | ||
209 | } | ||
210 | } | ||
211 | |||
212 | function characterData($parser, $data) { | ||
213 | global $htmltag; | ||
214 | global $tags; | ||
215 | |||
216 | global $pcdata; | ||
217 | global $curtag; | ||
218 | global $insummary; | ||
219 | |||
220 | if (!$insummary) { | ||
221 | return; | ||
222 | } | ||
223 | $pcdata .= htmlspecialchars($data); | ||
224 | } | ||
225 | |||
226 | function parse( $file ) { | ||
227 | |||
228 | $xml_parser = xml_parser_create(); | ||
229 | |||
230 | xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); | ||
231 | xml_set_element_handler($xml_parser, "startElement", "endElement"); | ||
232 | xml_set_character_data_handler($xml_parser, "characterData"); | ||
233 | |||
234 | if (!($fp = fopen($file, "r"))) { | ||
235 | die("could not open XML input"); | ||
236 | } | ||
237 | |||
238 | |||
239 | while ($data = fread($fp, 4096)) { | ||
240 | if (!xml_parse($xml_parser, $data, feof($fp))) { | ||
241 | die(sprintf("XML error: %s at line %d", | ||
242 | xml_error_string(xml_get_error_code($xml_parser)), | ||
243 | xml_get_current_line_number($xml_parser))); | ||
244 | } | ||
245 | } | ||
246 | |||
247 | xml_parser_free($xml_parser); | ||
248 | } | ||
249 | |||
250 | |||
251 | |||
252 | function printHtml($target, $status) | ||
253 | { | ||
254 | global $tags; | ||
255 | if (!is_array($tags)) { | ||
256 | die('You must parse the xml file first with parse("filename.xml");'); | ||
257 | } | ||
258 | print($tags[0]->getHtml($target,$status)); | ||
259 | } | ||
260 | |||
261 | |||
262 | ?> | ||
diff --git a/development/documents/opie-todo.xml b/development/documents/opie-todo.xml new file mode 100644 index 0000000..8766e92 --- a/dev/null +++ b/development/documents/opie-todo.xml | |||
@@ -0,0 +1,59 @@ | |||
1 | <?xml version="1.0" encoding="iso-8859-1"?> | ||
2 | <!DOCTYPE features SYSTEM "opie.dtd"> | ||
3 | |||
4 | <!-- | ||
5 | |||
6 | This file serves as central repository of planned KDE features. It's parsed by | ||
7 | the PHP scripts in "features.inc" which are used by "kde-3.2-features.html" to | ||
8 | generate HTML versions for the web. | ||
9 | |||
10 | If you plan to add a feature to KDE please add it to this file. A feature can | ||
11 | have one of three status types: "todo", "inprogress", "done". Please update | ||
12 | the status from time to time. For a release there shouldn't be any features | ||
13 | with other states than "done". If you can't complete a feature for a release | ||
14 | please move the feature to the next release. The "target" attribute specifies | ||
15 | for which release the feature should be finished. At the moment only the value | ||
16 | "3.2" is evaluated, but we will add pages showing the features for later | ||
17 | versions as needed. | ||
18 | |||
19 | Each feature consists of a summary giving a short description what the feature is | ||
20 | about and one or more responsible persons. | ||
21 | |||
22 | A draft for a DTD of the features file can be found in "kde-features.dtd". Use | ||
23 | "xmllint -valid -noout kde-features.xml" to validate the xml file against the | ||
24 | DTD. If there are errors in the XML document they will be shown, if not the | ||
25 | command will not output anything. | ||
26 | |||
27 | If you have questions or comments please post them to the mailing list or contact | ||
28 | Cornelius Schumacher <schumacher@kde.org>. | ||
29 | |||
30 | --> | ||
31 | |||
32 | <features> | ||
33 | <category name="Documentation"> | ||
34 | <feature status="todo" target="1.0"> | ||
35 | <summary>Fix this file</summary> | ||
36 | <responsible name="Carsten Niehaus" email="cniehaus@handhelds.org" /> | ||
37 | </feature> | ||
38 | <feature status="done" target="1.0"> | ||
39 | <summary>add this file</summary> | ||
40 | <responsible name="Carsten Niehaus" email="cniehaus@handhelds.org" /> | ||
41 | </feature> | ||
42 | <feature status="todo" target="1.0"> | ||
43 | <summary>Datebook Recurrence Dialog not fully translated/translatable</summary> | ||
44 | </feature> | ||
45 | </category> | ||
46 | <category name="UI Bugs"> | ||
47 | <feature> | ||
48 | |||
49 | </feature> | ||
50 | </category> | ||
51 | <category name="HTML Documentation"> | ||
52 | <feature status="todo" target="1.0"> | ||
53 | <summary>A hell lot of Documentation is missing. Check help/en/html</summary> | ||
54 | </feature> | ||
55 | <feature status="todo" target="1.0"> | ||
56 | <summary>OSearch DOCU does refer to settings.html which should be osearch/settings.html</summary> | ||
57 | </feature> | ||
58 | </category> | ||
59 | </features> | ||
diff --git a/development/documents/opie.dtd b/development/documents/opie.dtd new file mode 100644 index 0000000..3ed436b --- a/dev/null +++ b/development/documents/opie.dtd | |||
@@ -0,0 +1,24 @@ | |||
1 | |||
2 | <!ELEMENT features (category+)> | ||
3 | |||
4 | <!ELEMENT category (feature|category)*> | ||
5 | <!ATTLIST category name CDATA #REQUIRED > | ||
6 | |||
7 | <!ELEMENT feature (summary?,responsible*)> | ||
8 | <!ATTLIST feature status (inprogress|todo|done) "todo" | ||
9 | target CDATA #REQUIRED> | ||
10 | |||
11 | <!ELEMENT responsible EMPTY> | ||
12 | <!ATTLIST responsible name CDATA #IMPLIED | ||
13 | email CDATA #IMPLIED> | ||
14 | |||
15 | <!ELEMENT summary (#PCDATA|i|a|b|em|strong)*> | ||
16 | |||
17 | <!ELEMENT i (#PCDATA)> | ||
18 | <!ELEMENT b (#PCDATA)> | ||
19 | <!ELEMENT em (#PCDATA)> | ||
20 | <!ELEMENT strong (#PCDATA)> | ||
21 | |||
22 | <!ELEMENT a (#PCDATA)> | ||
23 | <!ATTLIST a href CDATA #IMPLIED> | ||
24 | <!ATTLIST a title CDATA #IMPLIED> | ||