--- /dev/null
+#!/usr/bin/python\r
+# coding: UTF-8\r
+# Rec10 TS Recording Tools\r
+# Copyright (C) 2009-2011 Yukikaze\r
+import os.path\r
+import configreader\r
+import xml.dom.minidom\r
+import scan_ch\r
+import datetime\r
+\r
+import rec10d\r
+\r
+path = str(os.path.dirname(os.path.abspath(__file__))) + "/"\r
+\r
+def chAdd(bctype, chtxt, ch, csch):#すべて文字列\r
+ tnow=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")\r
+ rec10d.rec10db.add_epg_ch(bctype,chtxt, ch, csch, u"2010-01-01 00:00:00",u"2010-01-01 00:00:00",tnow)\r
+def addCHlist(cl):\r
+ if len(cl)>0:\r
+ for c in cl:\r
+ chAdd(c[0],c[1],c[2],c[3])\r
+def getChList(xmlpath):\r
+ dom=xml.dom.minidom.parse(file(xmlpath))\r
+ chlist=[]\r
+ for ch in dom.getElementsByTagName('channel'):\r
+ bctype=ch.getAttribute("bctype")\r
+ chd=ch.getAttribute("ch")\r
+ csch=ch.getAttribute("csch")\r
+ chtxt=ch.getAttribute("chtxt")\r
+ ontv=ch.getAttribute("ontvcode")\r
+ chlist.append([bctype,ontv,chtxt,chd,csch])\r
+ return chlist\r
+def deleteChListALL():\r
+ rec10d.rec10db.new_epg_ch()\r
+if __name__ == "__main__":\r
+ deleteChListALL()\r
+ scan_ch.searchCh()\r