Posted to tcl by hypnotoad at Tue Jun 18 19:45:46 GMT 2019view raw

  1. proc ::iliad::listing {object prefix path} {
  2. set UL [$object tag UL]
  3. foreach file [lsort -dictionary [glob -nocomplain [file join $path *]]] {
  4. set fname [file rootname [file tail $file]]
  5. if {$fname eq "index"} continue
  6. set title [string totitle $fname]
  7. [$UL tag LI] tag A href ${prefix}/[file tail $file] content $title
  8. }
  9. }