#!/usr/bin/perl # # # Anime recording system foltia # http://www.dcc-jpl.com/soft/foltia/ # # # チャンネルスキャン # 初期インストール時に受信可能局をスキャンします # # DCC-JPL Japan/foltia project # #use DBI; #use DBD::Pg; #use DBD::SQLite; #use Schedule::At; #use Time::Local; #use Jcode; #$path = $0; #$path =~ s/channelscan.pl$//i; #if ($path ne "./"){ #push( @INC, "$path"); #} #require "foltialib.pl"; my $recpt1path = "/home/foltia/perl/tool/recpt1"; #ほかのキャプチャデバイス作ってる人はココを変更 my $epgdumppath = "/home/foltia/perl/tool"; #epgdumpのあるディレクトリ my $recfolderpath = "/home/foltia/php/tv";#tsを出力するディレクトリ my $xmloutpath = "/tmp"; my $channel = 13 ; #地デジチャンネルは13-62 my $oserr = ""; my $line = ""; print "Initialize\n"; print "Tool path are\n"; print "REC:$recpt1path\n"; print "EPGDUMP:$epgdumppath/epgdump\n"; print "TS OUT:$recfolderpath/\n"; print "XML OUT:$xmloutpath/\n"; #ツールがあるか確認 unless (-e "$recpt1path"){ print "Please install $recpt1path.\n"; exit 1; } unless (-e "$epgdumppath/epgdump"){ print "Please install $epgdumppath/epgdump.\n"; exit 1; } unless (-e "$recfolderpath"){ print "Please make directory $recfolderpath.\n"; exit 1; } unless (-e "$xmloutpath"){ print "Please make directory $xmloutpath.\n"; exit 1; } #地デジスキャンループ for ($channel = 13; $channel <= 62 ; $channel++){ print "\nChannel: $channel\n"; $oserr = `$recpt1path $channel 4 $recfolderpath/__$channel.m2t`; $oserr = `$epgdumppath/epgdump $channel $recfolderpath/__$channel.m2t $xmloutpath/__$channel-epg.xml`; if (-s "$xmloutpath/__$channel-epg.xml" ){ print "\t\t This channel can view : $channel \n"; open(XML, "< $xmloutpath/__$channel-epg.xml"); while ( $line = ) { #Jcode::convert(\$line,'euc','utf8'); if($line =~ ///g; #Jcode::convert(\$line,'utf8','euc'); print "\t\t $channel $line\n"; }#end if }#end while close(XML); }else{ print "\t\t Not Available : $channel \n"; }#end if }#end for #BSデジタル $channel = 211; print "\nBS Digital Scan\n"; $oserr = `$recpt1path $channel 4 $recfolderpath/__$channel.m2t`; $oserr = `$epgdumppath/epgdump /BS $recfolderpath/__$channel.m2t $xmloutpath/__$channel-epg.xml`; if (-s "$xmloutpath/__$channel-epg.xml" ){ print "\t\t BS Digital can view : \n"; open(XML, "< $xmloutpath/__$channel-epg.xml"); while ( $line = ) { #Jcode::convert(\$line,'euc','utf8'); if($line =~ ///g; #Jcode::convert(\$line,'utf8','euc'); print "\t\t $line\n"; }#end if }#end while close(XML); }else{ print "\t\t Not Available : BS Digital \n"; }#end if # # NHK BS1 # # # NHK BS2 # # # NHK BSh # # # BS日テレ # # # BS朝日 # # # BS-TBS # # # BSジャパン # # # BSフジ # # # WOWOW # # # WOWOW2 # # # WOWOW3 # # # スター・チャンネル # # # BS11 # # # TwellV # # #CSデジタル $channel = "CS8"; print "\nCS Digital Scan\n"; $oserr = `$recpt1path $channel 4 $recfolderpath/__$channel.m2t`; $oserr = `$epgdumppath/epgdump /CS $recfolderpath/__$channel.m2t $xmloutpath/__$channel-epg.xml`; if (-s "$xmloutpath/__$channel-epg.xml" ){ print "\t\t CS Digital can view : \n"; open(XML, "< $xmloutpath/__$channel-epg.xml"); while ( $line = ) { #Jcode::convert(\$line,'euc','utf8'); if($line =~ ///g; #Jcode::convert(\$line,'utf8','euc'); print "\t\t $line\n"; }#end if }#end while close(XML); }else{ print "\t\t Not Available : CS Digital \n"; }#end if # # スターchプラス # # # 日本映画専門chHD # # # フジテレビCSHD # # # ショップチャンネル # # # ザ・シネマ # # # スカチャンHD800 # # # スカチャン801 # # # スカチャン802 # # # e2プロモ # # # インターローカルTV # # # Jスポーツ ESPN # # # FOX # # # スペースシャワーTV # # # カートゥーン ネット # # # トゥーン・ディズニー # # # 東映チャンネル # # # 衛星劇場 # # # チャンネルNECO # # # 洋画★シネフィル # # # スター・クラシック # # # 時代劇専門チャンネル # # # スーパードラマ # # # AXN # # # ナショジオチャンネル # # # ワンテンポータル # # # ゴルフチャンネル # # # テレ朝チャンネル # # # MTV # # # ミュージック・エア # # # 朝日ニュースター # # # BBCワールド # # # CNNj # # # ジャスト・アイ # # # Jスポーツ 1 # # # Jスポーツ 2 # # # JスポーツPlusH # # # GAORA # # # sky・Aスポーツ+ # # # 宝塚プロモチャンネル # # # SKY・STAGE # # # チャンネル銀河 # # # AT-X # # # ヒストリーチャンネル # # # スカチャン803 # # # スカチャン804 # # # ムービープラスHD # # # ゴルフネットワーク # # # LaLa HD # # # フジテレビ739 # # # フジテレビ721 # # # アニマックス # # # ディスカバリー # # # アニマルプラネット # # # C-TBSウエルカム # # # QVC # # # プライム365.TV # # # ファミリー劇場 # # # TBSチャンネル # # # ディズニーチャンネル # # # MUSIC ON! TV # # # キッズステーション # # # TBSニュースバード # # # CS日本番組ガイド # # # 日テレG+ # # # fashion TV # # # 日テレプラス # # # エコミュージックTV # # # Music Japan TV # # # 日テレNEWS24 # #CATV # /home/foltia/perl/tool/recpt1 --b25 C13 10 /home/foltia/php/tv/__C13.m2t # /home/foltia/perl/tool/epgdump /CS /home/foltia/php/tv/__C13.m2t /tmp/__C13-epg.xml