2011-06-25 20:59:50 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
2013-02-09 22:46:15 +00:00
|
|
|
source /mod/webif/lib/setup
|
|
|
|
require ts.class
|
2011-06-25 20:59:50 +00:00
|
|
|
|
2013-02-09 22:46:15 +00:00
|
|
|
httpheader "application/json"
|
2011-06-25 20:59:50 +00:00
|
|
|
|
2013-02-09 22:46:15 +00:00
|
|
|
set file [cgi_get file]
|
|
|
|
if {$file == 0} exit
|
2011-06-25 20:59:50 +00:00
|
|
|
set ts [ts fetch $file]
|
|
|
|
|
|
|
|
puts "{"
|
|
|
|
puts "\"title\" : \"[$ts get title]\","
|
2012-11-18 12:07:53 +00:00
|
|
|
puts "\"synopsis\" : \"[$ts get synopsis]\","
|
2013-01-06 23:50:39 +00:00
|
|
|
puts "\"guidance\" : \"[$ts get guidance]\","
|
|
|
|
puts "\"genre\" : [$ts get genre]"
|
2011-06-25 20:59:50 +00:00
|
|
|
puts "}"
|
|
|
|
|