From: gn64_jp Date: Sun, 24 May 2009 03:02:08 +0000 (+0000) Subject: Import iRec10EPG ver0.3.3 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=158aaf78ff82ce3fe39fb0248df9fcc882eefe53;p=rec10%2Frec10-git.git Import iRec10EPG ver0.3.3 git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@7 4e526526-5e11-4fc0-8910-f8fd03428081 --- diff --git a/iRec10EPG/trunk/dist/iRec10EPG-Setup_0.3.3.exe b/iRec10EPG/trunk/dist/iRec10EPG-Setup_0.3.3.exe new file mode 100644 index 0000000..c16a367 Binary files /dev/null and b/iRec10EPG/trunk/dist/iRec10EPG-Setup_0.3.3.exe differ diff --git a/iRec10EPG/trunk/src/HP-TV-Dock.ico b/iRec10EPG/trunk/src/HP-TV-Dock.ico new file mode 100644 index 0000000..995248f Binary files /dev/null and b/iRec10EPG/trunk/src/HP-TV-Dock.ico differ diff --git a/iRec10EPG/trunk/src/iRec10EPG.py b/iRec10EPG/trunk/src/iRec10EPG.py new file mode 100644 index 0000000..16471d7 --- /dev/null +++ b/iRec10EPG/trunk/src/iRec10EPG.py @@ -0,0 +1,75 @@ +#!/usr/bin/python +# coding: UTF-8 +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 new file mode 100644 index 0000000..813b56e --- /dev/null +++ b/iRec10EPG/trunk/src/readme.txt @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..669914a --- /dev/null +++ b/iRec10EPG/trunk/src/setting.ini @@ -0,0 +1,2 @@ +[path] +rec10web=http:///rec10web.py diff --git a/iRec10EPG/trunk/src/setup.py b/iRec10EPG/trunk/src/setup.py new file mode 100644 index 0000000..3dac8fe --- /dev/null +++ b/iRec10EPG/trunk/src/setup.py @@ -0,0 +1,13 @@ +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)