#!/usr/bin/python
# coding: UTF-8
# Rec10 TS Recording Tools
# Copyright (C) 2009 Yukikaze
#import sys
#import os
#import datetime
import rec10d
import os
#import time
import n_gram
import profile
import epgdb
#import status
#import chdb
#import checker
#import configreader
#import classify
#import epgdb
#import rec10d
#import recdb
#from ts2x264 import ts2x264
#import tv2avi
#import xml2db
#import guess
import zenhan
import auto_process
__author__ = "yukikaze"
__date__ = "$2009/08/01 22:25:13$"
path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
recpath = "/home/ftpusr/ftp-tmp/Recording/"
ftpusr = "/home/ftpusr/ftp-tmp"
recordedpath = "/home/ftpusr/ftp5/Series-Finish/"
dualtest = ftpusr + "/Encode-Test/DualAudioTest"
if __name__ == "__main__":
    #d=time.time()#
    #tspath=basepath.replace(".b25","")
    #print checker.checkB25Decode(recpath+basepath,recpath+tspath)
    #print configreader.getdbpath("test")
    #epgdb.updateall_bak()
    #import rectime data from SQLite to MySQL
    #rec10d.rec10db.import_from_SQLite(path+"ch.db")
    #tnow=datetime.datetime.now()
    #bt=tnow+datetime.timedelta(seconds=20)
    #et=bt+datetime.timedelta(seconds=20)
    #btime=bt.strftime("%Y-%m-%d %H:%M:%S")
    #etime=et.strftime("%Y-%m-%d %H:%M:%S")
    #recdb.rec_reckey(recdb.REC_FINAL_RESERVE,u"テスト", "hisch", btime, etime, "Sd")
    #os.system("echo $PATH")
    #tv2avi.dualaudio2sep(recpath+".ts", recpath+".sa.avi","167")
    #ts2x264(dualtest + "/new-test/new-delay167sa.avi", dualtest + "/new-test/new-delay167.avi", "SX")
    #status.setB25Decoding(2)
    #rec10d.rec10db.new_status()
    #status.changeBSCSRecording(1)
    #print rec10d.rec10db.select_all_status()
    #status.changeBSCSRecording(-1)
    #print rec10d.rec10db.select_all_status()
    #print str(status.getBSCSRecording())
    #print str(status.getTERecording())
    #xml2db.xml2db("te18.xml", "te20")
    #classify.detNameType("te#st#25")
    #classify.detNameType("te#st#32 subtest")
    #guess.detNameType("",recordedpath)")
    #doexe = configreader.getpath("tssplitter") + " \"" + "" + "\" \"" + "pout""" + "\" " + str(0)
    #doexe = "nice -n 18 " + doexe
    #print doexe
    #print zenhan.check_Character_Type()
    #auto_process.Update_to_MP4("")
    #rec10d.rec10db.add_recjbk("畑健二郎")
    ""