Subversion Repositories Koakuma

Rev

Rev 27 | Rev 29 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27 Rev 28
Line 1... Line 1...
1
#!/usr/bin/env tclsh
1
#!/usr/bin/env tclsh
2
# $Id: koakuma.cgi.in 27 2024-10-02 08:24:48Z nishi $
2
# $Id: koakuma.cgi.in 28 2024-10-02 08:44:00Z nishi $
3
 
3
 
4
set KOAKUMA_VERSION "1.00"
4
set KOAKUMA_VERSION "1.00"
5
set components ""
5
set components ""
6
 
6
 
7
chan configure stdout -buffering none
7
chan configure stdout -buffering none
Line 275... Line 275...
275
		rputs	"		<div id=\"doc-notoc\">"
275
		rputs	"		<div id=\"doc-notoc\">"
276
	}
276
	}
277
	rputs	"			<h1>$title</h1>"
277
	rputs	"			<h1>$title</h1>"
278
}
278
}
279
proc end_html {has_toc} {
279
proc end_html {has_toc} {
280
	global KOAKUMA_VERSION
280
	global KOAKUMA_VERSION toc
281
	rputs	"		</div>"
281
	rputs	"		</div>"
-
 
282
	rputs	"		<div id=\"clearfix\"></div>"
282
	rputs	"		<hr>"
283
	rputs	"		<hr>"
283
	rputs	"		<i>Powered by <a href=\"http://nishi.boats/koakuma\">Koakuma</a> $KOAKUMA_VERSION</i>"
284
	rputs	"		<i>Powered by <a href=\"http://nishi.boats/koakuma\">Koakuma</a> $KOAKUMA_VERSION</i>"
284
	rputs	"	</body>"
285
	rputs	"	</body>"
285
	rputs	"</html>"
286
	rputs	"</html>"
286
}
287
}
Line 309... Line 310...
309
			exiting 0
310
			exiting 0
310
		}
311
		}
311
		rputs "Content-Type: text/html"
312
		rputs "Content-Type: text/html"
312
	}
313
	}
313
	if { "$path" == "/" } {
314
	if { "$path" == "/" } {
-
 
315
		set has_projects 0
-
 
316
		add_toc "Projects"
-
 
317
		open_projects
-
 
318
		scan_projects {
-
 
319
			upvar 1 has_projects has_projects
-
 
320
			if { "$has_projects" == "0" } {
-
 
321
				set has_projects 1
-
 
322
				tputs	"<table border=\"0\">"
-
 
323
			}
-
 
324
			tputs	"<tr>"
-
 
325
			tputs	"	<th><a href=\"/koakuma/project/$name\">$name</a></th>"
-
 
326
			tputs	"	<td>[html_escape "$description"]</td>"
-
 
327
			tputs	"</tr>"
-
 
328
		}
-
 
329
		close_projects
-
 
330
		if { "$has_projects" == "1" } {
-
 
331
			tputs	"</table>"
-
 
332
		} else {
-
 
333
			tputs	"No projects have been added, yet."
-
 
334
		}
314
		add_toc "Tcl Information"
335
		add_toc "Tcl Information"
315
		tputs	"<table border=\"0\">"
336
		tputs	"<table border=\"0\">"
316
		tputs	"	<tr>"
337
		tputs	"	<tr>"
317
		tputs	"		<th>"
338
		tputs	"		<th>"
318
		tputs	"			Version"
339
		tputs	"			Version"
Line 346... Line 367...
346
		tputs	"		</td>"
367
		tputs	"		</td>"
347
		tputs	"	</tr>"
368
		tputs	"	</tr>"
348
		tputs	"</table>"
369
		tputs	"</table>"
349
		add_toc "Components"
370
		add_toc "Components"
350
		loop_components {
371
		loop_components {
351
			add_toc2 "${name} (${genre} component)"
372
			add_toc2 "${name} (${genre})"
352
			if { [llength [info procs "${name}_info"]] > 0 } {
373
			if { [llength [info procs "${name}_info"]] > 0 } {
353
				${name}_info
374
				${name}_info
354
			}
375
			}
355
		}
376
		}
356
		set has_projects 0
-
 
357
		add_toc "Projects"
-
 
358
		open_projects
-
 
359
		scan_projects {
-
 
360
			upvar 1 has_projects has_projects
-
 
361
			if { "$has_projects" == "0" } {
-
 
362
				set has_projects 1
-
 
363
				tputs	"<table border=\"0\">"
-
 
364
			}
-
 
365
			tputs	"<tr>"
-
 
366
			tputs	"	<th><a href=\"/koakuma/project/$name\">$name</a></th>"
-
 
367
			tputs	"	<td>[html_escape "$description"]</td>"
-
 
368
			tputs	"</tr>"
-
 
369
		}
-
 
370
		close_projects
-
 
371
		if { "$has_projects" == "1" } {
-
 
372
			tputs	"</table>"
-
 
373
		} else {
-
 
374
			tputs	"No projects have been added, yet."
-
 
375
		}
-
 
376
 
377
 
377
		rputs ""
378
		rputs ""
378
		start_html "Main" 1
379
		start_html "Main" 1
379
		rputs "$content"
380
		rputs "$content"
380
		end_html 1
381
		end_html 1