#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require ts.class pretty_size
header
cgi_input 1
#cgi_dump
puts "
Drag the files below into order, enter a name for the resulting file and then
click the Join button.
"
puts "
"
set esize 0
foreach file [split [cgi_get files] ","] {
set file [cgi_unquote_input $file]
set dir [file dirname $file]
set ts [ts fetch $file]
puts "-
$file ([clock format [$ts duration 1] -format "%T"])
\[[pretty_size [$ts size]]\]
[$ts get title]
"
incr esize [$ts size]
}
puts "
"
puts "
Name for joined file:
Joining:
"
footer