Hong Kong MUG

From MythTV Official Wiki
Jump to: navigation, search

HK MythTV User Group


TV schedules

There isn't a native xmltv grabber for HK. Nor is there a linux program that does it. However there is a schedule grabber called TVxb that can do it. http://www.tvxb.com

TVxb is a windows program but can be run in linux through wine. To use it, grab the apropriate INI file from the website then:

wine TVxb.exe -NoConsole

mythfilldatabase --file 1 -1 /path/to/output.xml

Other options: (using php + cron) 1. Download all file from http://www.akbkhome.com/svn/akpear/XML_Tv/

    (Tv.php, hongkong.ini, newatv.ini, newatvhome.ini, newtvb.ini) and copy it into same folder

2. make script called filltv

    #!/bin/sh
    /usr/bin/php Tv.php hongkong.ini > /tmp/hongkong.xml
    /usr/bin/mythfilldatabase --file 1 1 /tmp/hongkong.xml

3. If using mythTV version 0.21, please change last script to

    /usr/bin/mythfilldatabase --file 1 /tmp/hongkong.xml

4. Make script executable

    > chmod +x filltv

5. Make a weekly cronjob { i.e. copy it into /etc/cron.weekly/filltv }


[2009-01-12] updated

since TVB site is changed a little, the Tv.php and hongkong.ini is updated.

hongong.ini

    [tvbjade.hk]
    name=TVB Jade
    ;icon=http://www.tvb.com/sitecommon/images/tvb_logo.gif;
    url="http://schedule.tvb.com/jade/%Y%m%d.html?all"
    downloadmethod=force
    lang=zh-yue
    splitoffdescription="position=52,pattern=.,:,%2C,*"
    titlelclip="Movie of the Month:,Science Minutes /,Special:,Blockbuster:,Presents:,PRESENTS:,SPECIAL:,BLOCKBUSTER:,Pearl Mini Saga:,ONLINE /,International Attractions:,Mega Movie:,PRESENT:,The CEO  Connection,The CEP Connection,Show : ,Late Late Show:,And the Award Goes To:"
    titlerclip="(ES,(PG,(S),(M,(V,(rerun,(Eng"
    special=fulldescriptions
    descriptionhtmlend="<a name="
    descriptionhours=weekends+0000-2359
    encoding="UTF-8"
    htmlparsetype = Table
    htmlstart = ""
    htmlend = ""
    htmlcols = hour,description

Tv.php - add inside toTitle function

       $title = trim($title, '/');
       $title = trim($title);
       //printf("test==>".$title."\n");
       if (strpos($title,">>")) {
          $ddd = preg_split("/>>/",$title);
          $title = $ddd[0];
       }
       $title = trim($title);

[end of 2009-01-12]


For a complete tutorial on how to set up TVxb with MythTV, go here: TVxb