if you search in the HTML code for the remark "FUNCTIONS THAT IMPORT DATA" you will see immediately after, a funnction that is called getcluinfo(). This sets up a CLU database - akin to the CLU information in Prevue Guide. It requests 4 files from the webserver (location of which is changable by changing the variable cgiprefix earlier in the code)
these are just perl scripts on the webserver that return plain text. You can call them directly in your webbrowser if you like to see what they produce.
the main javascript requests the following:-
/cgi-bin/pgweb/list.pl?mode=channel&selectcode=GA24005
this returns a list of channel numbers, one per line
/cgi-bin/pgweb/list.pl?mode=source&selectcode=GA24005
this returns a list of source IDs to identify a channel uniquely (akin to the SOURCE in Prevue Guide) I
/cgi-bin/pgweb/list.pl?mode=callltrs&selectcode=GA24005
the same, but returns the callltrs for the channel - these are what's displayed - again just like Prevue Guide
and finally
/cgi-bin/pgweb/list.pl?mode=type&selectcode=GA24005
this lists the type of data in each row. at the moment I think only ch is supported - for channel..
these files are served by a single peice of perl code that imports a single text file that looks like this....
ch|1|BBC1NW|BBC 1
ch|2|BBC2NW|BBC 2
ch|3|ITVGRN|ITV 1
ch|4|CH4___|Ch 4
ch|5|FIVE__|Five
ch|6|ITV2__|ITV 2
ch|7|BBC3__|BBC 3
...
etc
--
then there is a function called getprogrammeinfo() this does a similar thing.
It requests /pgweb/curday.txt from the webserver. Again the location of this can be changed as you see fit, and also generated on the webserver how you see fit. This is again just a text file with the SOURCE letters as the first 6 chars, then a 3 char timeslot which is similar but definitely yet not the same as Prevue guide. There are 3x 48 timeslots 001 to 144. 1-48 are for yesterday, 49-96 for today and 97-144 for tomorrow. This lets PGweb figure out where and when to put << and >> arrows for programmes that push over the day boundary (I can't figure out how Prevue Guide did it - perhaps it didn't!)
--
SO
To set up the simulator with your own files, create a text file for list.pl like the one above with the channels you want, and then a curday.dat with the programme information, and have your webserver serve them out. I did post all the code in a thread in this forum, should be quite easy to get up and working. There is a lot more notes in a couple of text files in the archive which tell you how the code works. However you can totally replace all the code that generates the text files with your own better code if you want. As long as the text files end up in that format, PGweb will read them.
...or use the other scripts I provided too...
To get the information from a standard mythtv install, first ensure you can serve straightforward perl CGI pages from the box. Then install get_info.pl onto the webserver of the myth box. Change the password in the script to your mythtv SQL database password. Again the NOTES.txt file in the archive covers what to do.
Then install the scripts folder on the webserver, it will fetch the full channels and programmes databases from the myth box, parse the contents and save a curday.txt. change bits of the script to do the web request from your myth box and to save the resulting curday.txt in your webserver directory. Put the script in as a cron or scheduled task to run every few hours if you like.
I'd be really interested if you get it working!!
I'd love to spend more time on this soon, maybe I'll get chance!!