#!/mod/bin/jimsh package require cgi source /mod/var/mongoose/lib/setup require epg.class spinner.class altrow puts "Content-Type: text/html" puts "" header [spinner new { text "Loading EPG Data..." size "1.2em" style "margin: 1em;" }] start cgi_input #cgi_dump require epg_popup set service 0 set service 4351 catch { set service [dict get $_cgi service] } set records [epg fetch dump -service $service] set tr [lindex $records 0] $tr get_channel_info set channel_num [$tr get channel_num] set channel_name [$tr get channel_name] puts "
[$tr channel_icon 80 {vertical-align:middle}] $channel_num - $channel_name
" puts { } set i 0 foreach record $records { altrow if {[$record showing]} { puts "" } else { puts "" } puts "" puts "" puts [$record cell] puts "" puts "" puts "" } puts "
Date Time Programme Synopsis
[clock format [$record get start] -format "%a %d %b %Y"] [clock format [$record get start] -format "%H:%M"][$record get text][$record get warning]
" epg cleanup footer