From: yukikaze Date: Sat, 23 Mar 2013 02:49:23 +0000 (+0900) Subject: remove old programs X-Git-Url: http://git.osdn.net/view?p=rec10%2Frec10-git.git;a=commitdiff_plain;h=ba2e1c2dfffe2d12bba9915837170029b28164b2;ds=sidebyside remove old programs --- diff --git a/Rec10WEB/trunk/src/fin.htm b/Rec10WEB/trunk/src/fin.htm deleted file mode 100644 index a25c12d..0000000 --- a/Rec10WEB/trunk/src/fin.htm +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - Rec10 Simple Web Interface ver.0.9.0 - - -

Rec10 Simple Web Interface ver.0.9.0


-
- - 予約が終了しました。移動します。 - - diff --git a/Rec10WEB/trunk/src/iepg_add.htm b/Rec10WEB/trunk/src/iepg_add.htm deleted file mode 100644 index 7277b3f..0000000 --- a/Rec10WEB/trunk/src/iepg_add.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - Rec10 Simple Web Interface ver.0.9.1 iEPGデータ追加 - - - - - - -
-

Rec10 Simple Web Interface ver.0.9.1 iEPGデータ追加


- - -
追加
-
-
-
- - diff --git a/Rec10WEB/trunk/src/iepg_show.htm b/Rec10WEB/trunk/src/iepg_show.htm deleted file mode 100644 index df7f8b6..0000000 --- a/Rec10WEB/trunk/src/iepg_show.htm +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - Rec10 Simple Web Interface ver.0.9.1 iEPGデータ表示 - - - - - - -
-

Rec10 Simple Web Interface ver.0.9.1 iEPGデータ表示


