Firstly, thank you so much! I was in the process of building my own box to replace my old Hummy 9200T but the hummy died yesterday before my homebrew box was ready. Found this thread today & pretty much went straight out to buy a HDR-FOXT2! One thing I really wanted to be able to do was to schedule recordings from the web but I didnt consider that off-the-shelf systems (with a little modding) might be able to do this until today.
Anyway, the disk info script wasnt working for me - I think its cause I dont have many recordings so have <100GB used which changes the array indexes of the split df output. So, I've added a regexp to remove multiple spaces & fixed up the indexes. Also, it was looking for ...00.png for the pie chart image file which doesnt exist so I changed it to use fiels 1..25 instead of 0..25. My diskspace.jim is now:
I did some tcl about 6 years ago at uni - hopefully Ive done it right & its useful (works on my box at least ).
Regarding scheduling from the web - Ive found the epg data (/mnt/hd1/dvbepg/epg.dat), any ideas what format it is? Ive tried running it through the GNUWin32 version of file but it just says its 'data'. I think it's encoded with the length(data) as 1 byte followed by the actual data, Ill try to decode that some more tomorrow.
Thanks again,
Nick
Anyway, the disk info script wasnt working for me - I think its cause I dont have many recordings so have <100GB used which changes the array indexes of the split df output. So, I've added a regexp to remove multiple spaces & fixed up the indexes. Also, it was looking for ...00.png for the pie chart image file which doesnt exist so I changed it to use fiels 1..25 instead of 0..25. My diskspace.jim is now:
Code:
#!/mod/bin/jimsh
foreach df [split [exec df -h] "\n\r"] {
if [string match *sda2* $df] {
regsub -all -- {[[:space:]]+} $df " " df
set fields [split $df]
set size [lindex $fields 1]
set used [lindex $fields 2]
set perc [string trimright [lindex $fields 4] "%"]
}
}
set file [format "%02d" [expr {$perc * 25 / 100 + 1}]]
puts "<div style=\"float: right; background:url('/images/345_1_27_ST_USB_BG.png')\">"
puts "<img src=/images/345_2_14_ST_HDD_$file.png>"
puts "</div>"
puts "<span style=\"float: right\">"
puts "<br>"
puts "Total space: $size<br>"
puts "Used: $used ($perc%)"
puts "</span>"
Regarding scheduling from the web - Ive found the epg data (/mnt/hd1/dvbepg/epg.dat), any ideas what format it is? Ive tried running it through the GNUWin32 version of file but it just says its 'data'. I think it's encoded with the length(data) as 1 byte followed by the actual data, Ill try to decode that some more tomorrow.
Thanks again,
Nick