import n_gram
import os
import os.path
+import re
import time
import optparse
import sys
def veryfySize(path):
#vsize=[297,497,596,1196]#SD 30m 1h 1.5h 2h
- vsize=[295,591,830]
+ vsize=[245,275,295,591,830]
vsize=vsize+[325,560,590,860]
#vsize=vsize+[458,916]#HD 30m 1h
#vsize=vsize+[381,895,447]
shutil.move(srcpath, destpath)
#shutil.copy(srcpath, destpath)
delpath=[os.path.join(temppath,title+".ts")]
+ delpath.append(os.path.join(temppath,title+".avi"))
delpath.append(os.path.join(temppath,title+".ts.b25"))
delpath.append(os.path.join(temppath,title+".ts.tsmix"))
delpath.append(os.path.join(temppath,title+".ts.log"))
return title
def detName(path,title):
- ""
-
+ """
+ type A ---title#<number>
+ type B ---title#<number>subtitle
+ type C ---title subtitle
+ type D ---title(without number)
+ """
+ #if re.match("#\d\s[0,10]\z|#[0-9]\s[0,10]\z", title)
+ # print "typeA"
+ #elif re.match("#\d\s[0,10].|#[0-9]\s[0,10].", title)
+ # print "typeB"
+
+def detNameType(title):
+ """
+ type A ---title#<number>
+ type B ---title#<number>subtitle
+ type C ---title subtitle
+ type D ---title(without number)
+ """
+ print title
+ #rA=re.compile(".+(?P<title>)#\d(?P<num>)\s[0,10]\z")
+ rA=re.compile("(.+)#(\d*)\s*\Z")
+ tA=rA.match(title)
+ rB=re.compile("(.+)#(\d*)\s*(\D*)")
+ tB=rB.match(title)
+ if tA:
+ print "typeA"
+ print "title="+tA.group(1)
+ print "num="+tA.group(2)
+ elif tB:
+ print "typeB"
+ print "title="+tB.group(1)
+ print "num="+tB.group(2)
+ print "subtitle="+tB.group(3)
if __name__ == "__main__":
usage="usage: %prog read -h"
version="%prog 0.7.0beta1"
--- /dev/null
+#!/usr/bin/python
+# coding: UTF-8
+# Rec10 TS Recording Tools
+# Copyright (C) 2009 Yukikaze
+import rec10d
+import configreader
+import os
+__author__="yukikaze"
+__date__ ="$2009/10/10 14:12:05$"
+path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
+tmppath = path
+if __name__ == "__main__":
+ print "EMM Refresh script ver 0.8.0";
+ ch=rec10d.rec10db.select_all_chdata()
+ chl=[]
+ for cht in ch:
+ chl.append(cht[3])
+ chl=list(set(chl))
+ for chtt in chl:
+ emmp=os.path.join(tmppath,"emm.ts.b25")
+ emmp2=os.path.join(tmppath,"emm.ts")
+ exect1=configreader.getpath('recpt1')+" "+chtt+" 10 "+emmp
+ exect2=configreader.getpath('b25')+" -m 1 "+emmp+" "+emmp2
+ print exect1
+ os.system(exect1)
+ print exect2
+ os.system(exect2)
+
\ No newline at end of file
import chdb
import checker
import configreader
+import classify
import epgdb
import rec10d
import recdb
__author__ = "yukikaze"
__date__ = "$2009/08/01 22:25:13$"
path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
-recpath = "/home/ftpusr/ftp3/Recording/"
+recpath = "/home/ftpusr/ftp-tmp/Recording/"
ftpusr = "/home/ftpusr/ftp-tmp"
dualtest = ftpusr + "/Encode-Test/DualAudioTest"
if __name__ == "__main__":
#print rec10d.rec10db.select_all_status()
#print str(status.getBSCSRecording())
#print str(status.getTERecording())
- xml2db.xml2db("te18.xml", "te20")
+ #xml2db.xml2db("te18.xml", "te20")
+ #classify.detNameType("te#st#25")
+ #classify.detNameType("te#st#32 subtest")
""
\ No newline at end of file