- - - - - - - - -
IDチャンネルchtxt
-
DEL
-
-
- -
- - diff --git a/Rec10WEB/trunk/src/readme.txt b/Rec10WEB/trunk/src/readme.txt deleted file mode 100644 index c5ceab1..0000000 --- a/Rec10WEB/trunk/src/readme.txt +++ /dev/null @@ -1,60 +0,0 @@ -rec10web - -Rec10Web is Web Interface for Rec10 -Copyright (C) 2009 Yukikaze - -rec10webはrec10の録画予約をweb上から行うために作られた補助ツールです。 -rec10web.pyと同じフォルダ内にrec10が作ったconfig.iniへのリンクを張ってください。 -表示にはDojoが必要です。Dojoを設置した上でrswi.htmのdojo関連のパスを書き換えてください。 -LicenseはLGPL v3に準拠します -yukikaze - -dbMySQLパッケージおよびpython2.4以上が必要です。 - - -同梱のdojoToolkitはBSDライセンスであり、本文の最後に記載されたライセンスに従い再配布が可能です。 - -history -0.9.0 -avi2mp4機能追加 -キーワード機能の追加 -0.8.0 -SQLiteのサポート終了。 -大幅な仕様変更 - -0.6.0 -データーベースにMySQLサポートを追加 -Rec10WEBのみpython2.4以上で動作するように - -0.4.1a -曜日検索ができるようになった - -dojo ライセンス -The "New" BSD License: -********************** - -Copyright (c) 2005-2009, The Dojo Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Rec10WEB/trunk/src/rec10web.py b/Rec10WEB/trunk/src/rec10web.py deleted file mode 100644 index 8e2f93f..0000000 --- a/Rec10WEB/trunk/src/rec10web.py +++ /dev/null @@ -1,521 +0,0 @@ -#!/usr/bin/python -# coding: UTF-8 -# Rec10 TS Recording Tools -# Copyright (C) 2009 Yukikaze -import cgi -import cgitb -import rec10web_dbMySQL -import os -import os.path -import re -import datetime -import ConfigParser -import time -cgitb.enable() -path = str(os.path.dirname(os.path.abspath(__file__))) + "/" -confp = ConfigParser.SafeConfigParser() -Conf = 'rec10.conf' -cpath="" -if (os.path.exists(os.path.join(path,Conf))): - cpath=os.path.join(path,Conf) -elif (os.path.exists(os.path.join("/etc/rec10",Conf))): - cpath=os.path.join("/etc/rec10",Conf) -elif (os.path.exists(os.path.join("/etc",Conf))): - cpath=os.path.join("/etc",Conf) - -confp.read(cpath) -global f -f = cgi.FieldStorage() -def getpath(string): - global confp - return confp.get('path', string) -def getdbpath(string): - global confp - return confp.get('db', string) -def getdb(): - retdb = "" - if getdbpath('db') == 'MySQL': - dbn = getdbpath("mysql_dbname") - dbh = getdbpath("mysql_host") - dbu = getdbpath("mysql_user") - dbpwd = getdbpath("mysql_passwd") - dbport = int(getdbpath("mysql_port")) - retdb = rec10web_dbMySQL.DB_MySQL(dbname=dbn, host=dbh, user=dbu, passwd=dbpwd, port=dbport) - return retdb -def getRecDate(): - dl = database.select_all_timeline() - recdata = "id,type,chtxt,title,btime,etime,deltaday,opt\n" - #print dl - for d in dl: - id = d['id'] - typet = d['type'] - chtxt = d['chtxt'] - title = d['title'] - btime = d['btime'] - etime = d['etime'] - deltatime = d['deltatime'] - deltaday = d['deltaday'] - opt = d['opt'] - if deltaday == None: - deltaday = u"なし" - elif deltaday == "": - deltaday = u"なし" - if opt == None: - opt = u"なし" - if typet == "reserve_flexible": - typet = u"浮動予約" - elif typet == "search_today": - typet = u"当日予約" - elif typet == "search_everyday": - typet = u"隔日予約" - elif typet == "reserve_fixed": - typet = u"確定予約" - elif typet == "grid": - typet = u"外部委託" - elif typet == "convert_ts_mp4": - typet = u"縁故予約" - elif typet == "convert_b25_ts": - typet = u"解読予約" - #print btime - btime = btime[5:16] - etime = etime[5:16] - btime = btime.replace("-", "/") - etime = etime.replace("-", "/") - if btime[0:5] == etime[0:5]: - etime = etime[6:] - s = "\"" + str(id) + "\",\"" + typet + "\",\"" + chtxt + "\",\"" + title + "\",\"" + btime + "\",\"" + etime + "\",\"" + deltaday + "\",\"" + opt + "\"\n" - s = str(id) + "," + typet + "," + chtxt + "," + title + "," + btime + "," + etime + "," + deltaday + "," + opt + "\n" - recdata = recdata + s - f = open(path + "/recdatum.csv", "w") - f.write(recdata.encode('utf-8')) - f.close() -def getiEPGDate(): - dl = database.select_all_iepg() - recdata = "id,name,chtxt\n" - #print dl - s = "" - for d in dl: - s = s + d[0] + "," + d[1] + "," + d[2] + "\n" - recdata = recdata + s - f = open(path + "/iepgdatum.csv", "w") - f.write(recdata.encode('utf-8')) - f.close() -def getchtxt(): - dl = database.select_all_epg_ch() - chopt = "" - for bctype, ontv, chtxt, chname, ch, csch, updatetime in dl: - chopt = chopt + "\n " - return chopt -def edit_date(id): - ret = database.select_by_id_timeline(id) - return ret[0] -def reserv_recday(keyword, chtxt, btime, etime, deltatime, opt, deltaday, day): - """ - dayは月曜日を1日曜日を7とした数字 - """ - #bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S") - #et=datetime.datetime.strptime(etime,"%Y-%m-%d %H:%M:%S") - bt = datetime.datetime(*time.strptime(btime, "%Y-%m-%d %H:%M:%S")[:-3]) - et = datetime.datetime(*time.strptime(etime, "%Y-%m-%d %H:%M:%S")[:-3]) - dt = int(day)-bt.isoweekday() - if dt < 0: - dt = dt + 7 - dbt = bt + datetime.timedelta(days=dt) - det = et + datetime.timedelta(days=dt) - btime = dbt.strftime("%Y-%m-%d %H:%M:%S") - etime = det.strftime("%Y-%m-%d %H:%M:%S") - return reserv("keyevery", keyword, chtxt, btime, etime, deltatime, opt, "7") -def reserv(type, keyword, chtxt, btime, etime, deltatime, opt, deltaday): - MaxT = 2 - MaxS = 2 - tsnum = count_schedule(btime, etime) - MaxT = MaxT-tsnum[0] - MaxS = MaxS-tsnum[1] - bctype = "" - rett = "" - bctypegetdb = database.select_by_chtxt_epg_ch(chtxt) - for bctypet, ontvt, chtxtt, cht, cscht, updatetimet in bctypegetdb: - bctype = bctypet - if (type == "reserve_fixed") or (type == "reserve_flexible") or (type == "search_today") or (type == "search_everyday"): - if bctype.find("cs") > -1: - MaxS = MaxS-1 - elif bctype.find("bs") > -1: - MaxS = MaxS-1 - elif bctype.find("te") > -1: - MaxT = MaxT-1 - if MaxS > -1 and MaxT > -1: - database.add_timeline(type=type, chtxt=chtxt, title=keyword, btime=btime, etime=etime, deltatime=deltatime, deltaday=deltaday, opt=opt) - rett = "" - else: - rett = "over" - return rett -def count_schedule(btime, etime): - """ - return rec num (int return[0]:TE /int return[1]:BS/CS) - """ - def cmpare(x, y): - #xt=datetime.datetime(*time.strptime(x,"%Y-%m-%d %H:%M:%S")[:-3]) - #yt=datetime.datetime(*time.strptime(y,"%Y-%m-%d %H:%M:%S")[:-3]) - xt = x - yt = y - if xt > yt: - return -1 - elif xt == yt: - return 0 - else: - return 1 - dls = database.schedule_timeline(btime, etime) - times = [] - btd = datetime.datetime(*time.strptime(btime, "%Y-%m-%d %H:%M:%S")[:-3]) - etd = datetime.datetime(*time.strptime(etime, "%Y-%m-%d %H:%M:%S")[:-3]) - for dl in dls: - dd1 = datetime.datetime(*time.strptime(dl[4], "%Y-%m-%d %H:%M:%S")[:-3]) - dd2 = datetime.datetime(*time.strptime(dl[5], "%Y-%m-%d %H:%M:%S")[:-3]) - if dd1 < btd: - dd1 = btd - if dd2 > etd: - dd2 = etd - times.append(dd1) - times.append(dd2) - times = list(set(times)) - times.sort(cmpare) - times.reverse() - retcount = [0, 0] - for i in xrange(0, len(times)-2, 1): - bt1 = times[i] - et1 = times[i + 1] - btime1 = bt1.strftime("%Y-%m-%d %H:%M:%S") - etime1 = et1.strftime("%Y-%m-%d %H:%M:%S") - ret1 = database.count_schedule_timeline(btime1, etime1) - if retcount[0] < ret1[0]: - retcount[0] = ret1[0] - if retcount[1] < ret1[1]: - retcount[1] = ret1[1] - return retcount -def change_reserv(id, type, keyword, chtxt, btime, etime, deltatime, opt, deltaday): - """ - idはテキスト - """ - MaxT = 2 - MaxS = 2 - tsnum = count_schedule(btime, etime) - MaxT = MaxT-tsnum[0] - MaxS = MaxS-tsnum[1] - bctype = "" - rett = "" - for dl in database.select_by_chtxt_epg_ch(chtxt): - bctype = dl[0] - if (type == "reserve_fixed") or (type == "reserve_flexible") or (type == "search_today") or (type == "search_everyday"): - if bctype.find("cs") > -1: - MaxS = MaxS-1 - elif bctype.find("bs") > -1: - MaxS = MaxS-1 - elif bctype.find("te") > -1: - MaxT = MaxT-1 - if MaxS > -1 and MaxT > -1: - database.del_by_id_timeline(id) - database.add_timeline(type=type, chtxt=chtxt, title=keyword, btime=btime, etime=etime, deltatime=deltatime, deltaday=deltaday, opt=opt) - else: - rett = "over" - return rett -def station2chtxt(station): - ret = "" - #try: - database.new_iepg() - #except: - # "" - sta = database.select_by_station_iepg(station) - if len(sta) > 0: - ret = sta[0][2] - else: - ret = "n\/a" - return ret -def readHtmlSrcSimple(): - f = open(path + 'rswi.htm') - ret = f.read() - f.close() - return unicode(ret,'utf-8') -def readRecFinisSimple(): - f = open(path + 'fin.htm') - ret = f.read() - f.close() - return unicode(ret,'utf-8') -def readRecSchedule(): - f = open(path + 'schedule.htm') - ret = f.read() - f.close() - return unicode(ret,'utf-8') -def readiEPGadd(): - f = open(path + 'iepg_add.htm') - ret = f.read() - f.close() - return unicode(ret,'utf-8') -def readiEPGshow(): - f = open(path + 'iepg_show.htm') - ret = f.read() - f.close() - return unicode(ret,'utf-8') -def get_fin(string, refreshurl): - htmdate = readRecFinisSimple() - htmdate = htmdate.replace('', string) - htmdate = htmdate.replace('', refreshurl) - return htmdate -def mode_iepg_add(station): - htmdate = readiEPGadd() - htmdate = htmdate.replace("", getchtxt()) - htmdate = htmdate.replace("", "") - htmdate = htmdate.replace("", station) - return htmdate -def mode_iepg_fin(): - s = u"epgデータの追加を完了しました。
\n録画を行う場合はもう一度おねがいします。
" - u = "rec10web.py?exec=iepg-show" - return get_fin(s, u) -def mode_iepg_show(): - htmdate = readiEPGshow() - return htmdate -def mode_iepg_del(): - s = u"epgデータを削除しました。" - u = "rec10web.py?exec=iepg-show" - return get_fin(s, u) -def mode_iepg_del_miss(): - s = u"epgデータの削除に失敗しました。" - u = "rec10web.py?exec=iepg-show" - return get_fin(s, u) -def mode_schedule(): - htmdate = readRecSchedule() - return htmdate -def mode_recfin(): - s = u"予約が終了しました。移動します。" - u = "rec10web.py?exec=schedule" - return get_fin(s, u) -def mode_recover(): - s = u"最大予約可能数を超えています" - u = "rec10web.py?exec=schedule" - return get_fin(s, u) -def mode_normal(): - htmdate = readHtmlSrcSimple() - htmdate = htmdate.replace("", "yes") - return htmdate -def mode_del(): - s = u"予約を削除しました。" - u = "rec10web.py?exec=schedule" - return get_fin(s, u) -def mode_edit_rec10web(tasknum): - #editnum=exect.replace("edit:","") - htmdate = readHtmlSrcSimple() - iddata = edit_date(tasknum) - htmdate = htmdate.replace("", getchtxt()) - htmdate = htmdate.replace("", iddata['chtxt']) - htmdate = htmdate.replace("", iddata['btime']) - htmdate = htmdate.replace("", iddata['etime']) - htmdate = htmdate.replace("", iddata['type']) - htmdate = htmdate.replace("", iddata['chtxt']) - htmdate = htmdate.replace("", iddata['title']) - htmdate = htmdate.replace("", size) - htmdate = htmdate.replace("", iddata["opt"]) - htmdate = htmdate.replace("", "edit-exec:" + tasknum) - return htmdate -def mode_edit(): - editnum = exect.replace("edit:", "") - htmdate = readHtmlSrcSimple() - iddata = edit_date(editnum) - htmdate = htmdate.replace("", getchtxt()) - htmdate = htmdate.replace("", iddata['chtxt']) - htmdate = htmdate.replace("", iddata['btime']) - htmdate = htmdate.replace("", iddata['etime']) - htmdate = htmdate.replace("", iddata['type']) - htmdate = htmdate.replace("", iddata['chtxt']) - htmdate = htmdate.replace("", iddata['title']) - htmdate = htmdate.replace("", size) - htmdate = htmdate.replace("", iddata["opt"]) - htmdate = htmdate.replace("", "edit-exec:" + editnum) - return htmdate -dbpath = path + "ch.db" -database = getdb() -btime = "" -etime = "" -title = "" -chtxt = "" -type = "reserve_flexible" -bt = "" -station_name = "" -mode = "" -###ここからiEPG用の読み出し -if f.getfirst('station_name'): - station = f.getfirst('station_name') - chtxt = station2chtxt(station) - if chtxt == "n\/a": - mode = "iepg-add" - station_name = station - exect = "iepg-add" -if f.getfirst('station'): - station = f.getfirst('station') - chtxt = station2chtxt(station) - if chtxt == "n\/a": - mode = "iepg-add" - station_name = station - exect = "iepg-add" -###ここから外部からの読み出しの場合 -if f.getfirst('type'): - type = unicode(f.getfirst('type'),'utf-8') -if f.getfirst('title'): - title = unicode(f.getfirst('title'),'utf-8') -if f.getfirst('chtxt'): - chtxt = unicode(f.getfirst('chtxt'),'utf-8') -if f.getfirst('btime'): - btime = unicode(f.getfirst('btime'),'utf-8') - bt = datetime.datetime(*time.strptime(btime, "%Y-%m-%d %H:%M:%S")[:-3]) -if f.getfirst('etime'): - etime = unicode(f.getfirst('etime'),'utf-8') - et = datetime.datetime(*time.strptime(etime, "%Y-%m-%d %H:%M:%S")[:-3]) - if bt != "": - delt = et-bt - dt = delt.days * 24 * 60 * 60 + delt.seconds - if dt < 0: - dd = datetime.timedelta(days=1) - et = et + dd - etime = unicode(et.strftime("%Y-%m-%d %H:%M:%S"),'utf-8') - if dt < -1 * 24 * 60 * 60: - d1 = datetime.datetime(bt.year, 0, 0) - d2 = datetime.datetime(bt.year + 1, 0, 0) - dd = d2-d1 - et = et + dd - etime = unicode(et.strftime("%Y-%m-%d %H:%M:%S"),'utf-8') -size = "S" -if f.getfirst('size'): - size = f.getfirst('size') -opts = "" -if f.getfirst('opts'): - opts = f.getfirst('opts') -deltahour = "" -if f.getfirst('deltahour', ""): - deltahour = f.getfirst('deltahour', "") -deltaday = "" -if f.getfirst('deltaday', ""): - deltaday = f.getfirst('deltaday', "") -exect = "" -if f.getfirst('exec', ""): - exect = f.getfirst('exec', "") -if exect == "schedule": - mode = "schedule" - getRecDate() -elif exect == "yes": - mode = "yes" -elif re.search('edit:', exect): - mode = "edit" -elif re.search('edit-exec:', exect): - mode = "edit-exec" -elif exect == "change": - mode = "edit-rec10" -elif exect == "del": - mode = "del" -elif exect == "iepg-add": - mode = "iepg-add" -elif exect == "iepg-show": - mode = "iepg-show" -elif exect == "iepg-add_yes": - mode = "iepg-add-yes" -elif exect == "iepg-del": - mode = "iepg-del" -htmdate = mode_normal() -htmdate = htmdate.replace("", getchtxt()) -htmdate = htmdate.replace("", btime) -htmdate = htmdate.replace("", etime) -htmdate = htmdate.replace("", type) -htmdate = htmdate.replace("", chtxt) -htmdate = htmdate.replace("", title) -htmdate = htmdate.replace("", size) -htmdate = htmdate.replace("", opts) -#ここから曜日検索の設定 -if f.getfirst('type') == "keyday": - rett = "" - dayt = f.getfirst('day_Mon') - if dayt: - rett = rett + reserv_recday(title, chtxt, btime, etime, deltahour, opts, deltaday, dayt) - dayt = f.getfirst('day_Tue') - if dayt: - rett = rett + reserv_recday(title, chtxt, btime, etime, deltahour, opts, deltaday, dayt) - dayt = f.getfirst('day_Wed') - if dayt: - rett = rett + reserv_recday(title, chtxt, btime, etime, deltahour, opts, deltaday, dayt) - dayt = f.getfirst('day_Thu') - if dayt: - rett = rett + reserv_recday(title, chtxt, btime, etime, deltahour, opts, deltaday, dayt) - dayt = f.getfirst('day_Fri') - if dayt: - rett = rett + reserv_recday(title, chtxt, btime, etime, deltahour, opts, deltaday, dayt) - dayt = f.getfirst('day_Sat') - if dayt: - rett = rett + reserv_recday(title, chtxt, btime, etime, deltahour, opts, deltaday, dayt) - dayt = f.getfirst('day_Sun') - if dayt: - rett = rett + reserv_recday(title, chtxt, btime, etime, deltahour, opts, deltaday, dayt) - if rett == "": - htmdate = mode_recfin() - else: - htmdate = mode_recover() - chtxt = "" - exect = "" - - -if mode == "schedule": - htmdate = mode_schedule() -elif mode == "edit": - htmdate = mode_edit() -elif mode == "iepg-add": - htmdate = mode_iepg_add(station_name) -elif mode == "iepg-add-yes": - try: - database.new_iepg() - except: - "" - if f.getfirst('iepg_station') and f.getfirst('iepg_chtxt'): - database.add_iepg(f.getfirst('iepg_station'), f.getfirst('iepg_chtxt')) - htmdate = mode_iepg_fin() -elif mode == "iepg-show": - getiEPGDate() - htmdate = mode_iepg_show() -elif mode == "iepg-del": - s = f.getfirst('iepgdelnum') - htmdate = "" - #try: - for st in s.split(","): - if st != "": - database.del_by_id_iepg(st) - htmdate = mode_iepg_del() - #except: - # htmdate=mode_iepg_del_miss() -elif mode == "edit-rec10": - s = f.getfirst('tasknum') - s.replace(" ", "") - htmdate = mode_edit_rec10web(s.split(",")[0]) -elif mode == "del": - s = f.getfirst('tasknum') - s.replace(" ", "") - ss = s.split(",") - for st in ss: - if st != "": - database.del_by_id_timeline(st) - htmdate = mode_del() -elif mode == "edit-exec": - if (chtxt != "")and(title != "")and(btime != "")and(etime != "")and(opts != ""): - editnum = exect.replace("edit-exec:", "") - restxt = change_reserv(editnum, type, title, chtxt, btime, etime, deltahour, opts, deltaday) - if restxt == "": - htmdate = mode_recfin() - elif restxt == "over": - htmdate = mode_recover() - else: - htmdate = mode_recfin() - exect = "" -elif mode == "yes": - if (chtxt != "")and(title != "")and(btime != "")and(etime != "")and(opts != ""): - restxt = reserv(type, title, chtxt, btime, etime, deltahour, opts, deltaday) - if restxt == "": - htmdate = mode_recfin() - elif restxt == "over": - htmdate = mode_recover() - else: - htmdate = mode_recfin() -print "Content-Type: text/html" -print htmdate.encode('utf-8') diff --git a/Rec10WEB/trunk/src/rec10web_dbMySQL.py b/Rec10WEB/trunk/src/rec10web_dbMySQL.py deleted file mode 100644 index 38a7325..0000000 --- a/Rec10WEB/trunk/src/rec10web_dbMySQL.py +++ /dev/null @@ -1,240 +0,0 @@ -#!/usr/bin/python -# coding: UTF-8 -# Rec10 TS Recording Tools -# Copyright (C) 2009 Yukikaze -import os -import MySQLdb -path = str(os.path.dirname(os.path.abspath(__file__))) + "/" -dbpath = path + "ch.db" -class DB_MySQL: - dbname = "" - dbhost = "" - dbusr = "" - dbpasswd = "" - dbport = 0 - def __init__(self, dbname, user, passwd, host="localhost", port=3306): - self.dbname = dbname - self.dbhost = host - self.dbusr = user - self.dbpasswd = passwd - self.dbport = port - def connect_db(self): - """ - dbへの接続 - """ - con = MySQLdb.connect(db=self.dbname, host=self.dbhost, port=self.dbport, user=self.dbusr, passwd=self.dbpasswd, charset="utf8") - cur = con.cursor() - cur.execute('set names utf8;') - return [con, cur] - def close_db(self, db): - db[1].close() - db[0].close() - def select_all_timeline(self): - db = self.connect_db() - recdata = [] - dl = db[1].execute("SELECT id,type,chtxt,title,btime,etime,deltatime,deltaday,opt FROM timeline") - dls = db[1].fetchall() - for id, typet, chtxt, title, btime, etime, deltatime, deltaday, opt in dls: - ret = {} - ret['id'] = id - ret['type'] = typet - ret['chtxt'] = chtxt - ret['title'] = title - btime = btime.strftime("%Y-%m-%d %H:%M:%S") - etime = etime.strftime("%Y-%m-%d %H:%M:%S") - ret['btime'] = btime - ret['etime'] = etime - ret['opt'] = opt - ret['deltatime'] = "" - ret['deltaday'] = "" - if deltatime == None: - deltatime = "3" - if deltaday == None: - deltaday = "7" - if typet == 'key': - ret['deltatime'] = deltatime - elif typet == 'keyevery': - ret['deltatime'] = deltatime - ret['deltaday'] = deltaday - recdata.append(ret) - self.close_db(db) - return recdata - def select_by_chtxt_timeline(self, chtxt): - db = self.connect_db() - recdata = [] - dl = db[1].execute("SELECT type, chtxt, title, btime, etime, deltatime ,deltaday ,opt FROM timeline WHERE chtxt = %s ", (chtxt, )) - d = db[1].fetchall() - for typet, chtxt, title, btime, etime, deltatime, deltaday, opt in d: - ret = {} - ret['type'] = typet - ret['chtxt'] = chtxt - ret['title'] = title - btime = btime.strftime("%Y-%m-%d %H:%M:%S") - etime = etime.strftime("%Y-%m-%d %H:%M:%S") - ret['btime'] = btime - ret['etime'] = etime - ret['opt'] = opt - if deltatime == None: - deltatime = "3" - if deltaday == None: - deltaday = "7" - if typet == 'key': - ret['deltatime'] = deltatime - elif typet == 'keyevery': - ret['deltatime'] = deltatime - ret['deltaday'] = deltaday - recdata.append(ret) - self.close_db(db) - return recdata - def select_by_id_timeline(self, id): - db = self.connect_db() - recdata = [] - dl = db[1].execute("SELECT type, chtxt, title, btime, etime, deltatime ,deltaday ,opt FROM timeline WHERE id = %s ", (id, )) - d = db[1].fetchall() - for typet, chtxt, title, btime, etime, deltatime, deltaday, opt in d: - ret = {} - ret['type'] = typet - ret['chtxt'] = chtxt - ret['title'] = title - btime = btime.strftime("%Y-%m-%d %H:%M:%S") - etime = etime.strftime("%Y-%m-%d %H:%M:%S") - ret['btime'] = btime - ret['etime'] = etime - ret['opt'] = opt - if deltatime == None: - deltatime = "3" - if deltaday == None: - deltaday = "7" - if typet == 'key': - ret['deltatime'] = deltatime - elif typet == 'keyevery': - ret['deltatime'] = deltatime - ret['deltaday'] = deltaday - recdata.append(ret) - self.close_db(db) - return recdata - def select_all_epg_ch(self): - db = self.connect_db() - ret = db[1].execute("SELECT bctype,ontv,chtxt,chname,ch,csch,updatetime FROM epg_ch") - ret = db[1].fetchall() - self.close_db(db) - return ret - def select_by_chtxt_epg_ch(self, chtxt): - db = self.connect_db() - ret = db[1].execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM epg_ch WHERE chtxt=%s", (chtxt, )) - ret = db[1].fetchall() - self.close_db(db) - return ret - def add_timeline(self, type="", chtxt="", title="", btime="", etime="", deltatime="", deltaday="", opt=""): - db = self.connect_db() - db[1].execute('INSERT IGNORE INTO timeline (type,chtxt,title,btime,etime,deltatime,deltaday,opt) values (%s,%s,%s,%s,%s,%s,%s,%s)', (type, chtxt, title, btime, etime, deltatime, deltaday, opt)) - #db.commit() - self.close_db(db) - def schedule_timeline(self, btime, etime): - db = self.connect_db() - dbexe = "SELECT type,epg_ch.bctype,timeline.chtxt,timeline.title,timeline.btime,timeline.etime FROM timeline INNER JOIN epg_ch ON timeline.chtxt=epg_ch.chtxt" - dbexe = dbexe + " WHERE NOT( ( timeline.etime <= %s ) OR ( timeline.btime >= %s ) )" - db[1].execute(dbexe, (btime, etime)) - rets = [] - for typet, bctypet, chtxtt, titlet, btimet, etimet in db[1].fetchall(): - ret = [typet, bctypet, chtxtt, titlet, btimet.strftime("%Y-%m-%d %H:%M:%S"), etimet.strftime("%Y-%m-%d %H:%M:%S")] - rets.append(ret) - self.close_db(db) - return rets - def count_schedule_timeline(self, btime, etime): - """ - count rectasknum - return [te num,bs/cs num] - """ - db = self.connect_db() - dbexe = "SELECT type,epg_ch.bctype,timeline.chtxt,title FROM timeline INNER JOIN epg_ch ON timeline.chtxt=epg_ch.chtxt" - dbexe = dbexe + " WHERE NOT( ( timeline.etime <= %s ) OR ( timeline.btime >= %s ) )" - Srec = 0 - Trec = 0 - db[1].execute(dbexe, (btime, etime)) - for typet, bctypet, chtxtt, titlet in db[1].fetchall(): - if (typet == "reserve_flexible") or (typet == "reserve_fixed") or (typet == "search_today") or (typet == "search_everyday"): - if bctypet.find("cs") > -1: - Srec = Srec + 1 - elif bctypet.find("bs") > -1: - Srec = Srec + 1 - elif bctypet.find("te") > -1: - Trec = Trec + 1 - self.close_db(db) - return [Trec, Srec] - def del_by_id_timeline(self, id): - db = self.connect_db() - db[1].execute('DELETE FROM timeline WHERE id=' + id) - self.close_db(db) - def new_iepg(self): - db = self.connect_db() - try: - db[1].execute("CREATE TABLE in_iepg \ - (\ - id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,\ - station VARCHAR(200) NOT NULL,\ - chtxt VARCHAR(30) NOT NULL\ - )") - except: - "" - self.close_db(db) - def add_iepg(self, station, chtxt): - db = self.connect_db() - db[1].execute('INSERT IGNORE INTO in_iepg (station,chtxt) VALUES (%s,%s)', (station, chtxt)) - self.close_db(db) - def del_by_id_iepg(self, num): - db = self.connect_db() - db[1].execute("DELETE FROM in_iepg \ - WHERE id=%s", \ - (num, )) - self.close_db(db) - def select_by_chtxt_iepg(self, chtxt): - db = self.connect_db() - db[1].execute("\ - SELECT \ - id,station,chtxt \ - FROM in_iepg \ - WHERE chtxt=%s "\ - , (chtxt, )) - retall = db[1].fetchall() - self.close_db(db) - rets = [] - if len(retall) > 0: - for ret in retall: - a = list(ret) - a[0] = str(ret[0]) - rets.append(a) - return rets - def select_by_station_iepg(self, station): - db = self.connect_db() - db[1].execute("\ - SELECT \ - id,station,chtxt \ - FROM in_iepg \ - WHERE station=%s "\ - , (station, )) - retall = db[1].fetchall() - self.close_db(db) - rets = [] - if len(retall) > 0: - for ret in retall: - a = list(ret) - a[0] = str(ret[0]) - rets.append(a) - return rets - def select_all_iepg(self): - db = self.connect_db() - db[1].execute("\ - SELECT \ - id,station,chtxt \ - FROM in_iepg "\ - ) - retall = db[1].fetchall() - self.close_db(db) - rets = [] - if len(retall) > 0: - for ret in retall: - a = list(ret) - a[0] = str(ret[0]) - rets.append(a) - return rets \ No newline at end of file diff --git a/Rec10WEB/trunk/src/rswi.htm b/Rec10WEB/trunk/src/rswi.htm deleted file mode 100644 index bd0e3da..0000000 --- a/Rec10WEB/trunk/src/rswi.htm +++ /dev/null @@ -1,471 +0,0 @@ - - - - - - Rec10 Simple Web Interface ver.0.9.1 - - - - - - - - -
-

Rec10 Simple Web Interface ver.0.9.0


- Rec10WEB MENU Schedule iEPG-Data


- 番組名/キーワード - - チャンネル - -

開始時刻 -
-
-
現在
-
+5m
-
+30m
-
+3h
-
+12h
- 終了時刻 -
-
-
一致
-
+1m
-
+5m
-
+30m
-
+1h
-
-
隔日周期(days) - - キーワード録画許容誤差(hours) -

- - 月曜 - 火曜 - 水曜 - 木曜 - 金曜 - 土曜 - 日曜 -   処理後自動移動オプション - -

- 録画サイズ - - 可変フレームレート - 二ヶ国語放送 - 5.1ch放送 - 2passモード - タイトル日付追加 - Options -
-
-
予約
-
-
-
- - \ No newline at end of file diff --git a/Rec10WEB/trunk/src/schedule.htm b/Rec10WEB/trunk/src/schedule.htm deleted file mode 100644 index 424c4bf..0000000 --- a/Rec10WEB/trunk/src/schedule.htm +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - Rec10Web Schedule管理 - - - - - - - - -
- - - - - - - - - - - - - -
IDタイプチャンネルタイトル開始終了オプション周期
- -
実行
- -
- - diff --git a/Rec10WEBG2/rec10webg2.pl b/Rec10WEBG2/rec10webg2.pl deleted file mode 100755 index 4ed7890..0000000 --- a/Rec10WEBG2/rec10webg2.pl +++ /dev/null @@ -1,489 +0,0 @@ -#!/usr/bin/perl -use strict; -use KCatch; -use Config::Simple; -use DBI; -use CGI::Minimal; -use SVG; -use Time::Piece; -use Encode; -use Text::Ngram; -use utf8; -our $svg=""; -our $dbh; -my $cgi=CGI::Minimal->new; -my $nHTML=""; - -my $cfg = new Config::Simple; -if ( -e '/etc/rec10.conf' ) { - $cfg->read( '/etc/rec10.conf' ); -} -my $sql = $cfg->param( 'db.db' ); -if ( $sql eq 'MySQL') { - my $name = $cfg->param( 'db.mysql_dbname' ); - my $host = $cfg->param( 'db.mysql_host' ); - my $port = $cfg->param( 'db.mysql_port' ); - my $user = $cfg->param( 'db.mysql_user' ); - my $pass = $cfg->param( 'db.mysql_passwd' ); - $dbh = DBI->connect("dbi:mysql:$name:$host:$port", $user, $pass, { - AutoCommit => 1, - RaiseError => 1, - }); - $dbh->do( 'SET NAMES utf8' ); -} -my $btimenow=localtime; -my $etimenow=$btimenow+12*60*60; -if ($cgi->param('mode') eq "graph"){ - $nHTML =""; - $nHTML = qq {Content-type:image/svg+xml\n\n}; - my $date = Time::Piece->strptime($cgi->param('btime'),'%Y-%m-%d_%H-%M-%S'); - my $date2 = Time::Piece->strptime($cgi->param('etime'),'%Y-%m-%d_%H-%M-%S'); - my $ddate = $date2-$date; - my $dtime = $ddate->hours; - if ($dtime<1){ - $dtime=1; - } - $nHTML .= chtimesvg($cgi->param('chtxt'),$date,$dtime); -}elsif ($cgi->param('mode') eq "timegraph"){ - $nHTML =""; - $nHTML = qq {Content-type:image/svg+xml\n\n}; - my $date = Time::Piece->strptime($cgi->param('btime'),'%Y-%m-%d_%H-%M-%S'); - my $date2 = Time::Piece->strptime($cgi->param('etime'),'%Y-%m-%d_%H-%M-%S'); - my $ddate = $date2-$date; - my $dtime = $ddate->hours; - if ($dtime<1){ - $dtime=1; - } - $nHTML .= timesvg($date,$dtime); -}elsif ($cgi->param('mode') eq "table"){ - $nHTML =""; - $nHTML = qq {Content-type:application/xhtml+xml\n\n}; - my $date = Time::Piece->strptime($cgi->param('btime'),'%Y-%m-%d_%H-%M-%S'); - my $date2 = Time::Piece->strptime($cgi->param('etime'),'%Y-%m-%d_%H-%M-%S'); - my $ddate = $date2-$date; - my $dtime = $ddate->hours; - if ($dtime<1){ - $dtime=1; - } - $nHTML .= timesvg($date,$dtime); -}else{ - if ($cgi->param('btime')ne ""){ - $btimenow=Time::Piece->strptime($cgi->param('btime'),'%Y-%m-%d_%H-%M-%S'); - } - if ($cgi->param('etime')ne ""){ - $etimenow=Time::Piece->strptime($cgi->param('etime'),'%Y-%m-%d_%H-%M-%S'); - } - my $ch1=$cgi->param('ch1'); - my $ch2=$cgi->param('ch2'); - my $ch3=$cgi->param('ch3'); - my $btxt=$btimenow->strftime('%Y-%m-%d_%H-00-00'); - my $etxt=$etimenow->strftime('%Y-%m-%d_%H-00-00'); - my $btxtnew2=$etimenow; - my $etxtnew2=$etimenow+18*60*60; - my $hdate=localtime; - $hdate=$hdate+1*60*60; - my $btxtnew1; - my $etxtnew1; - if ($btimenow<$hdate){ - $btxtnew1=$btimenow; - $etxtnew1=$etimenow; - }else{ - $btxtnew1=$btimenow-18*60*60; - $etxtnew1=$btimenow; - } - my @clist=@{db_select_chlist()}; - my $chtxtlist =""; - if ($ch1 eq ""){ - $ch1=$clist[0][0]; - } - if ($ch2 eq ""){ - $ch2=$clist[1][0]; - } - if ($ch3 eq ""){ - $ch3=$clist[2][0]; - } - my $blink="rec10webg2.pl?ch1=$ch1&ch2=$ch2&ch3=$ch3&btime=".$btxtnew1->strftime('%Y-%m-%d_%H-%M-%S')."&etime=".$etxtnew1->strftime('%Y-%m-%d_%H-%M-%S'); - my $alink="rec10webg2.pl?ch1=$ch1&ch2=$ch2&ch3=$ch3&btime=".$btxtnew2->strftime('%Y-%m-%d_%H-%M-%S')."&etime=".$etxtnew2->strftime('%Y-%m-%d_%H-%M-%S'); - foreach my $cht (@clist){ - my @cht2=@{$cht}; - my $chn=$cht2[1]; - utf8::decode($chn); - $chtxtlist=$chtxtlist."\n"; - } - my $chtxtlist1 = $chtxtlist; - my $chtxtlist2 = $chtxtlist; - my $chtxtlist3 = $chtxtlist; - $chtxtlist1 =~ s/$ch1"/$ch1" selected="selected"/; - $chtxtlist2 =~ s/$ch2"/$ch2" selected="selected"/; - $chtxtlist3 =~ s/$ch3"/$ch3" selected="selected"/; - $nHTML .= qq {Content-type:application/xhtml+xml\n\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {Rec10WEB G2 番組表 ver alpha 2010-03-15}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {
\n}; - $nHTML .= qq {

Rec10WEB G2 alpha

\n}; - $nHTML .= qq {

Rec10 番組表

\n}; - $nHTML .= qq {

}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {

\n}; - $nHTML .= qq {
\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {SVG Timeline\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {SVG Timeline\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {SVG Timeline\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {SVG Timeline\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {SVG Timeline\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {
\n}; - $nHTML .= qq {

\n}; - $nHTML .= qq {前へ\n}; - $nHTML .= qq {次へ\n}; - $nHTML .= qq {

\n}; - $nHTML .= qq {
\n}; - $nHTML .= qq {\n}; - $nHTML .= qq {\n}; -} -print encode('utf-8',$nHTML); -sub db_select_auto_bayes_timeline{#chtxt,btime,etime - my $ary_db = $dbh->selectall_arrayref( - "SELECT chtxt,title, btime, etime, point FROM auto_timeline_bayes" - ."WHERE btime >= \"".$_[1]."\" " - ."AND " - ."etime <= \"".$_[2]."\"" - ."AND " - ."chtxt = \"".$_[0]."\"" - ); - return $ary_db; -} -sub db_select_auto_jbk_timeline{#chtxt,btime,etime - my $ary_db = $dbh->selectall_arrayref( - "SELECT chtxt,title, btime, etime, point FROM auto_timeline_keyword" - ."WHERE btime >= \"".$_[1]."\" " - ."AND " - ."etime <= \"".$_[2]."\"" - ."AND " - ."chtxt = \"".$_[0]."\"" - ); - return $ary_db; -} -sub db_select_timeline{ - my $ary_db = $dbh->selectall_arrayref( - "SELECT type, chtxt, title, btime, etime, deltatime ,deltaday ,opt FROM timeline" - ); - return $ary_db; -} -sub db_select_chtxt_btime_etime_timeline{#chtxt,btime,etime - my $ary_db = $dbh->selectall_arrayref( - "SELECT type, chtxt, title, btime, etime FROM timeline" - ."WHERE btime >= \"".$_[1]."\" " - ." AND " - ."etime <= \"".$_[2]."\"" - ."AND " - ."chtxt = \"".$_[0]."\"" - ); - return $ary_db; -} -sub db_select_chlist{ - my $dbe="SELECT chtxt,chname FROM epg_ch"; - my $ary_db = $dbh->selectall_arrayref($dbe); - return $ary_db; -} -sub db_select_epg_ch{#chtxt#btime#etime - my $dbe="SELECT epg_ch.chtxt,title,start,stop,exp,longexp,category FROM epg_timeline " - ."INNER JOIN epg_ch " - ."WHERE epg_ch.ontv=epg_timeline.channel " - ."AND " - ."start >= \"".$_[1]."\" " - ."AND " - ."stop <= \"".$_[2]."\" " - ."AND " - ."epg_ch.chtxt=\"".$_[0]."\""; - my $ary_db = $dbh->selectall_arrayref($dbe); - #print "$ary_db->[0][2]\n"; - return $ary_db; -} -#該当する番組の状況を調べる -sub check_program{#chtxt#btime#etime#title 0:normal 1:bayesおすすめ 2:jbkおすすめ 8:予約がいっぱい 9:予約済み 10:予約済みduplicate 11: 予約済みepg変更 - my $ret=0; - my $dbt="SELECT type, chtxt, title, btime, etime ,epgduplicate ,epgchange FROM timeline " - ."WHERE btime >= \"".$_[1]."\" " - ." AND " - ."etime <= \"".$_[2]."\"" - ." AND " - ."chtxt = \"".$_[0]."\"" - ." AND " - ."title = \"".$_[3]."\""; - my $ary_db = $dbh->selectall_arrayref($dbt); - my @ary=@{$ary_db}; - if ($#ary>-1){##該当が一件以上 - #die @ary; - my @dbl=@ary; - #die @dbl; - if (int($dbl[5])>0){ - $ret=10; - }elsif (int($dbl[6])>0){ - $ret=11; - }else{ - $ret=9; - } - }else{ - $ret=0; - } - return $ret; -} -sub timesvg{#btime,dtime - $svg = SVG -> new( - width=>"100%",height=>"100%", - ); - my $btime = $_[0]->strftime( '%Y-%m-%d %H:00:00' ); - my $bt = Time::Piece->strptime($btime,'%Y-%m-%d %H:%M:%S'); - $bt = $bt + 3600; - for (my $i = 0; $i <= $_[1]-2;$i++){ - my $btt= $bt + 3600*$i; - my $tit = $btt->strftime( '%Y%m%d%H' ); - if (substr($tit,8,2)eq "00"){ - $tit = substr($tit,4,2)."/".substr($tit,6,2); - }else{ - $tit = substr($tit,8,2).":00"; - } - my $btime2=$btt-$_[0]; - my $y=$btime2->minutes; - $y=$y*100/60/$_[1]; - $svg->text( - font_size => "100%", - x=>"0%",y=>"$y%", - -cdata=>$tit - ); - } - my $out = $svg->xmlify( - -pubid => "-//W3C//DTD SVG 1.1//EN", - -dtd => "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd", - ); - my $b ="http:\/\/www\.w3\.org\/TR\/2001\/REC-SVG-20010904\/DTD\/svg10\.dtd"; - my $e ="http:\/\/www\.w3\.org\/Graphics\/SVG\/1\.1\/DTD\/svg11\.dtd"; - $out =~ s/$b/$e/; - return $out; -} -sub chtimesvg{#chtxt,btime,dtime - $svg = SVG -> new( - width=>"100%",height=>"100%", - ); - my $bt = $_[1]; - my $btime = $bt->strftime( '%Y%m%d%H%M%S' ); - my $et = $bt + $_[2]*3600; - my $etime = $et->strftime( '%Y%m%d%H%M%S' ); - my @auto_bayes = @{db_select_epg_ch($_[0],$btime,$etime)};#chtxt#btime#etime - my @dbl =@{db_select_epg_ch($_[0],$btime,$etime)}; - foreach my $tt (@dbl){ - my @tt2=@{$tt}; - my $bttime2=substr($tt2[2],0,4)."-".substr($tt2[2],4,2)."-".substr($tt2[2],6,2) - ." ".substr($tt2[2],8,2).":".substr($tt2[2],10,2).":".substr($tt2[2],12,2); - my $ettime2=substr($tt2[3],0,4)."-".substr($tt2[3],4,2)."-".substr($tt2[3],6,2) - ." ".substr($tt2[3],8,2).":".substr($tt2[3],10,2).":".substr($tt2[3],12,2); - my $bttime=Time::Piece->strptime($bttime2,'%Y-%m-%d %H:%M:%S'); - my $ettime=Time::Piece->strptime($ettime2,'%Y-%m-%d %H:%M:%S'); - my $btime2=$bttime-$bt; - my $y=$btime2->minutes; - #$y=$y*100/60/$_[2]; - $y=$y*100/60/$_[2]; - my $h=($ettime-$bttime); - $h=$h->minutes; - #$h=$h*100/60/$_[2]; - $h=$h*100/60/$_[2]; - my $colin="Snow"; - my $colout="LemonChiffon"; - my $colorchar="Black"; - my $cat = $tt2[6]; - my $type = 0;##typeは表示タイプ 0:normal 1:bayesおすすめ 2:jbkおすすめ 8:予約がいっぱい 9:予約済み - - foreach my $ab (@auto_bayes){ - my @ab2=@{$ab}; - #print "Content-Type: application/xhtml+xml\n\n"; - #print $ab2[2]; - my $btt=substr($ab2[2],0,4)."-".substr($ab2[2],4,2)."-".substr($ab2[2],6,2) - ." ".substr($ab2[2],8,2).":".substr($ab2[2],10,2).":".substr($ab2[2],12,2); - my $ett=substr($ab2[3],0,4)."-".substr($ab2[3],4,2)."-".substr($ab2[3],6,2) - ." ".substr($ab2[3],8,2).":".substr($ab2[3],10,2).":".substr($ab2[3],12,2); - my $tbtime=Time::Piece->strptime($btt,'%Y-%m-%d %H:%M:%S'); - my $tetime=Time::Piece->strptime($ett,'%Y-%m-%d %H:%M:%S'); - if ((($bttime-$tbtime)<30*60)&&(($tetime-$ettime)<30*60)&&(length($tt2[1])>0)&&(length($ab2[1])>0)){ - my $str1=$tt2[1]; - utf8::decode($str1); - my $str2=$ab2[1]; - utf8::decode($str2); - my %ng=Text::Ngram->ngram_counts({spaces=>0},$str1,2); - my $ddbtime=$tbtime-$bttime+1; - $ddbtime=abs($ddbtime); - my $dp=1000-1000*$ddbtime/(7 * 24 * 60 * 60); - my $point=0; - use Data::Dumper; - while ((my $key,my $value) = each(%ng)){ - my $i=$str2; - #die Dumper($key); - $i=$i=~ s/$key//g; - if ($i>0){ - #die $i; - $i=90+10*$i; - }else{ - $i=0; - } - $point += $i; - } - if ($point>0){ - $point += $dp; - die $point; - } - if ($point>1200){ - $type=1; - #die $point; - } - } - } - #epg_ch.chtxt,title,start,stop,exp,longexp,category - $type = check_program($tt2[0],$bttime2,$ettime2,$tt2[1]); - utf8::decode($cat); - my $title; - $title=$tt2[1]; - if ($cat eq "その他"){ - $colin="Snow"; - $colout="LemonChiffon"; - }elsif($cat eq "情報"){ - $colin="LightGoldenrodYellow"; - $colout="Khaki"; - }elsif ($cat eq "ニュース・報道"){ - $colin="PeachPuff"; - $colout="LightPink"; - }elsif ($cat eq "アニメ・特撮"){ - $colin="AliceBlue"; - $colout="DodgerBlue"; - }elsif ($cat eq "バラエティ"){ - $colin="LightPink"; - $colout="Coral"; - }elsif ($cat eq "スポーツ"){ - $colin="Honeydew"; - $colout="GreenYellow"; - }elsif ($cat eq "音楽"){ - $colin="Plum"; - $colout="Orchid"; - }elsif ($cat eq "映画"){ - $colin="BurlyWood"; - $colout="RosyBrown"; - } - if ($type==1){##braviaモード - #$colin="white"; - $colorchar="Green"; - }elsif ($type==2){##jbkモード - $colorchar="Blue"; - }elsif ($type==8){##予約がいっぱい - $colorchar="Gray"; - }elsif ($type==9){##録画予約済み - $colorchar="Orange"; - }elsif ($type==10){##10:予約済みduplicate - $colorchar="Red"; - }elsif ($type==11){##録画予約済みchange - $colorchar="Green"; - } - my $link="rectool.pl?mode=confirm&mode_sub=reserve&chtxt=".$_[0]."&start=".$bttime->strftime( '%Y%m%d%H%M%S' )."&stop=".$ettime->strftime( '%Y%m%d%H%M%S' ); - getrect(0,$y,100,$h,$title,$tt2[4],$link,$colout,$colin,substr($tt2[2],8,4)." - ".substr($tt2[3],8,4),$colorchar);#x,y,width,height,title,desc,link,colorout,colorin - } - #print ""; - my $out = $svg->xmlify( - -pubid => "-//W3C//DTD SVG 1.1//EN", - -dtd => "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd", - ); - my $b ="http:\/\/www\.w3\.org\/TR\/2001\/REC-SVG-20010904\/DTD\/svg10\.dtd"; - my $e ="http:\/\/www\.w3\.org\/Graphics\/SVG\/1\.1\/DTD\/svg11\.dtd"; - $out =~ s/$b/$e/; - return $out; -} -sub getrect(){#x,y,width,height,title,desc,link,colorout,colorin,timedesc,colorfont - my $x=shift; - my $y=shift; - my $width=shift; - my $height=shift; - my $title=shift; - my $desc= shift; - my $link= shift; - my $colorout= shift; - my $colorin = shift; - my $timechar = shift; - my $colorchar = shift; - my $ttxt=$title." ".$desc; - utf8::decode($ttxt); - utf8::decode($title); - utf8::decode($desc); - my $anc = $svg -> anchor( - -href => $link, - 'target' => '_blank', - -title => $ttxt - ); - my $bgrec=$anc->group( - style=>{stroke=>"black",fill=>"black"} - ); - $bgrec->rectangle( - x=>"$x%",y=>"$y%", - width=>"$width%",height=>"$height%", - rx=>3.0,ry=>3.0, - #"stroke-width"=>"3", - ); - my $rec1=$anc->group( - #style=>{stroke=>$colorout,fill=>$colorin} - - ##############################test - style=>{stroke=>$colorout,fill=>$colorin} - - ); - my $charcol=$anc->group( - style=>{fill=>$colorchar} - ); - $rec1->rectangle( - x=>"$x%",y=>"$y%", - width=>"$width%",height=>"$height%", - rx=>3.0,ry=>3.0, - #'onmouseover'=>"evt.target.setAttribute('fill','yellow');", - #'onmouseout'=>"evt.target.setAttribute('fill',$colorin);" - #"stroke-width"=>"3", - ); - if ($height>4){ - $charcol ->text( - style => { - 'font-size' => "60%", - }, - - x=>"$x%",y=>($y+4)."%", - -cdata=>$timechar, - ); - } - if ($height>2){ - $charcol ->text( - style => { - 'font-size' => "80%", - }, - x=>"$x%",y=>($y+2)."%", - -cdata=>$title - ); - } - return ; -} diff --git a/Rec10WEBG3/trunk/rec10webg3.htm b/Rec10WEBG3/trunk/rec10webg3.htm deleted file mode 100644 index 0c783e2..0000000 --- a/Rec10WEBG3/trunk/rec10webg3.htm +++ /dev/null @@ -1,472 +0,0 @@ - - - - - - - - Rec10Suite 0.0.3 - - - - - - -
-
- Rec10Suite WEB Interface version 0.0.1 -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<<前
-
次>>
-
06h
-
12h
-
24h
-
test
-
-
-
-
-
-
-

Program Search:

Keyword
-
Search

-
-
-
-
-
-
-
-
-
<<前
-
次>>
-
06h
-
12h
-
24h
-
test
-
-
-
-
-
-
-
-
-

新規予約


-

-

-
-

タイトル:

-

-

-

-

詳細設定

- コマンド: -
- チャンネル: -

-

-

時刻設定

- 開始時間: -
-

- 終了時間: -
-


-

- 隔日検索: -

-
    -
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. -
  7. 6
  8. 7
  9. -
-

- 時刻揺らぎ: -
-
    -
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. -
  7. 6
  8. 7
  9. 8
  10. 9
  11. 10
  12. -
-
-

-

-

-
-
-
-
-
- - diff --git a/Rec10WEBG3/trunk/rec10webg3.py b/Rec10WEBG3/trunk/rec10webg3.py deleted file mode 100644 index 7c04f86..0000000 --- a/Rec10WEBG3/trunk/rec10webg3.py +++ /dev/null @@ -1,366 +0,0 @@ -#!/usr/bin/python -# coding: UTF-8 -# Rec10 TS Recording Tools -# Copyright (C) 2009-2011 Yukikaze -import cgi -import os -import os.path -import re -import datetime -import ConfigParser -import MySQLdb -import time -try: - import simplejson as json -except ImportError: - import json -#import cgitb -#cgitb.enable() - -path = str(os.path.dirname(os.path.abspath(__file__))) + "/" -confp = ConfigParser.SafeConfigParser() -Conf = 'rec10.conf' -cpath="" -if (os.path.exists(os.path.join(path,Conf))): - cpath=os.path.join(path,Conf) -elif (os.path.exists(os.path.join("/etc/rec10",Conf))): - cpath=os.path.join("/etc/rec10",Conf) -elif (os.path.exists(os.path.join("/etc",Conf))): - cpath=os.path.join("/etc",Conf) -confp.read(cpath) -def getpath(string): - global confp - return confp.get('path', string) -def getdbpath(string): - global confp - return confp.get('db', string) -def getdb(): - retdb = "" - if getdbpath('db') == 'MySQL': - dbn = getdbpath("mysql_dbname") - dbh = getdbpath("mysql_host") - dbu = getdbpath("mysql_user") - dbpwd = getdbpath("mysql_passwd") - dbport = int(getdbpath("mysql_port")) - #print [dbn,dbh,dbu,dbpwd,dbport] - retdb = DB_MySQL(dbname=dbn, host=dbh, user=dbu, passwd=dbpwd, port=dbport) - return retdb -class DB_MySQL: - dbname = "" - dbhost = "" - dbusr = "" - dbpasswd = "" - dbport = 0 - def __init__(self, dbname, user, passwd, host="localhost", port=3306): - self.dbname = dbname - self.dbhost = host - self.dbusr = user - self.dbpasswd = passwd - self.dbport = port - def connect_db(self): - """ - dbへの接続 - """ - con = MySQLdb.connect(db=self.dbname, host=self.dbhost, port=self.dbport,\ - user=self.dbusr, passwd=self.dbpasswd, charset="utf8") - cur = con.cursor() - cur.execute('set names utf8;') - return [con, cur] - def close_db(self, db): - db[1].close() - db[0].close() - - ###timelineç³» - def timeline2dic(self,timeline): - ret={} - ret['id']=timeline[0] - ret['type']=timeline[1] - ret['chtxt']=timeline[2] - ret['title']=timeline[3] - ret['btime']=timeline[4].strftime("%m/%d %H:%M") - ret['etime']=timeline[5].strftime("%H:%M") - ret['bt']=timeline[4] - ret['et']=timeline[5] - if not timeline[6]: - ret['deltatime']=timeline[6] - else: - ret['deltatime']="3" - if not timeline[7]: - ret['deltaday']=timeline[7] - else: - ret['deltaday']="7" - ret['opt']=timeline[8] - ret['epgtitle']=timeline[9] - ret['epgbtime']=timeline[10] - ret['epgetime']=timeline[11] - ret['epgduplicate']=timeline[12] - ret['epgchange']=timeline[13] - ret['epgexp']=timeline[14] - ret['counter']=timeline[15] - return ret - def select_all_timeline(self): - db = self.connect_db() - recdata = [] - dl = db[1].execute("SELECT id,type,chtxt,title,btime,etime,deltatime,deltaday,opt,\ - epgtitle,epgbtime,epgetime,epgduplicate,epgchange,epgexp,counter FROM timeline ORDER BY btime") - dls = db[1].fetchall() - for line in dls: - recdata.append(self.timeline2dic(line)) - self.close_db(db) - return recdata - def select_by_chtxt_timeline(self, chtxt): - db = self.connect_db() - recdata = [] - dl = db[1].execute("SELECT id,type,chtxt,title,btime,etime,deltatime,deltaday,opt,\ - epgtitle,epgbtime,epgetime,epgduplicate,epgchange,epgexp,counter FROM timeline WHERE chtxt = %s ", (chtxt, )) - d = db[1].fetchall() - for line in dls: - recdata.append(self.timeline2dic(line)) - self.close_db(db) - return recdata - def select_by_id_timeline(self, idt): - db = self.connect_db() - recdata = [] - dl = db[1].execute("SELECT id,type,chtxt,title,btime,etime,deltatime,deltaday,opt,\ - epgtitle,epgbtime,epgetime,epgduplicate,epgchange,epgexp,counter FROM timeline WHERE id = %s ", (idt, )) - d = db[1].fetchall() - for line in dls: - recdata.append(self.timeline2dic(line)) - self.close_db(db) - return recdata - def select_by_btime_etime_chtxt_timeline(self,btime,etime,chtxt): - db = self.connect_db() - recdata = [] - dl = db[1].execute("SELECT id,type,chtxt,title,btime,etime,deltatime,deltaday,opt,\ - epgtitle,epgbtime,epgetime,epgduplicate,epgchange,epgexp,counter FROM timeline \ - WHERE btime >= %s AND etime <= %s AND chtxt = %s", (btime,etime,chtxt )) - dls = db[1].fetchall() - for line in dls: - recdata.append(self.timeline2dic(line)) - self.close_db(db) - return recdata - def add_timeline(self, type="", chtxt="", title="", btime="", etime="", deltatime="", deltaday="", opt=""): - db = self.connect_db() - db[1].execute('INSERT IGNORE INTO timeline (type,chtxt,title,btime,etime,deltatime,deltaday,opt) \ - values (%s,%s,%s,%s,%s,%s,%s,%s)', (type, chtxt, title, btime, etime, deltatime, deltaday, opt)) - self.close_db(db) - - - ########epg_chç³» - def epg_ch2dic(self,epg_ch): - ret={} - ret['bctype']=epg_ch[0] - ret['chtxt']=epg_ch[1] - ret['ch']=epg_ch[2] - ret['csch']=epg_ch[3] - ret['chname']=epg_ch[4] - ret['updatetime']=epg_ch[5] - ret['status']=epg_ch[6] - ret['visible']=epg_ch[7] - if ret["chtxt"].split("_")[0]=="BS": - ret["type"]="BS" - elif ret["chtxt"].split("_")[0]=="CS": - ret["type"]="CS" - else: - ret["type"]="TE" - return ret - def select_all_epg_ch(self): - db = self.connect_db() - r1 = db[1].execute("SELECT bctype,chtxt,ch,csch,chname,updatetime,status,visible FROM epg_ch") - lines = db[1].fetchall() - ret=[] - for ls in lines: - ret.append(self.epg_ch2dic(ls)) - self.close_db(db) - return ret - def select_by_chtxt_epg_ch(self, chtxt): - db = self.connect_db() - r1 = db[1].execute("SELECT bctype,chtxt,ch,csch,chname,updatetime,status,visible FROM epg_ch WHERE chtxt=%s", (chtxt, )) - lines = db[1].fetchall() - ret=[] - for ls in lines: - ret.append(epg_ch2dic(ls)) - self.close_db(db) - return ret - - ########epg_timelineç³» - def epg_timeline2dic(self,epg_timeline): - ret={} - ret['bctype']=epg_timeline[0] - ret['channel']=epg_timeline[1] - ret['chtxt']=epg_timeline[1] - ret['start']=datetime.datetime(*time.strptime(epg_timeline[2], "%Y%m%d%H%M%S")[:-3]) - ret['stop']=datetime.datetime(*time.strptime(epg_timeline[3], "%Y%m%d%H%M%S")[:-3]) - ret['bt']=ret['start'] - ret['et']=ret['stop'] - ret['btime']=ret['bt'].strftime("%Y-%m-%d %H:%M:%S") - ret['etime']=ret['et'].strftime("%Y-%m-%d %H:%M:%S") - ret['title']=epg_timeline[4] - ret['exp']=epg_timeline[5] - ret['longexp']=epg_timeline[6] - ret['category']=epg_timeline[7] - return ret - def select_all_epg_timeline(self): - db = self.connect_db() - r1 = db[1].execute("SELECT bctype,channel,start,stop,title,exp,longexp,category FROM epg_timeline") - lines = db[1].fetchall() - ret=[] - for ls in lines: - ret.append(self.epg_timeline2dic(ls)) - self.close_db(db) - return ret - def select_by_chtxt_epg_timeline(self, chtxt): - db = self.connect_db() - r1 = db[1].execute("SELECT bctype,channel,start,stop,title,exp,longexp,category FROM epg_timeline WHERE channel=%s", (chtxt, )) - lines = db[1].fetchall() - ret=[] - for ls in lines: - ret.append(self.epg_timeline2dic(ls)) - self.close_db(db) - return ret - def select_by_btime_etime_chtxt_epg_timeline(self,btime,etime,chtxt): - db = self.connect_db() - start=datetime.datetime(*time.strptime(btime, "%Y-%m-%d %H:%M:%S")[:-3]).strftime("%Y%m%d%H%M%S") - stop=datetime.datetime(*time.strptime(etime, "%Y-%m-%d %H:%M:%S")[:-3]).strftime("%Y%m%d%H%M%S") - recdata = [] - dl = db[1].execute("SELECT bctype,channel,start,stop,title,exp,longexp,category FROM epg_timeline \ - WHERE start >= %s AND stop <= %s AND channel = %s", (start,stop,chtxt )) - dls = db[1].fetchall() - for line in dls: - recdata.append(self.epg_timeline2dic(line)) - self.close_db(db) - return recdata - def select_by_keyword_title_epg_timeline(self,keyword="",chtxt="",btime="",etime=""): - keyt="" - chtxtt="" - btimet="" - etimet="" - if len(keyword)>0: - keyt=" AND title LIKE '%"+keyt+"%' " - if len(btime)>0: - start=datetime.datetime(*time.strptime(btime, "%Y-%m-%d %H:%M:%S")[:-3]).strftime("%Y%m%d%H%M%S") - stop=datetime.datetime(*time.strptime(etime, "%Y-%m-%d %H:%M:%S")[:-3]).strftime("%Y%m%d%H%M%S") - btimet=" AND start >= "+start+" " - etimet=" AND stop <= "+stop+" " - if len(chtxt)>0: - chtxtt=" AND channel = "+chtxt+" " - db = self.connect_db() - recdata = [] - #print "SELECT bctype,channel,start,stop,title,exp,longexp,category FROM epg_timeline \ - #WHERE bctype LIKE '%' "+keyt+btimet+etimet+chtxtt+"" - dl = db[1].execute("SELECT bctype,channel,start,stop,title,exp,longexp,category FROM epg_timeline \ - WHERE bctype LIKE '%' "+keyt+btimet+etimet+chtxtt+"") - dls = db[1].fetchall() - for line in dls: - recdata.append(self.epg_timeline2dic(line)) - self.close_db(db) - return recdata -#####ここまでDBの読み込み/書き込み系 -global db -db=getdb() -jsonHeader="Content-Type: application/json;charset=utf-8\n" -htmlHeader="Content-Type: text/html; charset=utf-8\n" -global f -f = cgi.FieldStorage() -#mode="timeline" -mode="" - - - -if f.getfirst('mode',""): - mode=f.getfirst('mode', "") -if mode=="chtypelist": - #print "Content-Type: application/json;charset=utf-8\n" - print jsonHeader - typest={"identifier":"id","items":[ - { - "id":"search_everyday", - "label":u"隔日検索" - },{ - "id":"search_today", - "label":u"当日検索" - },{ - "id":"reserve_flexible", - "label":u"浮動予約" - },{ - "id":"reserve_fixed", - "label":u"確定予約" - },{ - "id":"convert_b25_ts", - "label":u"解読予約" - },{ - "id":"convert_ts_mp4", - "label":u"縁故予約" - } - ]} - print json.dumps(typest) -if mode=="chlist": - chls=db.select_all_epg_ch() - chll={"identifier":"id","items":[]} - for chl in chls: - chll["items"].append({"id":chl["chtxt"],"type":chl["type"],"label":chl["chname"]}) - print jsonHeader - print json.dumps(chll) -if mode=="timeline":####録画一覧用 - tlll={"identifier":"id","items":[]} - dbl=None - if f.getfirst("chtxt"): - dbl=db.select_by_btime_etime_chtxt_timeline(btime,etime,chtxt) - else: - dbl=db.select_all_timeline() - if dbl: - for dbi in dbl: - tlll["items"].append({"id":dbi["id"],"btime":dbi["btime"],"etime":dbi["etime"], - "chtxt":dbi["chtxt"],"title":dbi["title"],"type":dbi["type"], - "deltatime":dbi["deltatime"],"deltaday":dbi["deltaday"], - "opt":dbi["opt"]}) - #print jsonHeader - print htmlHeader - print json.dumps(tlll,encoding="utf-8") -if mode=="epg-timeline": - tlll={"items":[]} - btime=f.getfirst("btime") - etime=f.getfirst("etime") - if not btime: - btime=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") - if not etime: - et=datetime.datetime.now()+datetime.timedelta(days=8) - etime=et.strftime("%Y-%m-%d %H:%M:%S") - chtxt=f.getfirst("chtxt") - if not chtxt: - chtxt="18_3096" - if chtxt: - dbl=db.select_by_btime_etime_chtxt_epg_timeline(btime,etime,chtxt) - for dbi in dbl: - tlll["items"].append({"id":dbi["btime"],"btime":dbi["btime"], - "chtxt":dbi["chtxt"],"title":dbi["title"], - "exp":dbi["exp"],"longexp":dbi["longexp"], - "category":dbi["category"]}) - print jsonHeader - #print htmlHeader - print json.dumps({"data":tlll},encoding="utf-8") -if mode=="epg-search": - tlll={"items":[]} - btime=f.getfirst("btime") - etime=f.getfirst("etime") - if not btime: - bt=datetime.datetime.now() - btime=bt.strftime("%Y-%m-%d %H:%M:%S") - if not etime: - et=datetime.datetime.now()+datetime.timedelta(days=8) - etime=et.strftime("%Y-%m-%d %H:%M:%S") - chtxt=f.getfirst("chtxt") - if not chtxt: - chtxt="" - keyword=f.getfirst("keyword") - if not keyword: - keyword="" - dbl=db.select_by_keyword_title_epg_timeline(keyword=keyword,chtxt=chtxt,btime=btime,etime=etime) - for dbi in dbl: - tlll["items"].append({"id":dbi["btime"],"btime":dbi["btime"], - "chtxt":dbi["chtxt"],"title":dbi["title"], - "exp":dbi["exp"],"longexp":dbi["longexp"], - "category":dbi["category"]}) - print jsonHeader - #print htmlHeader - print json.dumps({"data":tlll},encoding="utf-8") diff --git a/iRec10EPG/trunk/dist/iRec10EPG-Setup_0.3.3.exe b/iRec10EPG/trunk/dist/iRec10EPG-Setup_0.3.3.exe deleted file mode 100644 index c16a367..0000000 Binary files a/iRec10EPG/trunk/dist/iRec10EPG-Setup_0.3.3.exe and /dev/null differ diff --git a/iRec10EPG/trunk/src/HP-TV-Dock.ico b/iRec10EPG/trunk/src/HP-TV-Dock.ico deleted file mode 100644 index 995248f..0000000 Binary files a/iRec10EPG/trunk/src/HP-TV-Dock.ico and /dev/null differ diff --git a/iRec10EPG/trunk/src/iRec10EPG.py b/iRec10EPG/trunk/src/iRec10EPG.py deleted file mode 100644 index 7c4783c..0000000 --- a/iRec10EPG/trunk/src/iRec10EPG.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/python -# coding: UTF-8 -# iRec10EPG Rec10 iEPG supporting tool -#Copyright 2009 Yukikaze -import os -import ConfigParser -import codecs -import webbrowser -import sys -import re -import urllib -mypath=os.path.dirname(sys.argv[0]) -def rec10web(webpath,title,station,btime,etime): - browserpath="title="+title+"&btime="+btime+"&etime="+etime+"&station="+station - browserpath=urllib.quote_plus(browserpath,"=&") - browserpath=webpath+"?"+browserpath - print browserpath - - webbrowser.open(browserpath,new=2) -def iepg2rec10webopts(path): - station="" - year="" - month="" - date="" - start="" - end="" - title="" - - for line in codecs.open(path,'r','shift_jis'): - if re.search('station:',line): - station=line.replace("station:","") - station=station.replace(" ","") - station=station.replace("\r\n","") - elif re.search('year:',line): - year=line.replace("year:","") - year=year.replace(" ","") - year=year.replace("\r\n","") - elif re.search('month:',line): - month=line.replace("month:","") - month=month.replace(" ","") - month=month.replace("\r\n","") - elif re.search('date:',line): - date=line.replace("date:","") - date=date.replace(" ","") - date=date.replace("\r\n","") - elif re.search('start:',line): - start=line.replace("start:","") - start=start.replace(" ","") - start=start.replace("\r\n","") - elif re.search('end:',line): - end=line.replace("end:","") - end=end.replace(" ","") - end=end.replace("\r\n","") - elif re.search('program-title:',line): - title=line.replace("program-title:","") - title=title.replace(" ","") - title=title.replace("\r\n","") - ret={} - ret['title']=title.encode('UTF-8') - ret['btime']=year+"-"+month+"-"+date+" "+start+":00" - ret['btime']=ret['btime'].encode('UTF-8') - ret['etime']=year+"-"+month+"-"+date+" "+end+":00" - ret['etime']=ret['etime'].encode('UTF-8') - ret['station']=station.encode('UTF-8') - return ret - - -confp=ConfigParser.SafeConfigParser() -Conf=os.path.join(mypath, 'setting.ini') -confp.read(Conf) -rec10path=confp.get('path','rec10web') -print rec10path -argvs=sys.argv -webopt=iepg2rec10webopts(argvs[1]) -print webopt - -rec10web(rec10path,webopt['title'],webopt['station'],webopt['btime'],webopt['etime']) diff --git a/iRec10EPG/trunk/src/readme.txt b/iRec10EPG/trunk/src/readme.txt deleted file mode 100644 index 813b56e..0000000 --- a/iRec10EPG/trunk/src/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -iRec10EPG -Rec10iEPG‘ΉžƒNƒ‰ƒCƒAƒ“ƒg- ver.0.3.1 - -–{ƒ\ƒtƒg‚ðŽg‚¤‚½‚߂ɂ͘^‰æ‚ðs‚¤ƒ}ƒVƒ“‚ÉRec10web‚ªÝ’u‚³‚ê‚Ä‚¢‚é•K—v‚ª‚ ‚è‚Ü‚· -[’ˆÓ] -ƒCƒ“ƒXƒg[ƒ‹æ‚Ìsetting.ini(‰Šú‚Å‚ÍC:\Program Files\iRec10EPG)‚É -rec10web.py‚ւ̃AƒhƒŒƒX‚ð‘‚«ž‚ñ‚Å‚­‚¾‚³‚¢B - - -Copyright (C) 2009 yukikaze(yukikaze.jp@gmail.com) -http://gn64.web.fc2.com/ \ No newline at end of file diff --git a/iRec10EPG/trunk/src/setting.ini b/iRec10EPG/trunk/src/setting.ini deleted file mode 100644 index 669914a..0000000 --- a/iRec10EPG/trunk/src/setting.ini +++ /dev/null @@ -1,2 +0,0 @@ -[path] -rec10web=http:///rec10web.py diff --git a/iRec10EPG/trunk/src/setup.py b/iRec10EPG/trunk/src/setup.py deleted file mode 100644 index 3dac8fe..0000000 --- a/iRec10EPG/trunk/src/setup.py +++ /dev/null @@ -1,13 +0,0 @@ -from distutils.core import setup -import py2exe - -py2exe_options = { - "compressed": 1, - "optimize": 2, - "bundle_files": 2} - -setup( - options = {"py2exe": py2exe_options}, - console = [ - {"script" : "iRec10EPG.py", "icon_resources": [(1,"HP-TV-Dock.ico")]}], - zipfile = None)