OSDN Git Service

delete branch files
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 8 Jun 2009 21:39:43 +0000 (21:39 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 8 Jun 2009 21:39:43 +0000 (21:39 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@50 4e526526-5e11-4fc0-8910-f8fd03428081

48 files changed:
rec10/branches/0.4/src/chdata.py [deleted file]
rec10/branches/0.4/src/chdb.py [deleted file]
rec10/branches/0.4/src/config.ini [deleted file]
rec10/branches/0.4/src/configreader.py [deleted file]
rec10/branches/0.4/src/dbviewer.py [deleted file]
rec10/branches/0.4/src/epgdb.py [deleted file]
rec10/branches/0.4/src/install.py [deleted file]
rec10/branches/0.4/src/license-ja.txt [deleted file]
rec10/branches/0.4/src/license.txt [deleted file]
rec10/branches/0.4/src/missed.py [deleted file]
rec10/branches/0.4/src/readme.txt [deleted file]
rec10/branches/0.4/src/rec10d.py [deleted file]
rec10/branches/0.4/src/rec10gridserver.py [deleted file]
rec10/branches/0.4/src/recdb.py [deleted file]
rec10/branches/0.4/src/recdblist.py [deleted file]
rec10/branches/0.4/src/src/chdata.py [deleted file]
rec10/branches/0.4/src/src/chdb.py [deleted file]
rec10/branches/0.4/src/src/config.ini [deleted file]
rec10/branches/0.4/src/src/configreader.py [deleted file]
rec10/branches/0.4/src/src/dbviewer.py [deleted file]
rec10/branches/0.4/src/src/epgdb.py [deleted file]
rec10/branches/0.4/src/src/install.py [deleted file]
rec10/branches/0.4/src/src/license-ja.txt [deleted file]
rec10/branches/0.4/src/src/license.txt [deleted file]
rec10/branches/0.4/src/src/missed.py [deleted file]
rec10/branches/0.4/src/src/readme.txt [deleted file]
rec10/branches/0.4/src/src/rec10d.py [deleted file]
rec10/branches/0.4/src/src/rec10gridserver.py [deleted file]
rec10/branches/0.4/src/src/recdb.py [deleted file]
rec10/branches/0.4/src/src/recdblist.py [deleted file]
rec10/branches/0.4/src/src/status.py [deleted file]
rec10/branches/0.4/src/src/tester.py [deleted file]
rec10/branches/0.4/src/src/timerec.py [deleted file]
rec10/branches/0.4/src/src/ts2epg.py [deleted file]
rec10/branches/0.4/src/src/ts2x264.py [deleted file]
rec10/branches/0.4/src/src/ts2xvid.py [deleted file]
rec10/branches/0.4/src/src/tv2avi.py [deleted file]
rec10/branches/0.4/src/src/tv2ts.py [deleted file]
rec10/branches/0.4/src/src/xml2db.py [deleted file]
rec10/branches/0.4/src/status.py [deleted file]
rec10/branches/0.4/src/tester.py [deleted file]
rec10/branches/0.4/src/timerec.py [deleted file]
rec10/branches/0.4/src/ts2epg.py [deleted file]
rec10/branches/0.4/src/ts2x264.py [deleted file]
rec10/branches/0.4/src/ts2xvid.py [deleted file]
rec10/branches/0.4/src/tv2avi.py [deleted file]
rec10/branches/0.4/src/tv2ts.py [deleted file]
rec10/branches/0.4/src/xml2db.py [deleted file]

diff --git a/rec10/branches/0.4/src/chdata.py b/rec10/branches/0.4/src/chdata.py
deleted file mode 100644 (file)
index 098f9e5..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import sqlite3
-
-import os
-#CS放送では複数のチャンネルを指定する必要があるためチャンネル名をテキストデータで持っておき(chtxt)、必要に応じて変換する
-#ontvはepgデータなどで指定されている名前
-#ここの設定は愛知県の設定(+CS放送スカパーe2)
-dbpath = str(os.path.dirname(os.path.abspath(__file__))) + "/" + "ch.db"
-#db=sqlite3.connect(dbpath)
-db = sqlite3.connect(dbpath)
-try:
-
-    db.execute('drop table chdata')
-    db.commit()
-except:
-    test = ""
-
-try:
-    db.execute('create table chdata (bctype TEXT,ontv TEXT,chtxt TEXT,ch TEXT,csch TEXT,station TEXT,updatetime TEXT)')
-except:
-    ""
-db.commit()
-
-#except:
-#   print "テーブル作成に失敗しました"
-#   db.commit()
-#db.commit()
-db.close()
-def chadd(bctype, ontv, chtxt, ch, csch,station):#すべて文字列
-    """
-    ChannelDBに指定したデータを追加する
-    bctype:放送種別,bs/cs/te10などが入る。
-    番組表データがbs,csは一括でとれるためbs,cs内で区別はなし
-    te(地上波)は各チャンネルごとに設定する必要があるためteに
-    チャンネルの数字を足したものにする
-    """
-    db = sqlite3.connect(dbpath)
-    value = "(\'" + bctype + "\',\'" + ontv + "\',\'" + chtxt + "\',\'" + ch + "\',\'" + csch + "\',\'" +station+ "\',datetime(\'2009-04-01 00:00:00\'))"
-    print value
-    value = unicode(value)
-    db.execute('insert into chdata values ' + value)
-    db.commit()
-    db.close()
-#db.commit
-chadd('cs', '1204.ontvjapan.com', 'natiogeo', 'CS6', '343','CSDT343')
-chadd('cs', '1070.ontvjapan.com', 'bbc', 'CS12', '353','CSDT353')
-chadd('cs', '1069.ontvjapan.com', 'cnn', 'CS12', '354','CSDT354')
-chadd('cs', '1045.ontvjapan.com', 'kids', 'CS22', '330','CSDT330')
-chadd('cs', '1007.ontvjapan.com', 'movieplus', 'CS18', '240','CSDT240')
-chadd('cs', '1016.ontvjapan.com', 'fox', 'CS4', '312','CSDT312')
-chadd('cs', '1014.ontvjapan.com', 'axn', 'CS6', '311','CSDT311')
-chadd('cs', '1201.ontvjapan.com', 'atx', 'CS16', '333','CSDT333')
-chadd('cs', '1050.ontvjapan.com', 'hisch', 'CS16', '342','CSDT342')
-chadd('cs', '1047.ontvjapan.com', 'animax', 'CS20', '332','CSDT332')
-chadd('cs', '1062.ontvjapan.com', 'disch', 'CS20', '340','CSDT340')
-chadd('cs', '1193.ontvjapan.com', 'anipla', 'CS20', '341','CSDT341')
-chadd('cs', '1008.ontvjapan.com', 'neco', 'CS6', '223','CSDT223')
-chadd('cs', '1015.ontvjapan.com', 'family', 'CS22', '293','CSDT293')
-
-chadd('cs', '1009.ontvjapan.com', 'yo-ga', 'CS6', '224','CSDT224')
-chadd('cs2', '1217.ontvjapan.com', 'thecinema', 'CS10', '228','CSDT228')
-chadd('cs2', '1086.ontvjapan.com', 'nihoneiga', 'CS2', '239','CSDT239')
-
-#chadd('cs', '1015.ontvjapan.com', 'fuji-one', 'CS22', '293')
-#chadd('cs', '1015.ontvjapan.com', 'fuji-two', 'CS22', '293')
-chadd('te13', '0442.ontvjapan.com', 'nhk-k', '13', '0','DFS00C08')
-chadd('te20', '0432.ontvjapan.com', 'nhk-s', '20', '0','DFS08400')
-chadd('te22', '0404.ontvjapan.com', 'me-tere', '22', '0','DFS00C20')
-chadd('te18', '0405.ontvjapan.com', 'cbc', '18', '0','DFS00C18')
-chadd('te21', '0406.ontvjapan.com', 'toukai', '21', '0','DFS00C10')
-chadd('te19', '0407.ontvjapan.com', 'chukyo', '19', '0','DFS00C28')
-chadd('te23', '0420.ontvjapan.com', 'aichi', '23', '0','DFS08430')
-chadd('bs', '3001.ontvjapan.com', 'bs-nhk-1', '101', '0','BSDT101')
-chadd('bs', '3002.ontvjapan.com', 'bs-nhk-2', '102', '0','BSDT102')
-chadd('bs', '3003.ontvjapan.com', 'bs-nhk-hi', '103', '0','BSDT103')
-chadd('bs', '3004.ontvjapan.com', 'bs-nittere', '141', '0','BSDT141')
-chadd('bs', '3005.ontvjapan.com', 'bs-asahi', '151', '0','BSDT151')
-chadd('bs', '3006.ontvjapan.com', 'bs-tbs', '161', '0','BSDT161')
-chadd('bs', '3007.ontvjapan.com', 'bs-japan', '171', '0','BSDT171')
-chadd('bs', '3008.ontvjapan.com', 'bs-fuji', '181', '0','BSDT181')
-chadd('bs', '3013.ontvjapan.com', 'bs-11', '211', '0','BSDT211')
-
diff --git a/rec10/branches/0.4/src/chdb.py b/rec10/branches/0.4/src/chdb.py
deleted file mode 100644 (file)
index 9b3e06b..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
- # モジュール属性 argv を取得するため
-import os
-import sqlite3
-
-dbpath=str(os.path.dirname(os.path.abspath(__file__)))+"/"+"ch.db"
-#db=sqlite3.connect(dbpath)
-
-def ontvsearch(ontvin):
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata WHERE ontv = \""+ontvin+"\""):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        ret.append(rett)
-    db.close()
-    return ret[0]
-def chtxtsearch(chtxtin):
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    print chtxtin
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata WHERE chtxt = \""+chtxtin+"\""):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        #print rett
-        ret.append(rett)
-    db.close()
-    return ret[0]
-def bctypesearch(bctypein):
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata WHERE bctype = \""+bctypein+"\""):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        #print rett
-        ret.append(rett)
-    db.close()
-    return ret[0]
-def chsearch(chin):
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata WHERE ch = \""+chin+"\""):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        #print rett
-        ret.append(rett)
-    db.close()
-    return ret[0]
-def getall():
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata"):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        #print rett
-        ret.append(rett)
-    db.close()
-    print ret
-    return ret[0]
-
-def update():
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    CSupdate=0
-    CS2update=0
-    BSupdate=0
-    for bctype , chtxt in db.execute("SELECT bctype,chtxt FROM chdata WHERE updatetime < datetime(\'now\',\'localtime\',\'-6 hours\')"):
-        #print bctype
-        if bctype=="cs":
-            if CSupdate==0:
-                ret.append("cs")
-                CSupdate=1
-                print "csの番組表取得開始"
-                db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE bctype = \""+bctype+"\"")
-        if bctype=="cs2":
-            if CS2update==0:
-                ret.append("cs2")
-                CSupdate=1
-                print "csの番組表取得開始"
-                db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE bctype = \""+bctype+"\"")
-        elif bctype=="bs":
-            if BSupdate==0:
-                ret.append("bs")
-                BSupdate=1
-                print "bsの番組表取得開始"
-                db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE bctype = \""+bctype+"\"")
-        else:
-            ret.append(bctype)
-            print bctype
-            print "取得開始"
-            db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE bctype = \""+bctype+"\" AND chtxt = \""+chtxt+"\"")
-    #db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE updatetime < datetime(\'now\',\'localtime\',\'-2 hours\')")
-    db.commit()
-    db.close()
-    print ret
-    return ret
-def viewall():
-    db=sqlite3.connect(dbpath)
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata"):
-        print (bctype+","+ontv+","+chtxt+","+ch+","+csch+","+updatetime)
-    db.close()
-#def updateall():
-
-       
diff --git a/rec10/branches/0.4/src/config.ini b/rec10/branches/0.4/src/config.ini
deleted file mode 100644 (file)
index f1269a8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[path]
-recpt1=/usr/local/bin/recpt1
-recpt1-bak=/pt1-tools/recpt1/recpt1
-b25-BAK=/pt1-tools/b25/b25
-b25=/usr/local/bin/b25
-splitt=/pt1-tools/tstools/TsSplitter.exe
-tsrename=/pt1-tools/tstools/TsRename.exe
-bontsdemux=/pt1-tools/tstools/BonTsDemux.exe
-tsepg2xml=/pt1-tools/tstools/tsEpg2xml/tsEpg2xml.exe
-temppath=/pt1-tools/temp
-recpath=/home/ftpusr/ftp3/Recording
-cmdow=/pt1-tools/tstools/cmdow.exe
-cmdwine=wine /pt1-tools/tstools/cmdow.exe /run /hid
-gridserver_port=10910
-wine=wine 
-epg2xmlpath=/media/ramdisk
-
diff --git a/rec10/branches/0.4/src/configreader.py b/rec10/branches/0.4/src/configreader.py
deleted file mode 100644 (file)
index 3f7d663..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import ConfigParser
-
-mypath=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-
-confp=ConfigParser.SafeConfigParser()
-Conf='config.ini'
-confp.read(mypath+Conf)
-
-def getpath(string):
-    global confp
-    return confp.get('path',string)
diff --git a/rec10/branches/0.4/src/dbviewer.py b/rec10/branches/0.4/src/dbviewer.py
deleted file mode 100644 (file)
index eade363..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import recdb
-import sqlite3
-import os
-dbpath=str(os.path.dirname(os.path.abspath(__file__)))+"/"+"ch.db"
-tasks=recdb.getall()
-db=sqlite3.connect(dbpath)
-
-
-print "チャンネルデータ"
-for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata"):
-    print (bctype+","+ontv+","+chtxt+","+ch+","+csch+","+updatetime)
-db.close()
-print "録画予約"
-for task in tasks:
-        #value=line.split(",")
-        if task["type"]=="res":#"res,"+chtxt+","+title+","+btime+","+etime+","+opt
-            chtxt=task['chtxt']
-            title=task['title']
-            btime=task['btime']
-            etime=task['etime']
-            opt=task['opt']
-            print "録画予約"+","+chtxt+","+title+","+btime+","+etime+","+opt
-        elif task["type"]=="key":#"key,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-            chtxt=task['chtxt']
-            #title=task['title']
-            btime=task['btime']
-            #etime=task['etime']
-            keyword=task['title']
-            deltatime=task['deltatime']
-            opt=task['opt']
-            print "検索予約"+","+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-        elif task["type"]=="keyevery":#"keyevery,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-            chtxt=task['chtxt']
-            #title=task['title']
-            btime=task['btime']
-            #etime=task['etime']
-            keyword=task['title']
-            deltatime=task['deltatime']
-            opt=task['opt']                    
-            deltaday=task['deltaday']
-            print "隔日予約"+","+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-        elif task["type"]=="rec":#"rec,"+chtxt+","+title+","+btime+","+etime+","+opt
-            chtxt=task['chtxt']
-            title=task['title']
-            print title
-            btime=task['btime']
-            etime=task['etime']
-            #keyword=task['keyword']
-            #deltatime==task['deltatime']
-            opt=task['opt']
-            print "予約最終"+","+chtxt+","+title+","+btime+","+etime+","+opt
-
diff --git a/rec10/branches/0.4/src/epgdb.py b/rec10/branches/0.4/src/epgdb.py
deleted file mode 100644 (file)
index 12d46a8..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import sqlite3
-import chdb
-import datetime
-import ts2epg
-import xml2db
-#import japanesenkf
-#japanesenkf.overrideEncodings()
-path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-tmppath=path
-def update(chtxt):
-    print chtxt
-    tnow=datetime.datetime.now()
-    try:
-        lastup=datetime.datetime.strptime(chdb.chtxtsearch(chtxt)[0]['update'],"%Y-%m-%d %H:%M:%S")
-    except:
-        lastup=datetime.datetime.strptime("2009-04-01 00:00:00","%Y-%m-%d %H:%M:%S")
-    dt=tnow-lastup
-    dt=dt.days*24*60+dt.seconds
-    #print dt
-    if dt>2*60*60:
-        ts2epg.write(tmppath+"epgdate.xml",chdb.chtxtsearch(chtxt)['ch'])
-        xml2db.xml2db(tmppath+"epgdate.xml",path+"ch.db",chdb.chtxtsearch(chtxt)['bctype'])
-        #os.remove(path+"epgdate.xml")
-def updatebc(bctype):
-    #print bctype
-    #tnow=datetime.datetime.now()
-    bctypel=chdb.bctypesearch(bctype)
-    print bctypel
-    ts2epg.write(tmppath+"epgdate.xml",chdb.bctypesearch(bctype)['ch'])
-    xml2db.xml2db(tmppath+"epgdate.xml",path+"ch.db",bctype)
-    #os.remove(path+"epgdate.xml")
-def updateall():
-    update("hisch")
-    update("nhk-k")
-    update("nhk-s")
-    update("me-tere")
-    update("cbc")
-    update("aichi")
-    update("toukai")
-    update("chukyo")
-    update("bs-nhk-1")
-    
-def search(titletxt):
-    dbpath=path+"ch.db"
-    db=sqlite3.connect(dbpath)
-    #print dbpath
-    ret=[]
-    for ch, title, start, stop in db.execute("SELECT channel,title,start,stop FROM tv WHERE title LIKE \"%"+titletxt+"%\""):
-        btime=start.replace(" +0900","")
-        btime=btime[0:4]+"-"+btime[4:6]+"-"+btime[6:8]+" "+btime[8:10]+":"+btime[10:12]+":00"
-        etime=stop.replace(" +0900","")
-        etime=etime[0:4]+"-"+etime[4:6]+"-"+etime[6:8]+" "+etime[8:10]+":"+etime[10:12]+":00"
-        try:
-            chtxt=chdb.ontvsearch(ch)['chtxt']
-        except:
-            chtxt="Unknown"
-            #print ch
-        ret.append(chtxt+","+title.encode('utf-8')+","+btime+","+etime)
-
-    #r=db.execute("SELECT * FROM tv")
-    #for row in r:
-    #  print unicode(row)
-    #row=r.fetchone()
-    #print r
-    db.close()
-    return ret
-def searchtime(titletxt,time,deltatime):#時間以内のものだけを表示 deltatimeはhours
-    dbpath=path+"ch.db"
-    db=sqlite3.connect(dbpath)
-    #print dbpath
-    ret=[]
-    deltatime=int(deltatime)
-    for ch, title, start, stop in db.execute("SELECT channel,title,start,stop FROM tv WHERE title LIKE \"%"+titletxt+"%\""):
-        btime=start.replace(" +0900","")
-        btime=btime[0:4]+"-"+btime[4:6]+"-"+btime[6:8]+" "+btime[8:10]+":"+btime[10:12]+":00"
-        etime=stop.replace(" +0900","")
-        etime=etime[0:4]+"-"+etime[4:6]+"-"+etime[6:8]+" "+etime[8:10]+":"+etime[10:12]+":00"
-        bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
-        t=datetime.datetime.strptime(time,"%Y-%m-%d %H:%M:%S")
-        try:
-            chtxt=chdb.ontvsearch(ch)['chtxt']
-        except:
-            chtxt="Unknown"
-            #print ch
-        dt=bt-t
-        dt=dt.days*24*60*60+dt.seconds
-        dt=abs(dt)
-        if dt<deltatime*60*60:
-            ret.append(chtxt+","+title.encode('utf-8')+","+btime+","+etime)
-
-    #r=db.execute("SELECT * FROM tv")
-    #for row in r:
-    #  print unicode(row)
-    #row=r.fetchone()
-    #print r
-    db.close()
-    return ret
-
diff --git a/rec10/branches/0.4/src/install.py b/rec10/branches/0.4/src/install.py
deleted file mode 100644 (file)
index 48956c4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import epgdb
-import chdate
-
-epgdb.updateall()
-chdate
diff --git a/rec10/branches/0.4/src/license-ja.txt b/rec10/branches/0.4/src/license-ja.txt
deleted file mode 100644 (file)
index b489776..0000000
+++ /dev/null
@@ -1,462 +0,0 @@
-GNU 劣等一般公衆利用許諾書 (GNU Lesser General Public License)¶
-
-バージョン3、2007年6月29日
-日本語訳、2007年9月5日
-
-Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
-
-Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-
-(訳: 本ライセンス文書を、一字一句忠実に複製、頒布することは許可する。しかし変更は認めない。)
-
-This is an unofficial translation of the GNU Lesser General Public License into Japanese. It was not published by the Free Software Foundation, and does not legally state the distribution terms for software that uses the GNU LGPL--only the original English text of the GNU LGPL does that. However, we hope that this translation will help Japanese speakers understand the GNU LGPL better.
-
-(訳: 以下はGNU Lesser General Public Licenseの非公式な日本語訳です。これはフリーソフトウェア財団 (Free Software Foundation)によって正式に発表されたものではなく、GNU LGPLが適用されたソフトウェアの頒布条件を法的に有効な形で述べたものではありません。頒布条件としては、GNU LGPLの英語版テキストで指定されているもののみが有効です。しかしながら、私たちはこの翻訳が、日本語を使用する人々にとってGNU LGPLをより良く理解する助けとなることを望んでいます。)
-
-翻訳は八田真行 <mhatta@gnu.org>が行った。原文はhttp://www.gnu.org/licenses/lgpl-3.0.html である。誤訳の指摘や訳の改善案を歓迎する。なお、日本語訳の利用条件は原文に準ずる。
-
-このバージョンのGNU 劣等一般利用許諾書では、GNU 一般公衆利用許諾書(GNU General Public License)バージョン3が規定する利用条件を取り込んだ上で、以下に列挙する追加的許可で補足するものとする。
-0. 追加された定義¶
-
-本文中で使われている通り、「本許諾書」はGNU 劣等一般公衆利用許諾書バージョン3を指す。「GNU GPL」は、GNU 一般公衆利用許諾書バージョン3を指す。
-
-『ライブラリ』(The Library)とは、本許諾書の下で管理された『保護された作品』のうち、以下で定義する『アプリケーション』や『結合された作品』以外のものを指す。
-
-『アプリケーション』(Application)とは、『ライブラリ』が提供するインターフェースを利用するが、『ライブラリ』を基にはしていない作品すべてのことである。『ライブラリ』によって定義されたクラスの下位クラスを定義するのは、『ライブラリ』が提供するインターフェースの利用の一形態と見なされる。
-
-『結合された作品』(Combined Work)とは、『アプリケーション』と『ライブラリ』を結合ないしリンクすることによって作成された作品のことである。また、それによって『結合された作品』が作られた特定のバージョンの『ライブラリ』は、『リンクされたバージョン』(Linked Version)と呼ばれる。
-
-『結合された作品』に対する『最小限の対応するソース』 (Minimal Corresponding Source)とは、『結合された作品』に対する(訳注: GPLv3における)『対応するソース』のことを意味する。ただし、『結合された作品』に含まれる部分のうち、それのみを分離して考えた場合、『アプリケーション』を基にしているが、『リンクされたバージョン』は基にしていない部分のソースコードのすべては除外される。
-
-『結合された作品』に『対応するアプリケーションコード』 (Corresponding Application Code)とは、『アプリケーション』のオブジェクトコードかソースコードを意味する。『対応するアプリケーションコード』には、『アプリケーション』から『結合された作品』を再生成するために必要なデータやユーティリティ・プログラムすべてが含まれるが、『結合された作品』の『システムライブラリ』は除く。
-1. GNU GPL第3項への例外¶
-
-あなたは本許諾書の第3項および第4項に従い、『保護された作品』を伝達することができる。その際、GNU GPL第3項の第2段落に束縛される必要はない。
-2. 改変されたバージョンの伝達¶
-
-『ライブラリ』のコピーを改変し、かつあなたの改変点において、ある機能が (その機能が呼び出される際に引数として渡されるものを除いて)その機能を利用する『アプリケーション』から提供される関数やデータを参照する場合、以下のどちらかに従えば、あなたは改変されたバージョンのコピーを伝達することができる:
-
-    * a) 本許諾書に従って伝達する。ただし、『アプリケーション』が関数やデータを提供しない場合でも、その機能が依然として動作し、機能の目的のうち意味あるものとして残った部分はすべて実行するよう誠実な配慮を尽くさなければならない。あるいは、
-    * b) GNU GPLに従って伝達する。この場合、本ライセンス文書によってそのコピーに適用可能な追加的許可は一切認められない。 
-
-3. ライブラリのヘッダファイルに由来するコードや各種データを取り込んだオブジェクトコード¶
-
-オブジェクトコード形式の『アプリケーション』は、『ライブラリ』の一部であるヘッダファイルに含まれるコードや各種データを取り込むことができる。あなたは、そのようなオブジェクトコードを、あなたが選択したいかなる条項の下でも複製、伝達して構わない。ただし、取り込まれたコード等が数値的パラメータや、データ構造のレイアウトやアクセサー、小さなマクロ、インライン関数やテンプレート(長さにして10行以下)ではない場合、あなたは以下の両方を行わなければならない。
-
-    * a) オブジェクトコードのコピーそれぞれにおいて、『ライブラリ』がその中で利用されており、『ライブラリ』とその利用は本許諾書によって保護されている旨を目立つように告知する。
-    * b) オブジェクトコードに、GNU GPLと本許諾書のコピーを添付する。 
-
-4. 結合された作品¶
-
-あなたは、『結合された作品』に含まれる『ライブラリ』部分の改変を事実上禁止したり、そのような改変をデバッグするためのリバースエンジニアリングを禁止したりしない限り、『結合された作品』をあなたが選択したいかなる条件の下でも複製、伝達して構わない。ただしその場合、以下をすべて行う必要がある:
-
-    * a) 『ライブラリ』が『結合された作品』中で利用されており、また『ライブラリ』とその利用は本許諾書によって保護されるということを、『結合された作品』のコピーそれぞれにおいて目立つように告知する。
-    * b) 『結合された作品』に、GNU GPLと本ライセンス文書のコピーを添付する。
-    * c) 実行中に『コピーライト』告知を表示する『結合された作品』の場合、そういった告知文中に 『ライブラリ』の著作権告知と、ユーザに対してGNU GPLと本ライセンス文書のコピーがどこにあるかを示す参照先情報を含める。
-    * d) 以下のどれか一つを行う:
-          o 0) 本許諾書の条項に従い、『最小限の対応するソース』を伝達する。また、『対応するアプリケーションコード』を、『対応するソース』の伝達に関して GNU GPL第6項が指定しているのと同様のやり方で、ユーザが『アプリケーション』を『ライブラリ』の改変されたバージョンと再結合または再リンクして改変された『結合された作品』を作成するのに適した形式、かつそういった再結合や再リンクを許可する条項の下で伝達する。
-          o 1) 『ライブラリ』をリンクするのに適した共有ライブラリメカニズムを利用する。適したメカニズムとは、(a)実行時すでにユーザのコンピュータシステムに存在する『ライブラリ』のコピーを利用し、(b) 『リンクされたバージョン』とインターフェースに互換性がある『ライブラリ』の改変されたバージョンと共に適切に機能するものである。 
-    * e) 『インストール用情報』を提供する。ただしこれはGNU GPL第6項に従いそのような情報を提供することが義務付けられている場合に限られ、またそのような情報が、『リンクされたバージョン』の改変されたバージョンと『アプリケーション』を再結合ないし再リンクすることによって作成された『結合された作品』の改変されたバージョンをインストール、実行するのに必要とされる限りにおいてのみである(あなたが小項4dの0を選択する場合、『インストール用情報』は『最小限の対応するソース』と『対応するアプリケーションコード』と共に供しなければならない。あなたが小項4dの1を選択する場合、あなたは『インストール用情報』をGNU GPL第6項が『対応するソース』の伝達に関して指定するのと同様のやり方で提供しなければならない)。 
-
-5. 結合されたライブラリ¶
-
-あなたは、『ライブラリ』を基にした作品であるライブラリ機能を、『アプリケーション』ではなく、かつ本許諾書で保護されていない他のライブラリ機能と一緒に、単一のライブラリ内で並置し、そのような結合されたライブラリをあなたが選んだ条項に従って伝達することができる。ただしその場合、以下の両方を行わなければならない。
-
-    * a) 結合されたライブラリに、他のいかなるライブラリ機能とも結合されておらず、本許諾書の条項に従って伝達される、元のままの『ライブラリ』を基にした作品のコピーを添付する。
-    * b) その一部が『ライブラリ』を元にした作品である結合されたライブラリに、対応する結合されていない形式の同じ作品がどこで見つかるかを説明した目立つ告知を載せる。 
-
-6. GNU 劣等一般公衆利用許諾書の改訂されたバージョン¶
-
-フリーソフトウェア財団は、改訂された、あるいは新しいバージョンのGNU 劣等一般公衆利用許諾書を折りに触れて発行することができる。そのような新バージョンは、その精神においては現在のバージョンと似たものになるだろうが、細部については新たに生じた問題や懸念を解決すべく異なるものになるだろう。
-
-それぞれのバージョンには、見分けがつくようなバージョン番号が振られている。あなたが受領した『ライブラリ』において、ある特定のバージョン番号が振られたGNU 劣等一般公衆利用許諾書「かそれ以降のバージョンのいずれか (or any later version)」が適用されると指定されていた場合、あなたは指定された番号のバージョンか、それ以降にフリーソフトウェア財団によって発行されたバージョンのいずれかのバージョンのどちらの利用条件に従うかを選ぶことができる。あなたが受領した『ライブラリ』が特定のバージョン番号の GNU 劣等一般公衆利用許諾書を指定していなかった場合には、あなたはフリーソフトウェア財団がそれまでに発行したGNU 劣等一般公衆利用許諾書のバージョンの中からどれを選択しても構わない。
-
-(訳注: 日本語訳のバージョンは日付で管理している。冒頭を見よ。)
-
-あなたが受領した『ライブラリ』において、GNU 劣等一般公衆利用許諾書の将来のバージョンのうちどれが適用されうるかは代理人が決定できる、と指定されていた場合、その代理人が、あるバージョンを受諾すると述べた公的な声明は、あなたに対し、その『ライブラリ』に関してそのバージョンのGNU LGPLを選ぶことを永続的かつ正式に許可するのと等しい。
-
-
-
-
-
-
-利用条件 (TERMS AND CONDITIONS)¶
-0. 定義¶
-
-「本許諾書」(The License)とは、GNU 一般公衆利用許諾書のバージョン3を指す。
-
-「『コピーライト』」(Copyright)とは、いわゆる著作権のみならず、半導体マスクのようなその他の作品に適用される、著作権に類似した法的権利をも意味する。
-
-(訳注: この規定により、本許諾書は著作権法で保護されたいわゆる「著作物」よりも広い範囲をカバーすることになる。よってこの訳のライセンス本文中においては、work(s)に「著作物」ではなく「作品」という訳語を宛てることにした。)
-
-「『プログラム』」(The Program)とは、本許諾書の下でライセンスされた、『コピーライト』が主張可能な作品すべてを意味する。個々のライセンシーは「あなた」として表現される。ライセンシーは個人でも組織でも構わない。
-
-ある作品の「改変」(modify)とは、その作品の全体ないし一部を、『コピーライト』の許可を必要とするようなやり方で複製ないし翻案することを意味する。ただし、完全に同一なコピーを作成する場合は除く。改変の結果出来た作品は、以前の作品の「改変されたバージョン」(modified version)、または、以前の作品を「基にした」(based on)作品と呼ばれる。
-
-「『保護された作品』」(covered work)とは、改変されていない『プログラム』か、『プログラム』を基にした作品のいずれかを指す。
-
-ある作品の「普及」(propagate)とは、コンピュータ上で実行すること、または私的なコピーを改変することを除き、適用可能な『コピーライト』法規の下で許可無く行うと、権利侵害として、直接的、あるいは間接的にあなたが責任を問われる何らかの行為を意味する。普及には、複製、頒布 (改変の有無を問わない)、公衆への利用可能化が含まれ、またいくつかの国々では他の活動も含まれる可能性がある。
-
-ある作品の「伝達」(convey)とは、第三者がコピーを作成ないし受領するのを可能とする普及行為すべてを意味する。ただし、コンピュータネットワーク越しにユーザとやりとりするだけで、コピーの転送は伴わない場合は、伝達ではない。
-
-対話的なユーザインターフェースが「『適切な法的告知』」(Appropriate Legal Notices)を表示するという場合、そのインターフェースは (1)適切な『コピーライト』告知を表示し、(2)ユーザに対して、その作品には何の保証もない(別途保証が提供されている場合は除く)ということ、ライセンシーはその作品を本許諾書の下で伝達できるということ、そして本許諾書のコピーを見るにはどうしたらよいかということを便利かつ顕著に視認できるような機能を含むものとする。もしインターフェースが、メニューのようなユーザコマンドやオプションの一覧を表示するならば、その一覧中には上記の基準を満たすようなアイテムが目立つように含まれていなければならない。
-1. ソースコード¶
-
-ある作品の「ソースコード」(source code)とは、その作品に改変を加えるに当たって好ましいと考えられる形式のことである。「オブジェクトコード」 (object code)とは、作品がとりうるソースコード以外の形式すべてを意味する。
-
-「標準インターフェース」(Standard Interface)とは、標準化団体として認知された組織によって定義された公式な標準か、ある特定のプログラミング言語向けに指定されたインターフェースの場合には、その言語を利用する開発者の間で広く使われているインターフェースのことを指す。
-
-実行可能な作品の「『システムライブラリ』」(System Libraries)とは、 (a)「主要コンポーネント」(Major Component) の頒布物に通常含まれるが、その主要コンポーネントの一部ではなく、かつ(b)作品をその「主要コンポーネント」といっしょに利用することを可能にする、あるいは公衆にとってソースコード形式で利用可能な実装がひとつは存在する標準インターフェースを提供するためにのみ機能するものすべてを意味する。ただし、全体としての作品そのものは除く。ここでいう「主要コンポーネント」とは、実行可能な作品がその上で実行されるある特定のオペレーティングシステム (そういったものが必要ならば)の主要で不可欠な一部分(カーネルやウィンドウシステムなど)、あるいはその作品を作成するのに使われるコンパイラ、実行するのに使われるオブジェクトコードインタプリタなどを意味する。
-
-オブジェクトコード形式の作品に「『対応するソース』」(Corresponding Source)とは、その作品を生成、インストール、(実行可能な作品に関しては)オブジェクトコードを実行、または作品を改変する上で必要とされるソースコードのすべてを意味する。この場合、そうした活動をコントロールするためのスクリプトは『対応するソース』に含まれるが、その作品にとっての『システムライブラリ』や、先ほど列挙した活動を行う上で改変されることなく利用されるものの作品の一部ではない、汎用のツールや一般的に利用可能なフリープログラムは除外される。例えば『対応するソース』には、その作品のソースファイルと連携するインターフェース定義ファイルに加え、共有ライブラリや動的にリンクされた下位プログラムと作品のその他の部分との間での親密なデータのやりとりやコントロールフローなどのために、その作品が設計上明確に必要とする、そうした共有ライブラリや下位プログラムのソースコードなどが含まれる。
-
-『対応するソース』には、ユーザが『対応するソース』の他の部分から自動的に再生成できるものを含む必要はない。
-
-ソースコード形式の作品にとっての『対応するソース』とは、その作品そのものである。
-2. 基本的な許可¶
-
-本許諾書の下で認められるすべての権利は、『プログラム』に主張される『コピーライト』の条項に基づき授与されるものであり、ここで述べられた条件が満たされている限り覆すことはできない。本許諾書は、改変されていない『プログラム』をあなたが無制限に実行することを許可し、明示的に確約する。『保護された作品』を実行することから得られた出力結果は、その出力内容が『保護された作品』を構成する場合のみ本許諾書で保護される。本許諾書は、あなたが有するフェアユースまたはその同等物の権利を、『コピーライト』法規によって提供される通りに承認する。
-
-その他の状況においてあなたのライセンスが有効である限り、『保護された作品』の、伝達を伴わない作成、実行、および普及は無条件に行うことができる。他者にあなた専用の改変を行わせる、あるいは他者にあなたがそういった作品を実行するための機能を提供させるということが唯一の目的であれば、『保護された作品』を他者に伝達することができる。ただしその場合、あなたが『コピーライト』を支配していない部分すべての伝達に関しては、本許諾書の条項に従わなければならない。従って、あなたのために『保護された作品』を作成または実行する者は、専らあなたのためだけに、あなたの監督と支配の下で、あなたとの関係の範囲外ではあなたが『コピーライト』を有する一部分のいかなるコピーをも作成することを禁止するという条件の下で行わなければならないということになる。
-
-上記以外のあらゆる状況下においては、伝達は以下で述べる条件の下でのみ許可される。再許諾は認められない。下記第10項により、再許諾は必要ないからである。
-3. ユーザの法的権利を、技術的保護手段の回避を禁ずる法律から守る¶
-
-『保護された作品』は、 1996年12月20日に採択されたWIPO著作権条約第11項の下での義務を満たす適用可能な法のいずれか、あるいはそれに類似の法が、回避の禁止または制限の対象として規定する、「効果的な技術的手段」 (effective technological measure)の一部として見なされてはならない。
-
-(訳注: WIPO著作権条約については、http://www.cric.or.jp/db/article/wch.html 等を参照せよ。)
-
-あなたが『保護された作品』を伝達する場合、『保護された作品』に関して本許諾書の下で権利を行使することにより、技術的手段の回避に影響が出る範囲において、そのような手段の回避を禁じるいかなる法的権力をも放棄することになる。また、あなたはその作品のユーザに対して、技術的手段の回避を禁じるためにあなたや第三者の法的権利を強制するための手段として、その作品の動作や改変を制限するいかなる意図も否認することになる。
-4. 一字一句忠実なコピーの伝達¶
-
-あなたは、自分が受領した『プログラム』のソースコードと一字一句同じコピーであれば、いかなる媒体でも伝達することができる。ただしその場合、あなたはそれぞれのコピーにおいて、目立つように、かつ適切な形で、ふさわしい『コピーライト』告知を掲載しなければならない。すなわち、本許諾書と、下記第7項に従い追加された非許可的条項のすべてがそのコードに適用される旨の告知を掲載し、あらゆる保証が存在しない旨の告知をすべてそのまま保全し、かつ『プログラム』の受領者すべてに、『プログラム』といっしょにこの許諾書のコピーを与えなければならない。
-
-あなたは、自分が伝達するコピーのそれぞれに関していかなる価格を付けても良いし、無料で伝達しても構わない。また、報酬を取ってサポートや保証保護 (warranty protection)を提供しても良い。
-5. 改変されたバージョンのソースの伝達¶
-
-あなたは、『プログラム』を基にした作品、あるいはそうした作品を『プログラム』から作成するための改変点を、上記第4項の規定に従ってソースコード形式で伝達することができる。ただしその場合、あなたは以下に示す条件のすべてを満たさなければならない:
-
-    * a) 作品には、あなたが作品を改変したということと、改変に関連した日時を記述した告知を目立つように載せなければならない。
-    * b) 作品には、それが本許諾書と、下記第7項に従って追加された条件すべての下で公開されていることを記述した告知を目立つように載せなければな らない。この条件は、上記第4項における「告知をすべてそのまま保全」するための条項を改変する。
-    * c) 作品の全部分を、総体として、コピーを所有するに至った人全員に、本許諾書の下でライセンスしなければならない。そこで、本許諾書は、本許諾書第7項に基づく適用可能な追加的条項のすべてとともに、作品全体に、すなわちその全部分に、それらがどのようにパッケージされているかに関わらず適用されることになる。本許諾書は、これ以外のやり方には作品をライセンスする許可を与えないが、あなたが本許諾書以外で別途許可を得ていた場合には、それによって得られた許可まで無効とするものではない。
-    * d) 改変された作品が対話的なユーザインターフェースを有する場合、それらのインターフェースは『適切な法的告知』を表示しなければならない。ただし、『プログラム』に元々『適切な法的告知』を表示しない対話的なインターフェースがある場合、あなたの作品で表示するようにする必要はない。 
-
-一巻の記憶装置の中か頒布媒体上で、『保護された作品』と、本来『保護された作品』の拡張ではなく、『保護された作品』とより大規模なプログラムを形成するような形で結合されているわけでもないその他の分離かつ独立した作品とをまとめた編集物は、編集作業とそれに由来する『コピーライト』が、個々の作品が許可する範囲を越えて編集物のユーザの作品へのアクセスや法的権利を制限するのに使われない限り、「集積物」(aggregate)と呼ばれる。単に『保護された作品』を集積物に含めるだけでは、その集積物の他の部分にまで本許諾書が適用されるということにはならない。
-6. ソース以外の形式における伝達¶
-
-あなたは、オブジェクトコード形式の『保護された著作物』を、上記第4項および第5項の規定に従って伝達することができる。ただしその場合、あなたは機械読み取り可能な『対応するソース』も本許諾書の条件に従って、以下のいずれかの方法で伝達しなければならない。
-
-    * a) オブジェクトコードを物理的製品(物理的頒布媒体を含む)で、あるいはそれに組み込んで伝達する。その際、『対応するソース』を、ソフトウェア のやりとりで一般的に使われる耐久性のある物理的媒体に固定していっしょに頒布する。
-    * b) オブジェクトコードを物理的製品(物理的頒布媒体を含む)で、あるいはそれに組み込んで伝達する。その際、最低でも3年間、あるいはあなたがその製品モデルに補修用部品やカスタマーサポートを提供する限り有効な、書面 による申し出を添付する。その申し出には、(1) オブジェクトコードを所有する者すべてに対して、その製品に含まれるソフトウェアのうち本許諾書で保護されるものすべてに『対応するソース』のコピーを、ソフトウェアのやりとりで一般的に使われる耐久性のある物理的媒体で頒布する旨を記載する。その際、物理的にこのソースの伝達を行うのにかかる正当なコスト以上の価格を要求してはならない。あるいは、(2) 『対応するソース』を無料でネットワークサーバから複製するためのアクセスを提供する旨を記載する。
-    * c) オブジェクトコードの個々のコピーを、対応するソースを提供するという書面による申し出のコピーといっしょに伝達する。この選択肢は特別な場合、かつ非商業的な場合のみに、そしてあなたがオブジェクトコードを上記小項 6bに合致した申し出といっしょに受領した場合にのみに認められる。
-    * d) オブジェクトコードを、指定の場所から複製するためのアクセスを提供することによって伝達し、『対応するソース』に対しても同じ場所を通じて同じ方法で複製するための同等のアクセスを提供する。伝達は無料でも手数料を課しても構わないが、『対応するソース』に対して追加的な課金を行ってはならない。受領者に対して、『対応するソース』をオブジェクトコードといっしょに複製することを義務づける必要はない。オブジェクトコードの複製元がネットワークサーバの場合、対応するソースは同等の複製機能をサポートする異なったサーバ(あなたか第三者が運営)上にあっても良い。その場合、オブジェクトコードの傍らに、『対応するソース』はどこで見つけられるかを明確に指示しておかなければならない。どのサーバが『対応するソース』をホストするかに関わらず、あなたは『対応するソース』がこれらの条 項を満たすために必要なかぎり利用可能であることを保証する責任がある。
-    * e) オブジェクトコードをピア・ツー・ピア伝送を使って伝達する。ただしこの場合、あなたは上記小項6dに従い、その作品のオブジェクトコードと 『対応するソース』がどこで一般公衆に無料で提供されるのかということを他のピアに知らせておかなければならない。 
-
-オブジェクトコードの分離した一部であり、そのソースコードが『対応するソース』から『システムライブラリ』として除外されているものは、オブジェクトコード作品を伝達する場合に含める必要はない。
-
-「ユーザ製品」(User Product)とは、(1)「コンシューマ製品」(consumer product)、すなわち、個人、子供、あるいは家庭用に通常使用される有形個人資産すべてか、あるいは(2)居住所における導入を目的に設計ないし販売されるものすべてを指す。ある物品がコンシューマ製品であるかを決定する際疑義がある場合には、極力範囲を広げる方向で決定されるべきである。ここで、ある特定のユーザによって受領されたある特定の製品にとっての「通常使用」 (nomally used)とは、その種の製品において典型的な、あるいは一般的な利用のことであり、その特定のユーザが置かれた状況や、その特定のユーザがその製品を実際にどう使っているか、どう使うことを予期しているか、あるいは予期されているかとは関係ない。その製品に相当な商業的、産業的または非コンシューマ的な利用法があったとしても、そうした利用がその製品の唯一重要な利用形態を代表するものでない限り、その製品はコンシューマ製品である。
-
-ユーザ製品の「『インストール用情報』」(Installation Information)とは、ユーザ製品内の『保護された作品』に関して、『対応するソース』の改変されたバージョンから得られる『保護された作品』の改変されたバージョンを、インストール、実行するために必要な手法、手順、認証キーやその他の情報すべてを意味する。この情報は、改変されたオブジェクトコードの継続的な動作が、改変が為されたということによってのみ拒否されたり妨害されることが決してないことを保証するのに十分なものでなければならない。
-
-本節の下において、作品をユーザ製品の内で、またはユーザ製品と共に、あるいは特にユーザ製品での利用を念頭においてオブジェクトコードで伝達し、またその伝達がユーザ製品の受領者への所有と利用の権利の永遠ないし有期の移転の一部として起こる場合(移転がどのように行われるかは問わない)、この条項の下で『対応するソース』は『インストール用情報』と共に提供されなければならない。しかしこの条件は、あなたと第三者のいずれもが改変されたオブジェクトコードをユーザ製品にインストールする能力を有していない際には適用されない(例えば、作品がROMにインストールされている場合)。
-
-『インストール用情報』を提供する条件には、受領者によって改変ないしインストールされた作品、あるいはそうした作品が改変ないしインストールされたユーザ製品に対し、サービスや保証、アップデートを提供しつづけるという条件は含まれない。改変自体がネットワークの運用に実質的かつ有害な影響をもたらし、ネットワークを介したコミュニケーションのプロトコルや規則に違反する場合には、ネットワークアクセスを拒否しても構わない。
-
-伝達される『対応するソース』や提供される『インストール用情報』が本節を満たすためには、それらが公に文書化された形式で(かつ公衆に対してソースコード形式で利用可能な実装とともに)提供されなければならない。この場合、これらの圧縮展開や読み込み、複製に特別なパスワードやキーを必要としてならない。
-7. 追加的条項¶
-
-「追加的許可」(Additional permissions)とは、本許諾書が課す条件に一つかそれ以上の例外を設けることにより、本許諾書の条項を補足する条項のことである。『プログラム』全体に適用可能な追加的許可は、適用可能な法の下でそれらが有効である限り、あたかもそれらが本許諾書に含まれているかのように扱われなければならない。追加的許可が『プログラム』の一部にのみ適用される場合、その部分に関してはそういった追加的許可の下で別途利用可能だが、『プログラム』全体としては追加的許可に関わりなく本許諾書によってのみ管理される。
-
-あなたが『保護された作品』のコピーを伝達する場合、あなたは追加的許可をそのコピー、あるいはその一部から削除することを選択できる (追加的許可は、あなたが作品をある種の形で改変する際には、そうした許可自身の削除を要求するような形で書かれてもよい)。あなたは、あなたによって『保護された作品』に追加され、あなたが適切な『コピーライト』許可を有するか、与えることができる限り、その一部分に追加的許可を設定することができる。
-
-本許諾書の他の条件に関わらず、あなたが『保護された作品』に追加した一部分について(その部分の『コピーライト』保有者らによって正式に許可されていれば)、本許諾書の条項を、以下に示す条項で補足することができる:
-
-    * a) 本許諾書第15項および第16項の条項とは異なった形で保証の否認や責任の限定を主張する。あるいは、
-    * b) 追加した一部分において、明示的で妥当な法的告知や作者特定の保全、またはそれを含む作品において『適切な法的告知』の表示を要求する。あるいは、
-    * c) 追加した一部分の出自を不当に表示することを禁じるか、あるいはそのような一部分の改変されたバージョンはオリジナルのバージョンとは異なっ ているということを適切な方法で印づけることを要求する。あるいは、
-    * d) その一部分のライセンサーや作者の名前を、宣伝目的で利用することを制限する。あるいは、
-    * e) 商品名や商標、サービスマークの利用に関して、商標法に従い権利を授与することを拒否する。あるいは、
-    * f) その一部分(あるいはその改変されたバージョン)を伝達する者に、受領 者への責任に関して契約上の引き受けがあり、そうした責任が直接的にそういったライセンサーや作者にまで課せられる場合、その一部分のライセンサーや作者の免責を要求する。 
-
-他の非許可的な追加的条項は下記第10項が意味するところの「さらなる権利制限」(further restrictions)とみなされる。あなたが受領した『プログラム』、あるいはその一部に、それが本許諾書とともにさらなる権利制限である条項によっても管理されていると述べた告知が含まれている場合には、あなたはそういった条項を削除して構わない。あるライセンス文書にさらなる権利制限がふくまれているが、しかし本許諾書の下での再許諾や伝達を許可しているならば、あなたはそのライセンス文書の条項によって管理されている一部分を『保護された作品』に追加することができる。ただしその場合、さらなる権利制限はそのような再許諾や伝達では無効としなければならない。
-
-あなたが本節に従って『保護された著作物』に条項を追加した場合、あなたは関係するソースファイル中に、それらのファイルに適用される追加的条項に関する声明、あるいは適用可能な条項を見つけることができる場所を示す告知を掲載しなければならない。
-
-追加的条項は、それが許可的であろうと非許可的であろうと、別途書面化されたライセンスという形式で述べられてもよいし、本許諾書への例外として述べられてもよい。上記の要件はどちらの場合でも適用される。
-8. 終了¶
-
-あなたは『保護された作品』を、本許諾書の下で明示的に提供されている場合を除いて、普及、または改変してはならない。それ以外に『保護された作品』を普及、または改変しようとする試みはすべて無効であり、本許諾書の下であなたに認められた権利(下記第11項の第3段落に従い授与されたパテントライセンスすべてを含む)を自動的に終了させることになる。
-
-しかしながら、あなたが本許諾書への違反をすべて中止するならば、あなたがある特定の『コピーライト』保有者から得たライセンスは、(a)その『コピーライト』保有者が明白かつ決定的にあなたへのライセンスを終了させるか、あるいはさせないまでは暫定的に、(b)その『コピーライト』保有者が、あなたに対し違反について、何らかの正当な手段によりライセンス停止後60日以内に通知することができなかった場合には永続的に、回復される。
-
-加えて、あなたがある特定の『コピーライト』保有者から得たライセンスは、その『コピーライト』保有者があなたに対して違反を何らかの正当な手段で通知し、それより前にその『コピーライト』保有者から、(当該作品に限らずその『コピーライト』保有者の作品のいずれかに関して)本許諾書に関する違反の通知を受領したことがなく、さらにあなたがその通知を受領してから30日以内に違反を正した場合、永続的に回復される。
-
-本節に従いあなたの権利が終了した場合でも、本許諾書に従ってあなたからコピーや権利を受領した当事者が得た許諾は終了しない。あなたの権利が終了され、永続的に回復されなかった場合には、あなたは同じライセンス対象に関し下記第10項に従って新たにライセンスを受領する資格を失うものとする。
-9. コピーの所有に必要とされない受諾¶
-
-あなたは、『プログラム』のコピーを受領あるいは実行するために本許諾書を受諾する必要はない。コピーを受領するためにピア・ツー・ピア伝送を使った結果としてのみ発生する『保護された作品』の付随的な普及も、同様に受諾を必要としない。しかしながら、他の場合においては、本許諾書以外にあなたに対して『保護された作品』の普及や改変をする許可を認めるものはない。これらの行為は、本許諾書を受諾しない限り『コピーライト』を侵害することになる。そこで、『保護された作品』を改変あるいは普及することにより、あなたはそうした行為を行うために本許諾書を受諾したということを示したことになる。
-10. 下流の受領者への自動的許諾¶
-
-あなたが『保護された作品』を伝達するたびに、受領者は自動的にオリジナルのライセンサーから、本許諾書に従いその作品を実行、改変、普及するライセンスを得る。なお、あなたには第三者が本許諾書に従うことを強制する責任はない。
-
-「主体取引」(entity transaction)とは、ある組織そのもの、ないしその組織の実質的に全ての資産の支配権が移転するか、あるいは組織の細分化や合併が行われるような取引を指す。もし主体取引の結果として『保護された作品』の普及が起こった場合、作品のコピーを受領したそれぞれの取引当事者は、利害関係のある当事者の先任者から、その先任者が前段落に従って有する、あるいは与えることができる、その作品に関するライセンスもまたすべて受領する。加えて個々の取引当事者は、利害関係のある先任者から、その先任者が有しているか、適正な努力によって得ることが可能な限りにおいて、その作品の『対応するソース』の所有権も得る権利を有する。
-
-あなたは本許諾書の下で授与された、あるいは確約された権利の行使に対して、本許諾書が規定する以上のさらなる権利制限を課してはならない。たとえば、あなたはライセンス料、ロイヤルティや他の料金を、本許諾書の下で認められている権利の行使に関して課してはならない。また、あなたは『プログラム』やその一部の作成、利用、販売、販売の申し出、取り込みによって何らかのパテントクレームが侵害されたとして、訴訟(訴訟における反対請求ないし反訴を含む)を開始してはならない。
-11. 特許¶
-
-「貢献者」(contributor)とは、本許諾書の下で『プログラム』、あるいは『プログラム』が基にした作品を利用することを正式に許可した『コピーライト』保有者のことを指す。従って、そのようにしてライセンスされた作品は、貢献者による「貢献者バージョン」(contributor version)と呼ばれる。
-
-ある貢献者の「必須パテントクレーム」(essential patent claims)とは、すでに取得しているか、あるいは今後取得する見込みがあるため、その貢献者が現在所有ないし支配していると言える特許のうち、貢献者バージョンに対して、本許諾書で許可されているような作成や利用、販売といった何らかの形の行為を行うことによって侵害される可能性があるパテントクレームのすべてを意味する。ただし、貢献者バージョンをさらに改変した結果としてのみ侵害されるようなクレームは含まれない。この定義において、「支配」には本許諾書が課す条件と整合的なやり方で特許の再許諾を認める権利も含まれる。
-
-個々の貢献者はあなたに対して、その貢献者の必須パテントクレームに関し、あなたがその貢献者バージョンの内容を作成、利用、販売、販売の申し出、取り込み、その他実行、改変、普及するために必要な、非排他的で全世界的に有効、かつロイヤルティフリーのパテントライセンスを授与する。
-
-以下の3段落において「『パテントライセンス』」とは、ある特許を実施しないという明示的な協定やコミットメントのすべてを指す(例えば、ある特許の実施に対する明示的な許可や、特許侵害訴訟を提起しないという誓約など)。そのような『パテントライセンス』をある当事者に「授与」するとは、その当事者と特許を実施しないという協定やコミットメントを結ぶことを意味する。
-
-もしあなたが、『保護された作品』の伝達を、それがある『パテントライセンス』に依存しており、よってその作品の『対応するソース』は、すべての人にとって、公衆が利用可能なネットワークサーバや他の容易にアクセス可能な手段を通じ、無料かつ本許諾書に従って複製可能ではないということを知りながら行うならば、あなたは (1)『対応するソース』も同様に利用可能にするか、 (2)この特定の作品に関して『パテントライセンス』から得られる便益を自ら剥奪するか、あるいは(3)下流の受領者に対しても、本許諾書の条項と整合的な形で、『パテントライセンス』が拡大されるように計らうかのいずれかを行わなければならない。ここで「『パテントライセンス』に依存するのを知りながら」というのは、あなたが『保護された作品』をある国で伝達すること、あるいはあなたの受領者が『保護された著作物』をある国で利用することが、『パテントライセンス』を授与されない限り、その国において、あなたにとってそれが有効だと信じるだけの理由がある一つかそれ以上の同定可能な特許を侵害するということを実際に知っているということである。
-
-ある一対一の取引や協定に基づき、あるいは関連して、あなたが『保護された作品』の伝達、または伝達によって引き起こされる普及を行い、その際『保護された作品』を受領した一部の当事者に対して、『保護された作品』の特定のコピーの利用、普及、改変、または伝達を正式に許可するような『パテントライセンス』を授与するならば、あなたが授与した『パテントライセンス』は『保護された作品』やそれを基にした作品のすべての受領者にまで自動的に拡大されることになる。
-
-ある『パテントライセンス』が「差別的」(discriminatory)であるとは、本許諾書の下で明確に認められた一つかそれ以上の権利を、『パテントライセンス』がカバーする範囲内に含まなかったり、そうした権利の行使を禁じたり、あるいは権利を行使しないことを条件として課すようなものである場合を指す。あなたを一方の当事者とし、ソフトウェアの頒布を生業とする第三者との間で、あなたは第三者に対し、作品を伝達する活動の程度に基づいて支払いを行う一方、第三者は、あなたから『保護された作品』を受領したすべての当事者に対して「差別的」な『パテントライセンス』を、(a)あなたが伝達した『保護された作品』のコピー(またはそうしたコピーから作成されたコピー)に対して、または(b)『保護された作品』を含む特定製品や編集物を、主要な、あるいは関連した対象として授与する、というような協定を結んでいる場合、あなたは『保護された作品』を伝達してはならない。ただし、あなたがそのような協定を締結したり、『パテントライセンス』を授与されたのが2007年3月28日より以前である場合は本節の例外とする。
-
-本許諾書に含まれる一切の記述は、適用可能な特許法の下であなたが利用可能な暗黙のライセンス、その他侵害への防御手段を排除したり制限したりするように解釈されてはならない。
-12. 他者の自由を明け渡してはならない¶
-
-何らかの条件(裁判所の指令や協定など)があなたに課せられ、それが本許諾書の条件と矛盾したとしても、あなたが本許諾書の条件を免れることにはならない。あなたが、『保護された作品』を、本許諾書が課す義務と他の関連した義務の両方を同時に満たすような形で伝達できないのであれば、結果としてあなたがそれを伝達することは全く不可能ということになる。例えばあなたが、自分が『プログラム』を伝達した人々がさらに伝達を行う場合には、彼らからロイヤルティを徴収する、というような義務を負う条項に同意していた場合、あなたがそういった条項と本許諾書の両方を満たすには、『プログラム』の伝達を完全に止めてしまうしかないだろう。
-13. GNU Affero 一般公衆利用許諾書との利用¶
-
-本許諾書に含まれる他の条件に関わらず、あなたには、『保護された作品』を GNU Affero 一般公衆利用許諾書バージョン3の下で許諾された作品とリンクまたは結合して単一の結合物とし、その結果物を伝達する許可が与えられる。本許諾書の条項は『保護された作品』である部分に関してはそのまま適用されるが、結合物それ自体としては、GNU Affero 一般公衆利用許諾書の第13項が規定する、ネットワークを介したやりとりに関する特殊な条件も適用されることになる。
-
-(訳注: 訳出時点では、GNU Affero GPLは改定作業が依然続いており、確定バージョンはリリースされていない。 http://gplv3.fsf.org/agplv3-dd2-guide.htmlを参照せよ。)
-14. 本許諾書の改訂されたバージョン¶
-
-フリーソフトウェア財団は、改訂された、あるいは新しいバージョンの GNU 一般公衆利用許諾書を折りに触れて発行することができる。そのような新バージョンは、その精神においては現在のバージョンと似たものになるだろうが、細部については新たな問題や懸念を解決すべく異なるものになるだろう。
-
-それぞれのバージョンには、見分けがつくようなバージョン番号が振られている。『プログラム』に、ある特定のバージョン番号が振られた GNU 一般公衆利用許諾書「かそれ以降のバージョンのいずれか(or any later version)」が適用されると指定されていた場合、あなたは指定された番号のバージョンか、それ以降にフリーソフトウェア財団によって発行されたいずれかのバージョンのどちらの利用条件に従うかを選ぶことができる。『プログラム』が本許諾書のバージョン番号を指定していなかった場合には、あなたはフリーソフトウェア財団がそれまでに発行したバージョンの中からどれを選択しても構わない。
-
-(訳注: 日本語訳のバージョンは日付で管理している。冒頭を見よ。)
-
-『プログラム』において、GNU 一般公衆利用許諾書の将来のバージョンのうちどれが適用されうるかは代理人が決定できる、と指定されていた場合、その代理人が、あるバージョンを受諾すると述べた公的な声明は、あなたに対し、その『プログラム』に関してそのバージョンのGNU GPLを選ぶことを永続的かつ正式に許可するのと等しい。
-
-本許諾書の今後のバージョンでは、あなたに追加的な、または従来とは異なった形での許可を与えるかもしれない。しかしながら、作者や『コピーライト』保有者に対し、あなたが以降のバージョンに従うことを選んだ結果として、追加的な義務が課せられることはない。
-15. 保証の否認¶
-
-『プログラム』には、適用可能な法で許可されている範囲において何の保証もない。書面で述べられていない限り、『コピーライト』保有者やその他の当事者は『プログラム』を「あるがまま(as is)」で、明示的、暗示的を問わず、いかなる種類の保証もなく提供する。この保証には、商用可能性や特定目的への適合性の暗黙的保証が含まれるが、これらに限定されない。『プログラム』の質や性能に関するリスクはすべてあなたに帰属する。『プログラム』に問題があると判明した場合、あなたは必要なすべての対応、補修、修正にかかる費用を負うものとする。
-16. 責任の限定¶
-
-適用可能な法において義務づけられるか、書面による同意がない限り、『コピーライト』保有者あるいはその他『プログラム』を上記で許可された通りに改変あるいは伝達する当事者は、たとえそうした保有者や他の当事者が損害が発生する可能性について事前に通知されていたとしても、あなたに対して損害賠償責任を有することはない。ここでいう損害には、『プログラム』の利用あるいは利用できないことから発生した一般的、特殊的、偶然的、必然的な損害のすべてが含まれる(データの消失やデータの不正確な解釈、あなたや第三者によって被った、あるいは『プログラム』が他のプログラムといっしょにうまく動作しなかったために引き起こされた損害などが含まれるが、これらに限定されない)。
-17. 第15項と第16項の解釈について¶
-
-上記のような保証の否認や責任の限定が、特定国内においてそういった条項が指定する通りの法的効力を持ち得ない場合、再審裁判所は、『プログラム』に関連したすべての民事責任の絶対的棄権に最も近く肉薄する国内法を適用すべきである。ただし、報酬の見返りとして責任の保証や引き受けが『プログラム』のコピーに付随する場合は除く。 
-
-
-
-
-GNU 一般公衆利用許諾書 (GNU General Public License)¶
-
-バージョン3、2007年6月29日
-日本語訳、2007年9月5日
-
-Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
-
-Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-
-(訳: 本ライセンス文書を、一字一句忠実に複製、頒布することは許可する。しかし変更は認めない。)
-
-This is an unofficial translation of the GNU General Public License into Japanese. It was not published by the Free Software Foundation, and does not legally state the distribution terms for software that uses the GNU GPL--only the original English text of the GNU GPL does that. However, we hope that this translation will help Japanese speakers understand the GNU GPL better.
-
-(訳: 以下はGNU General Public Licenseの非公式な日本語訳です。これはフリーソフトウェア財団 (Free Software Foundation)によって正式に発表されたものではなく、GNU GPLが適用されたソフトウェアの頒布条件を法的に有効な形で述べたものではありません。頒布条件としては、GNU GPLの英語版テキストで指定されているもののみが有効です。しかしながら、私たちはこの翻訳が、日本語を使用する人々にとってGNU GPLをより良く理解する助けとなることを望んでいます。)
-
-翻訳は八田真行 <mhatta@gnu.org>が行った。原文はhttp://www.gnu.org/licenses/gpl-3.0.html である。誤訳の指摘や訳の改善案を歓迎する。なお、日本語訳の利用条件は原文に準ずる。
-はじめに¶
-
-GNU 一般公衆利用許諾書は、ソフトウェアやその他の種類の著作物のための、フリーかつコピーレフトを主張するライセンスです。
-
-ソフトウェアやその他の実用的著作物向けのライセンスの大半は、あなたから著作物を共有したり変更したりする自由を奪い去るよう設計されています。それらとは対照的に、GNU 一般公衆利用許諾書は、あなたに対してあるプログラムの全てのバージョンを共有、変更する自由を保証すること、すなわち、そのソフトウェアがそのユーザすべてにとってフリーでありつづけることを保証することを目的としています。私たちフリーソフトウェア財団(Free Software Foundation)は、GNU 一般公衆利用許諾書を私たちのソフトウェアの大半に適用しています。その作者が私たちと同様の方法で公開するならば、他のいかなる著作物にも適用することが可能です。もちろん、あなたのプログラムにも適用することができます。
-
-私たちがフリーソフトウェアについて語るとき、私たちは自由について言及しているのであって、価格は問題にしていません。私たちが用意した一般公衆利用許諾書の数々は、フリーソフトウェアのコピーを頒布する(そして希望によっては頒布に際して手数料を要求する)自由をあなたに保証すべく設計されています。すなわち、ソースコードを受領するか、望めばそれを手に入れられるということ、ソフトウェアを変更し、その一部を新たなフリープログラムで利用することができるということ、そしてこうしたことが可能であることをあなたが知っているということが保証されるのです。
-
-(訳注: GNU GPL以外の一般公衆利用許諾書として、GNU AGPLとGNU LGPLが用意されている。)
-
-あなたの権利を守るため、私たちは誰か他人が上記のようなあなたの権利を否定したり、権利を放棄するように求めることを防ぐ必要があります。そこで、あなたがソフトウェアのコピーを頒布したり改変したりする場合、あなたにはある種の責任が発生します。それは、他人の自由を尊重するという責任です。
-
-たとえば、本許諾書が適用されたプログラムのコピーをあなたが頒布する場合、それが無料であろうと手数料を取る場合であろうと、あなたは受領者たちに、あなた自身が受け取ったのと同じ自由を渡さなければなりません。あなたは、彼らもまた、ソースコードを受領するか後に得られることを保証しなければなりません。そしてあなたは、彼らに本許諾書の条項を示し、彼らの権利について彼らに知らしめなければなりません。
-
-GNU GPLを利用する開発者は、あなたの権利を2段階の手順を踏んで守ります。その手順とは、(1) ソフトウェアに著作権を主張し、(2) あなたに本許諾書を提示して、ソフトウェアを複製、頒布、または改変する法的な許可を与える、というものです。
-
-開発者や作者を守るため、GPLでは、このフリーソフトウェアには何の保証もないということを明確に説明しています。ユーザと開発者両方の便宜のため、 GPLでは改変されたバージョンには変更された旨を印づけるよう要求しており、改変されたバージョンの問題が、誤って以前のバージョンの作者に帰せられることがないようにしています。
-
-一部の機器は、それらに収録されたソフトウェアを改変した上で再びインストールしたり、実行したりするために必要なアクセスを、製造者には拒否しないにもかわらずユーザに対しては拒否するよう設計されています。これは、ユーザが自らの有するソフトウェアを変更する自由を守るというGPLの目的とは、根本的に相容れません。このような技術の濫用は、往々にして個人使用向けの製品の分野で見られるものですが、まさにこのような分野こそ、こうした慣行が最も容認しがたいものとなるのです。そこで私たちは、このバージョンのGPLを、そうした製品においてこの種の慣行を禁止するように設計しました。もし同種の問題が他の領域にまで相当程度広がってきた場合には、私たちはユーザの自由を守るためのに必要とされるだけ、GPLの将来のバージョンにおいてこの規定をそうした領域にも拡大すべく準備を整えています。
-
-最後に、すべてのプログラムはソフトウェア特許によって絶え間なく脅かされています。およそ国家は、特許が汎用コンピュータにおけるソフトウェアの開発と利用を制限することを認めるべきではありません。しかし、そういったことを認めてしまっている地域においては、私たちは、特許がフリーなプログラムに適用され、実質的にプログラムがプロプライエタリにされてしまうという特別な脅威を避けたいと思います。こうした事態を防ぐために、GPLでは、プログラムを非フリーとするために特許を使うことはできないということを保証します。
-
-(訳注: 本許諾書で「プロプライエタリ (proprietary)」とは、ソフトウェアの利用や再頒布、改変が禁止されているか、許可を得ることが必要とされているか、あるいは厳しい制限が課せられていて自由にそうすることが事実上できなくなっている状態のことを指す。詳しくはhttp://www.gnu.org/philosophy/categories.ja.html#ProprietarySoftware をを参照せよ。)
-
-複製、頒布、改変に関する正確な利用条件は以下で述べていきます。
-利用条件 (TERMS AND CONDITIONS)¶
-0. 定義¶
-
-「本許諾書」(The License)とは、GNU 一般公衆利用許諾書のバージョン3を指す。
-
-「『コピーライト』」(Copyright)とは、いわゆる著作権のみならず、半導体マスクのようなその他の作品に適用される、著作権に類似した法的権利をも意味する。
-
-(訳注: この規定により、本許諾書は著作権法で保護されたいわゆる「著作物」よりも広い範囲をカバーすることになる。よってこの訳のライセンス本文中においては、work(s)に「著作物」ではなく「作品」という訳語を宛てることにした。)
-
-「『プログラム』」(The Program)とは、本許諾書の下でライセンスされた、『コピーライト』が主張可能な作品すべてを意味する。個々のライセンシーは「あなた」として表現される。ライセンシーは個人でも組織でも構わない。
-
-ある作品の「改変」(modify)とは、その作品の全体ないし一部を、『コピーライト』の許可を必要とするようなやり方で複製ないし翻案することを意味する。ただし、完全に同一なコピーを作成する場合は除く。改変の結果出来た作品は、以前の作品の「改変されたバージョン」(modified version)、または、以前の作品を「基にした」(based on)作品と呼ばれる。
-
-「『保護された作品』」(covered work)とは、改変されていない『プログラム』か、『プログラム』を基にした作品のいずれかを指す。
-
-ある作品の「普及」(propagate)とは、コンピュータ上で実行すること、または私的なコピーを改変することを除き、適用可能な『コピーライト』法規の下で許可無く行うと、権利侵害として、直接的、あるいは間接的にあなたが責任を問われる何らかの行為を意味する。普及には、複製、頒布 (改変の有無を問わない)、公衆への利用可能化が含まれ、またいくつかの国々では他の活動も含まれる可能性がある。
-
-ある作品の「伝達」(convey)とは、第三者がコピーを作成ないし受領するのを可能とする普及行為すべてを意味する。ただし、コンピュータネットワーク越しにユーザとやりとりするだけで、コピーの転送は伴わない場合は、伝達ではない。
-
-対話的なユーザインターフェースが「『適切な法的告知』」(Appropriate Legal Notices)を表示するという場合、そのインターフェースは (1)適切な『コピーライト』告知を表示し、(2)ユーザに対して、その作品には何の保証もない(別途保証が提供されている場合は除く)ということ、ライセンシーはその作品を本許諾書の下で伝達できるということ、そして本許諾書のコピーを見るにはどうしたらよいかということを便利かつ顕著に視認できるような機能を含むものとする。もしインターフェースが、メニューのようなユーザコマンドやオプションの一覧を表示するならば、その一覧中には上記の基準を満たすようなアイテムが目立つように含まれていなければならない。
-1. ソースコード¶
-
-ある作品の「ソースコード」(source code)とは、その作品に改変を加えるに当たって好ましいと考えられる形式のことである。「オブジェクトコード」 (object code)とは、作品がとりうるソースコード以外の形式すべてを意味する。
-
-「標準インターフェース」(Standard Interface)とは、標準化団体として認知された組織によって定義された公式な標準か、ある特定のプログラミング言語向けに指定されたインターフェースの場合には、その言語を利用する開発者の間で広く使われているインターフェースのことを指す。
-
-実行可能な作品の「『システムライブラリ』」(System Libraries)とは、 (a)「主要コンポーネント」(Major Component) の頒布物に通常含まれるが、その主要コンポーネントの一部ではなく、かつ(b)作品をその「主要コンポーネント」といっしょに利用することを可能にする、あるいは公衆にとってソースコード形式で利用可能な実装がひとつは存在する標準インターフェースを提供するためにのみ機能するものすべてを意味する。ただし、全体としての作品そのものは除く。ここでいう「主要コンポーネント」とは、実行可能な作品がその上で実行されるある特定のオペレーティングシステム (そういったものが必要ならば)の主要で不可欠な一部分(カーネルやウィンドウシステムなど)、あるいはその作品を作成するのに使われるコンパイラ、実行するのに使われるオブジェクトコードインタプリタなどを意味する。
-
-オブジェクトコード形式の作品に「『対応するソース』」(Corresponding Source)とは、その作品を生成、インストール、(実行可能な作品に関しては)オブジェクトコードを実行、または作品を改変する上で必要とされるソースコードのすべてを意味する。この場合、そうした活動をコントロールするためのスクリプトは『対応するソース』に含まれるが、その作品にとっての『システムライブラリ』や、先ほど列挙した活動を行う上で改変されることなく利用されるものの作品の一部ではない、汎用のツールや一般的に利用可能なフリープログラムは除外される。例えば『対応するソース』には、その作品のソースファイルと連携するインターフェース定義ファイルに加え、共有ライブラリや動的にリンクされた下位プログラムと作品のその他の部分との間での親密なデータのやりとりやコントロールフローなどのために、その作品が設計上明確に必要とする、そうした共有ライブラリや下位プログラムのソースコードなどが含まれる。
-
-『対応するソース』には、ユーザが『対応するソース』の他の部分から自動的に再生成できるものを含む必要はない。
-
-ソースコード形式の作品にとっての『対応するソース』とは、その作品そのものである。
-2. 基本的な許可¶
-
-本許諾書の下で認められるすべての権利は、『プログラム』に主張される『コピーライト』の条項に基づき授与されるものであり、ここで述べられた条件が満たされている限り覆すことはできない。本許諾書は、改変されていない『プログラム』をあなたが無制限に実行することを許可し、明示的に確約する。『保護された作品』を実行することから得られた出力結果は、その出力内容が『保護された作品』を構成する場合のみ本許諾書で保護される。本許諾書は、あなたが有するフェアユースまたはその同等物の権利を、『コピーライト』法規によって提供される通りに承認する。
-
-その他の状況においてあなたのライセンスが有効である限り、『保護された作品』の、伝達を伴わない作成、実行、および普及は無条件に行うことができる。他者にあなた専用の改変を行わせる、あるいは他者にあなたがそういった作品を実行するための機能を提供させるということが唯一の目的であれば、『保護された作品』を他者に伝達することができる。ただしその場合、あなたが『コピーライト』を支配していない部分すべての伝達に関しては、本許諾書の条項に従わなければならない。従って、あなたのために『保護された作品』を作成または実行する者は、専らあなたのためだけに、あなたの監督と支配の下で、あなたとの関係の範囲外ではあなたが『コピーライト』を有する一部分のいかなるコピーをも作成することを禁止するという条件の下で行わなければならないということになる。
-
-上記以外のあらゆる状況下においては、伝達は以下で述べる条件の下でのみ許可される。再許諾は認められない。下記第10項により、再許諾は必要ないからである。
-3. ユーザの法的権利を、技術的保護手段の回避を禁ずる法律から守る¶
-
-『保護された作品』は、 1996年12月20日に採択されたWIPO著作権条約第11項の下での義務を満たす適用可能な法のいずれか、あるいはそれに類似の法が、回避の禁止または制限の対象として規定する、「効果的な技術的手段」 (effective technological measure)の一部として見なされてはならない。
-
-(訳注: WIPO著作権条約については、http://www.cric.or.jp/db/article/wch.html 等を参照せよ。)
-
-あなたが『保護された作品』を伝達する場合、『保護された作品』に関して本許諾書の下で権利を行使することにより、技術的手段の回避に影響が出る範囲において、そのような手段の回避を禁じるいかなる法的権力をも放棄することになる。また、あなたはその作品のユーザに対して、技術的手段の回避を禁じるためにあなたや第三者の法的権利を強制するための手段として、その作品の動作や改変を制限するいかなる意図も否認することになる。
-4. 一字一句忠実なコピーの伝達¶
-
-あなたは、自分が受領した『プログラム』のソースコードと一字一句同じコピーであれば、いかなる媒体でも伝達することができる。ただしその場合、あなたはそれぞれのコピーにおいて、目立つように、かつ適切な形で、ふさわしい『コピーライト』告知を掲載しなければならない。すなわち、本許諾書と、下記第7項に従い追加された非許可的条項のすべてがそのコードに適用される旨の告知を掲載し、あらゆる保証が存在しない旨の告知をすべてそのまま保全し、かつ『プログラム』の受領者すべてに、『プログラム』といっしょにこの許諾書のコピーを与えなければならない。
-
-あなたは、自分が伝達するコピーのそれぞれに関していかなる価格を付けても良いし、無料で伝達しても構わない。また、報酬を取ってサポートや保証保護 (warranty protection)を提供しても良い。
-5. 改変されたバージョンのソースの伝達¶
-
-あなたは、『プログラム』を基にした作品、あるいはそうした作品を『プログラム』から作成するための改変点を、上記第4項の規定に従ってソースコード形式で伝達することができる。ただしその場合、あなたは以下に示す条件のすべてを満たさなければならない:
-
-    * a) 作品には、あなたが作品を改変したということと、改変に関連した日時を記述した告知を目立つように載せなければならない。
-    * b) 作品には、それが本許諾書と、下記第7項に従って追加された条件すべての下で公開されていることを記述した告知を目立つように載せなければな らない。この条件は、上記第4項における「告知をすべてそのまま保全」するための条項を改変する。
-    * c) 作品の全部分を、総体として、コピーを所有するに至った人全員に、本許諾書の下でライセンスしなければならない。そこで、本許諾書は、本許諾書第7項に基づく適用可能な追加的条項のすべてとともに、作品全体に、すなわちその全部分に、それらがどのようにパッケージされているかに関わらず適用されることになる。本許諾書は、これ以外のやり方には作品をライセンスする許可を与えないが、あなたが本許諾書以外で別途許可を得ていた場合には、それによって得られた許可まで無効とするものではない。
-    * d) 改変された作品が対話的なユーザインターフェースを有する場合、それらのインターフェースは『適切な法的告知』を表示しなければならない。ただし、『プログラム』に元々『適切な法的告知』を表示しない対話的なインターフェースがある場合、あなたの作品で表示するようにする必要はない。 
-
-一巻の記憶装置の中か頒布媒体上で、『保護された作品』と、本来『保護された作品』の拡張ではなく、『保護された作品』とより大規模なプログラムを形成するような形で結合されているわけでもないその他の分離かつ独立した作品とをまとめた編集物は、編集作業とそれに由来する『コピーライト』が、個々の作品が許可する範囲を越えて編集物のユーザの作品へのアクセスや法的権利を制限するのに使われない限り、「集積物」(aggregate)と呼ばれる。単に『保護された作品』を集積物に含めるだけでは、その集積物の他の部分にまで本許諾書が適用されるということにはならない。
-6. ソース以外の形式における伝達¶
-
-あなたは、オブジェクトコード形式の『保護された著作物』を、上記第4項および第5項の規定に従って伝達することができる。ただしその場合、あなたは機械読み取り可能な『対応するソース』も本許諾書の条件に従って、以下のいずれかの方法で伝達しなければならない。
-
-    * a) オブジェクトコードを物理的製品(物理的頒布媒体を含む)で、あるいはそれに組み込んで伝達する。その際、『対応するソース』を、ソフトウェア のやりとりで一般的に使われる耐久性のある物理的媒体に固定していっしょに頒布する。
-    * b) オブジェクトコードを物理的製品(物理的頒布媒体を含む)で、あるいはそれに組み込んで伝達する。その際、最低でも3年間、あるいはあなたがその製品モデルに補修用部品やカスタマーサポートを提供する限り有効な、書面 による申し出を添付する。その申し出には、(1) オブジェクトコードを所有する者すべてに対して、その製品に含まれるソフトウェアのうち本許諾書で保護されるものすべてに『対応するソース』のコピーを、ソフトウェアのやりとりで一般的に使われる耐久性のある物理的媒体で頒布する旨を記載する。その際、物理的にこのソースの伝達を行うのにかかる正当なコスト以上の価格を要求してはならない。あるいは、(2) 『対応するソース』を無料でネットワークサーバから複製するためのアクセスを提供する旨を記載する。
-    * c) オブジェクトコードの個々のコピーを、対応するソースを提供するという書面による申し出のコピーといっしょに伝達する。この選択肢は特別な場合、かつ非商業的な場合のみに、そしてあなたがオブジェクトコードを上記小項 6bに合致した申し出といっしょに受領した場合にのみに認められる。
-    * d) オブジェクトコードを、指定の場所から複製するためのアクセスを提供することによって伝達し、『対応するソース』に対しても同じ場所を通じて同じ方法で複製するための同等のアクセスを提供する。伝達は無料でも手数料を課しても構わないが、『対応するソース』に対して追加的な課金を行ってはならない。受領者に対して、『対応するソース』をオブジェクトコードといっしょに複製することを義務づける必要はない。オブジェクトコードの複製元がネットワークサーバの場合、対応するソースは同等の複製機能をサポートする異なったサーバ(あなたか第三者が運営)上にあっても良い。その場合、オブジェクトコードの傍らに、『対応するソース』はどこで見つけられるかを明確に指示しておかなければならない。どのサーバが『対応するソース』をホストするかに関わらず、あなたは『対応するソース』がこれらの条 項を満たすために必要なかぎり利用可能であることを保証する責任がある。
-    * e) オブジェクトコードをピア・ツー・ピア伝送を使って伝達する。ただしこの場合、あなたは上記小項6dに従い、その作品のオブジェクトコードと 『対応するソース』がどこで一般公衆に無料で提供されるのかということを他のピアに知らせておかなければならない。 
-
-オブジェクトコードの分離した一部であり、そのソースコードが『対応するソース』から『システムライブラリ』として除外されているものは、オブジェクトコード作品を伝達する場合に含める必要はない。
-
-「ユーザ製品」(User Product)とは、(1)「コンシューマ製品」(consumer product)、すなわち、個人、子供、あるいは家庭用に通常使用される有形個人資産すべてか、あるいは(2)居住所における導入を目的に設計ないし販売されるものすべてを指す。ある物品がコンシューマ製品であるかを決定する際疑義がある場合には、極力範囲を広げる方向で決定されるべきである。ここで、ある特定のユーザによって受領されたある特定の製品にとっての「通常使用」 (nomally used)とは、その種の製品において典型的な、あるいは一般的な利用のことであり、その特定のユーザが置かれた状況や、その特定のユーザがその製品を実際にどう使っているか、どう使うことを予期しているか、あるいは予期されているかとは関係ない。その製品に相当な商業的、産業的または非コンシューマ的な利用法があったとしても、そうした利用がその製品の唯一重要な利用形態を代表するものでない限り、その製品はコンシューマ製品である。
-
-ユーザ製品の「『インストール用情報』」(Installation Information)とは、ユーザ製品内の『保護された作品』に関して、『対応するソース』の改変されたバージョンから得られる『保護された作品』の改変されたバージョンを、インストール、実行するために必要な手法、手順、認証キーやその他の情報すべてを意味する。この情報は、改変されたオブジェクトコードの継続的な動作が、改変が為されたということによってのみ拒否されたり妨害されることが決してないことを保証するのに十分なものでなければならない。
-
-本節の下において、作品をユーザ製品の内で、またはユーザ製品と共に、あるいは特にユーザ製品での利用を念頭においてオブジェクトコードで伝達し、またその伝達がユーザ製品の受領者への所有と利用の権利の永遠ないし有期の移転の一部として起こる場合(移転がどのように行われるかは問わない)、この条項の下で『対応するソース』は『インストール用情報』と共に提供されなければならない。しかしこの条件は、あなたと第三者のいずれもが改変されたオブジェクトコードをユーザ製品にインストールする能力を有していない際には適用されない(例えば、作品がROMにインストールされている場合)。
-
-『インストール用情報』を提供する条件には、受領者によって改変ないしインストールされた作品、あるいはそうした作品が改変ないしインストールされたユーザ製品に対し、サービスや保証、アップデートを提供しつづけるという条件は含まれない。改変自体がネットワークの運用に実質的かつ有害な影響をもたらし、ネットワークを介したコミュニケーションのプロトコルや規則に違反する場合には、ネットワークアクセスを拒否しても構わない。
-
-伝達される『対応するソース』や提供される『インストール用情報』が本節を満たすためには、それらが公に文書化された形式で(かつ公衆に対してソースコード形式で利用可能な実装とともに)提供されなければならない。この場合、これらの圧縮展開や読み込み、複製に特別なパスワードやキーを必要としてならない。
-7. 追加的条項¶
-
-「追加的許可」(Additional permissions)とは、本許諾書が課す条件に一つかそれ以上の例外を設けることにより、本許諾書の条項を補足する条項のことである。『プログラム』全体に適用可能な追加的許可は、適用可能な法の下でそれらが有効である限り、あたかもそれらが本許諾書に含まれているかのように扱われなければならない。追加的許可が『プログラム』の一部にのみ適用される場合、その部分に関してはそういった追加的許可の下で別途利用可能だが、『プログラム』全体としては追加的許可に関わりなく本許諾書によってのみ管理される。
-
-あなたが『保護された作品』のコピーを伝達する場合、あなたは追加的許可をそのコピー、あるいはその一部から削除することを選択できる (追加的許可は、あなたが作品をある種の形で改変する際には、そうした許可自身の削除を要求するような形で書かれてもよい)。あなたは、あなたによって『保護された作品』に追加され、あなたが適切な『コピーライト』許可を有するか、与えることができる限り、その一部分に追加的許可を設定することができる。
-
-本許諾書の他の条件に関わらず、あなたが『保護された作品』に追加した一部分について(その部分の『コピーライト』保有者らによって正式に許可されていれば)、本許諾書の条項を、以下に示す条項で補足することができる:
-
-    * a) 本許諾書第15項および第16項の条項とは異なった形で保証の否認や責任の限定を主張する。あるいは、
-    * b) 追加した一部分において、明示的で妥当な法的告知や作者特定の保全、またはそれを含む作品において『適切な法的告知』の表示を要求する。あるいは、
-    * c) 追加した一部分の出自を不当に表示することを禁じるか、あるいはそのような一部分の改変されたバージョンはオリジナルのバージョンとは異なっ ているということを適切な方法で印づけることを要求する。あるいは、
-    * d) その一部分のライセンサーや作者の名前を、宣伝目的で利用することを制限する。あるいは、
-    * e) 商品名や商標、サービスマークの利用に関して、商標法に従い権利を授与することを拒否する。あるいは、
-    * f) その一部分(あるいはその改変されたバージョン)を伝達する者に、受領 者への責任に関して契約上の引き受けがあり、そうした責任が直接的にそういったライセンサーや作者にまで課せられる場合、その一部分のライセンサーや作者の免責を要求する。 
-
-他の非許可的な追加的条項は下記第10項が意味するところの「さらなる権利制限」(further restrictions)とみなされる。あなたが受領した『プログラム』、あるいはその一部に、それが本許諾書とともにさらなる権利制限である条項によっても管理されていると述べた告知が含まれている場合には、あなたはそういった条項を削除して構わない。あるライセンス文書にさらなる権利制限がふくまれているが、しかし本許諾書の下での再許諾や伝達を許可しているならば、あなたはそのライセンス文書の条項によって管理されている一部分を『保護された作品』に追加することができる。ただしその場合、さらなる権利制限はそのような再許諾や伝達では無効としなければならない。
-
-あなたが本節に従って『保護された著作物』に条項を追加した場合、あなたは関係するソースファイル中に、それらのファイルに適用される追加的条項に関する声明、あるいは適用可能な条項を見つけることができる場所を示す告知を掲載しなければならない。
-
-追加的条項は、それが許可的であろうと非許可的であろうと、別途書面化されたライセンスという形式で述べられてもよいし、本許諾書への例外として述べられてもよい。上記の要件はどちらの場合でも適用される。
-8. 終了¶
-
-あなたは『保護された作品』を、本許諾書の下で明示的に提供されている場合を除いて、普及、または改変してはならない。それ以外に『保護された作品』を普及、または改変しようとする試みはすべて無効であり、本許諾書の下であなたに認められた権利(下記第11項の第3段落に従い授与されたパテントライセンスすべてを含む)を自動的に終了させることになる。
-
-しかしながら、あなたが本許諾書への違反をすべて中止するならば、あなたがある特定の『コピーライト』保有者から得たライセンスは、(a)その『コピーライト』保有者が明白かつ決定的にあなたへのライセンスを終了させるか、あるいはさせないまでは暫定的に、(b)その『コピーライト』保有者が、あなたに対し違反について、何らかの正当な手段によりライセンス停止後60日以内に通知することができなかった場合には永続的に、回復される。
-
-加えて、あなたがある特定の『コピーライト』保有者から得たライセンスは、その『コピーライト』保有者があなたに対して違反を何らかの正当な手段で通知し、それより前にその『コピーライト』保有者から、(当該作品に限らずその『コピーライト』保有者の作品のいずれかに関して)本許諾書に関する違反の通知を受領したことがなく、さらにあなたがその通知を受領してから30日以内に違反を正した場合、永続的に回復される。
-
-本節に従いあなたの権利が終了した場合でも、本許諾書に従ってあなたからコピーや権利を受領した当事者が得た許諾は終了しない。あなたの権利が終了され、永続的に回復されなかった場合には、あなたは同じライセンス対象に関し下記第10項に従って新たにライセンスを受領する資格を失うものとする。
-9. コピーの所有に必要とされない受諾¶
-
-あなたは、『プログラム』のコピーを受領あるいは実行するために本許諾書を受諾する必要はない。コピーを受領するためにピア・ツー・ピア伝送を使った結果としてのみ発生する『保護された作品』の付随的な普及も、同様に受諾を必要としない。しかしながら、他の場合においては、本許諾書以外にあなたに対して『保護された作品』の普及や改変をする許可を認めるものはない。これらの行為は、本許諾書を受諾しない限り『コピーライト』を侵害することになる。そこで、『保護された作品』を改変あるいは普及することにより、あなたはそうした行為を行うために本許諾書を受諾したということを示したことになる。
-10. 下流の受領者への自動的許諾¶
-
-あなたが『保護された作品』を伝達するたびに、受領者は自動的にオリジナルのライセンサーから、本許諾書に従いその作品を実行、改変、普及するライセンスを得る。なお、あなたには第三者が本許諾書に従うことを強制する責任はない。
-
-「主体取引」(entity transaction)とは、ある組織そのもの、ないしその組織の実質的に全ての資産の支配権が移転するか、あるいは組織の細分化や合併が行われるような取引を指す。もし主体取引の結果として『保護された作品』の普及が起こった場合、作品のコピーを受領したそれぞれの取引当事者は、利害関係のある当事者の先任者から、その先任者が前段落に従って有する、あるいは与えることができる、その作品に関するライセンスもまたすべて受領する。加えて個々の取引当事者は、利害関係のある先任者から、その先任者が有しているか、適正な努力によって得ることが可能な限りにおいて、その作品の『対応するソース』の所有権も得る権利を有する。
-
-あなたは本許諾書の下で授与された、あるいは確約された権利の行使に対して、本許諾書が規定する以上のさらなる権利制限を課してはならない。たとえば、あなたはライセンス料、ロイヤルティや他の料金を、本許諾書の下で認められている権利の行使に関して課してはならない。また、あなたは『プログラム』やその一部の作成、利用、販売、販売の申し出、取り込みによって何らかのパテントクレームが侵害されたとして、訴訟(訴訟における反対請求ないし反訴を含む)を開始してはならない。
-11. 特許¶
-
-「貢献者」(contributor)とは、本許諾書の下で『プログラム』、あるいは『プログラム』が基にした作品を利用することを正式に許可した『コピーライト』保有者のことを指す。従って、そのようにしてライセンスされた作品は、貢献者による「貢献者バージョン」(contributor version)と呼ばれる。
-
-ある貢献者の「必須パテントクレーム」(essential patent claims)とは、すでに取得しているか、あるいは今後取得する見込みがあるため、その貢献者が現在所有ないし支配していると言える特許のうち、貢献者バージョンに対して、本許諾書で許可されているような作成や利用、販売といった何らかの形の行為を行うことによって侵害される可能性があるパテントクレームのすべてを意味する。ただし、貢献者バージョンをさらに改変した結果としてのみ侵害されるようなクレームは含まれない。この定義において、「支配」には本許諾書が課す条件と整合的なやり方で特許の再許諾を認める権利も含まれる。
-
-個々の貢献者はあなたに対して、その貢献者の必須パテントクレームに関し、あなたがその貢献者バージョンの内容を作成、利用、販売、販売の申し出、取り込み、その他実行、改変、普及するために必要な、非排他的で全世界的に有効、かつロイヤルティフリーのパテントライセンスを授与する。
-
-以下の3段落において「『パテントライセンス』」とは、ある特許を実施しないという明示的な協定やコミットメントのすべてを指す(例えば、ある特許の実施に対する明示的な許可や、特許侵害訴訟を提起しないという誓約など)。そのような『パテントライセンス』をある当事者に「授与」するとは、その当事者と特許を実施しないという協定やコミットメントを結ぶことを意味する。
-
-もしあなたが、『保護された作品』の伝達を、それがある『パテントライセンス』に依存しており、よってその作品の『対応するソース』は、すべての人にとって、公衆が利用可能なネットワークサーバや他の容易にアクセス可能な手段を通じ、無料かつ本許諾書に従って複製可能ではないということを知りながら行うならば、あなたは (1)『対応するソース』も同様に利用可能にするか、 (2)この特定の作品に関して『パテントライセンス』から得られる便益を自ら剥奪するか、あるいは(3)下流の受領者に対しても、本許諾書の条項と整合的な形で、『パテントライセンス』が拡大されるように計らうかのいずれかを行わなければならない。ここで「『パテントライセンス』に依存するのを知りながら」というのは、あなたが『保護された作品』をある国で伝達すること、あるいはあなたの受領者が『保護された著作物』をある国で利用することが、『パテントライセンス』を授与されない限り、その国において、あなたにとってそれが有効だと信じるだけの理由がある一つかそれ以上の同定可能な特許を侵害するということを実際に知っているということである。
-
-ある一対一の取引や協定に基づき、あるいは関連して、あなたが『保護された作品』の伝達、または伝達によって引き起こされる普及を行い、その際『保護された作品』を受領した一部の当事者に対して、『保護された作品』の特定のコピーの利用、普及、改変、または伝達を正式に許可するような『パテントライセンス』を授与するならば、あなたが授与した『パテントライセンス』は『保護された作品』やそれを基にした作品のすべての受領者にまで自動的に拡大されることになる。
-
-ある『パテントライセンス』が「差別的」(discriminatory)であるとは、本許諾書の下で明確に認められた一つかそれ以上の権利を、『パテントライセンス』がカバーする範囲内に含まなかったり、そうした権利の行使を禁じたり、あるいは権利を行使しないことを条件として課すようなものである場合を指す。あなたを一方の当事者とし、ソフトウェアの頒布を生業とする第三者との間で、あなたは第三者に対し、作品を伝達する活動の程度に基づいて支払いを行う一方、第三者は、あなたから『保護された作品』を受領したすべての当事者に対して「差別的」な『パテントライセンス』を、(a)あなたが伝達した『保護された作品』のコピー(またはそうしたコピーから作成されたコピー)に対して、または(b)『保護された作品』を含む特定製品や編集物を、主要な、あるいは関連した対象として授与する、というような協定を結んでいる場合、あなたは『保護された作品』を伝達してはならない。ただし、あなたがそのような協定を締結したり、『パテントライセンス』を授与されたのが2007年3月28日より以前である場合は本節の例外とする。
-
-本許諾書に含まれる一切の記述は、適用可能な特許法の下であなたが利用可能な暗黙のライセンス、その他侵害への防御手段を排除したり制限したりするように解釈されてはならない。
-12. 他者の自由を明け渡してはならない¶
-
-何らかの条件(裁判所の指令や協定など)があなたに課せられ、それが本許諾書の条件と矛盾したとしても、あなたが本許諾書の条件を免れることにはならない。あなたが、『保護された作品』を、本許諾書が課す義務と他の関連した義務の両方を同時に満たすような形で伝達できないのであれば、結果としてあなたがそれを伝達することは全く不可能ということになる。例えばあなたが、自分が『プログラム』を伝達した人々がさらに伝達を行う場合には、彼らからロイヤルティを徴収する、というような義務を負う条項に同意していた場合、あなたがそういった条項と本許諾書の両方を満たすには、『プログラム』の伝達を完全に止めてしまうしかないだろう。
-13. GNU Affero 一般公衆利用許諾書との利用¶
-
-本許諾書に含まれる他の条件に関わらず、あなたには、『保護された作品』を GNU Affero 一般公衆利用許諾書バージョン3の下で許諾された作品とリンクまたは結合して単一の結合物とし、その結果物を伝達する許可が与えられる。本許諾書の条項は『保護された作品』である部分に関してはそのまま適用されるが、結合物それ自体としては、GNU Affero 一般公衆利用許諾書の第13項が規定する、ネットワークを介したやりとりに関する特殊な条件も適用されることになる。
-
-(訳注: 訳出時点では、GNU Affero GPLは改定作業が依然続いており、確定バージョンはリリースされていない。 http://gplv3.fsf.org/agplv3-dd2-guide.htmlを参照せよ。)
-14. 本許諾書の改訂されたバージョン¶
-
-フリーソフトウェア財団は、改訂された、あるいは新しいバージョンの GNU 一般公衆利用許諾書を折りに触れて発行することができる。そのような新バージョンは、その精神においては現在のバージョンと似たものになるだろうが、細部については新たな問題や懸念を解決すべく異なるものになるだろう。
-
-それぞれのバージョンには、見分けがつくようなバージョン番号が振られている。『プログラム』に、ある特定のバージョン番号が振られた GNU 一般公衆利用許諾書「かそれ以降のバージョンのいずれか(or any later version)」が適用されると指定されていた場合、あなたは指定された番号のバージョンか、それ以降にフリーソフトウェア財団によって発行されたいずれかのバージョンのどちらの利用条件に従うかを選ぶことができる。『プログラム』が本許諾書のバージョン番号を指定していなかった場合には、あなたはフリーソフトウェア財団がそれまでに発行したバージョンの中からどれを選択しても構わない。
-
-(訳注: 日本語訳のバージョンは日付で管理している。冒頭を見よ。)
-
-『プログラム』において、GNU 一般公衆利用許諾書の将来のバージョンのうちどれが適用されうるかは代理人が決定できる、と指定されていた場合、その代理人が、あるバージョンを受諾すると述べた公的な声明は、あなたに対し、その『プログラム』に関してそのバージョンのGNU GPLを選ぶことを永続的かつ正式に許可するのと等しい。
-
-本許諾書の今後のバージョンでは、あなたに追加的な、または従来とは異なった形での許可を与えるかもしれない。しかしながら、作者や『コピーライト』保有者に対し、あなたが以降のバージョンに従うことを選んだ結果として、追加的な義務が課せられることはない。
-15. 保証の否認¶
-
-『プログラム』には、適用可能な法で許可されている範囲において何の保証もない。書面で述べられていない限り、『コピーライト』保有者やその他の当事者は『プログラム』を「あるがまま(as is)」で、明示的、暗示的を問わず、いかなる種類の保証もなく提供する。この保証には、商用可能性や特定目的への適合性の暗黙的保証が含まれるが、これらに限定されない。『プログラム』の質や性能に関するリスクはすべてあなたに帰属する。『プログラム』に問題があると判明した場合、あなたは必要なすべての対応、補修、修正にかかる費用を負うものとする。
-16. 責任の限定¶
-
-適用可能な法において義務づけられるか、書面による同意がない限り、『コピーライト』保有者あるいはその他『プログラム』を上記で許可された通りに改変あるいは伝達する当事者は、たとえそうした保有者や他の当事者が損害が発生する可能性について事前に通知されていたとしても、あなたに対して損害賠償責任を有することはない。ここでいう損害には、『プログラム』の利用あるいは利用できないことから発生した一般的、特殊的、偶然的、必然的な損害のすべてが含まれる(データの消失やデータの不正確な解釈、あなたや第三者によって被った、あるいは『プログラム』が他のプログラムといっしょにうまく動作しなかったために引き起こされた損害などが含まれるが、これらに限定されない)。
-17. 第15項と第16項の解釈について¶
-
-上記のような保証の否認や責任の限定が、特定国内においてそういった条項が指定する通りの法的効力を持ち得ない場合、再審裁判所は、『プログラム』に関連したすべての民事責任の絶対的棄権に最も近く肉薄する国内法を適用すべきである。ただし、報酬の見返りとして責任の保証や引き受けが『プログラム』のコピーに付随する場合は除く。 
-
diff --git a/rec10/branches/0.4/src/license.txt b/rec10/branches/0.4/src/license.txt
deleted file mode 100644 (file)
index 69e51ec..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-GNU LESSER GENERAL PUBLIC LICENSE
-
-Version 3, 29 June 2007
-
-Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
-
-Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-
-This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
-0. Additional Definitions.
-
-As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License.
-
-“The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
-
-An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
-
-A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”.
-
-The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
-
-The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
-1. Exception to Section 3 of the GNU GPL.
-
-You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
-2. Conveying Modified Versions.
-
-If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
-
-    * a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
-    * b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
-
-3. Object Code Incorporating Material from Library Header Files.
-
-The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
-
-    * a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
-    * b) Accompany the object code with a copy of the GNU GPL and this license document.
-
-4. Combined Works.
-
-You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
-
-    * a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
-    * b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
-    * c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
-    * d) Do one of the following:
-          o 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
-          o 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
-    * e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
-
-5. Combined Libraries.
-
-You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
-
-    * a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
-    * b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
-
-6. Revised Versions of the GNU Lesser General Public License.
-
-The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
-
-If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
-
-
-GNU GENERAL PUBLIC LICENSE
-
-Version 3, 29 June 2007
-
-Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
-
-Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-Preamble
-
-The GNU General Public License is a free, copyleft license for software and other kinds of works.
-
-The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
-
-To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
-
-For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
-
-Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
-
-For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
-
-Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
-
-Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
-
-The precise terms and conditions for copying, distribution and modification follow.
-TERMS AND CONDITIONS
-0. Definitions.
-
-“This License” refers to version 3 of the GNU General Public License.
-
-“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
-
-“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
-
-To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
-
-A “covered work” means either the unmodified Program or a work based on the Program.
-
-To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
-
-To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
-
-An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
-1. Source Code.
-
-The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
-
-A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
-
-The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
-
-The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
-
-The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
-
-The Corresponding Source for a work in source code form is that same work.
-2. Basic Permissions.
-
-All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
-
-You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
-
-Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
-3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
-
-When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
-4. Conveying Verbatim Copies.
-
-You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
-
-You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
-5. Conveying Modified Source Versions.
-
-You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
-
-    * a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
-    * b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
-    * c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
-    * d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
-
-A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
-6. Conveying Non-Source Forms.
-
-You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
-
-    * a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
-    * b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
-    * c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
-    * d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
-    * e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
-
-A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
-
-A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
-
-“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
-
-If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
-
-The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
-
-Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
-7. Additional Terms.
-
-“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
-
-When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
-
-Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
-
-    * a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
-    * b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
-    * c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
-    * d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
-    * e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
-    * f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
-
-All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
-
-If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
-
-Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
-8. Termination.
-
-You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
-
-However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
-
-Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
-
-Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
-9. Acceptance Not Required for Having Copies.
-
-You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
-10. Automatic Licensing of Downstream Recipients.
-
-Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
-
-An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
-
-You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
-11. Patents.
-
-A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
-
-A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
-
-Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
-
-In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
-
-If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
-
-If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
-
-A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
-
-Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
-12. No Surrender of Others' Freedom.
-
-If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
-13. Use with the GNU Affero General Public License.
-
-Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
-14. Revised Versions of this License.
-
-The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
-
-If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
-
-Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
-15. Disclaimer of Warranty.
-
-THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-16. Limitation of Liability.
-
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-17. Interpretation of Sections 15 and 16.
-
-If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
diff --git a/rec10/branches/0.4/src/missed.py b/rec10/branches/0.4/src/missed.py
deleted file mode 100755 (executable)
index bf66645..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import configreader
-import glob
-import time
-if __name__ == "__main__":
-    print "Hello World";
-def search_b25(path):
-    b25list=glob.glob(path+"/*.b25")
-    tslist=glob.glob(path+"/*.ts")
-    avilist=glob.glob(path+"/*.avi")
-    for b25f in b25list:
-        ##b25f is title.ts.b25  avi is title.avi
-        dir=os.path.split(b25f)[0]
-        title=os.path.split(b25f)[1]
-        title=title.replace(".ts.b25","")
-        avipath=os.path.join(dir,title+".avi")
-        tspath=os.path.join(dir,title+".ts")
-        b25f=b25f.replace(".ts.b25",".avi")
-        mode="ts"
-        if os.path.isfile(tspath):##tsファイルが存在している
-            dtime=time.time()-os.path.getmtime(tspath)
-            dtime=int(dtime)
-            if dtime > 120 :
-                if os.path.getsize(tspath)>1*1000*1000:##最終更新から22分以上経過かつ1MB以上
-                    mode="avi"
-                else:
-                    mode="tsmiss"
-            else :
-                mode="ts"
-        if os.path.isfile(avipath):##tsファイルが存在している
-            dtime=time.time()-os.path.getmtime(avipath)
-            dtime=int(dtime)
-            if dtime > 120 :
-                if os.path.getsize(avipath)>1*1000*1000:##最終更新から22分以上経過かつ1MB以上
-                    mode="fin"
-                else:
-                    mode="avimiss"
-            else :
-                mode="avi"
-        print title+":"+mode
-path=configreader.getpath("recpath")
-search_b25(path)
-        
\ No newline at end of file
diff --git a/rec10/branches/0.4/src/readme.txt b/rec10/branches/0.4/src/readme.txt
deleted file mode 100644 (file)
index 0bd580d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-###########################################
-#     Rec10 for PT1                  #
-#                     Ver.0.1.0b     #
-# 2009/05/09    Yukikaze                 #
-#  Copyright (C) 2009 Yukikaze   #
-###########################################
-
-本ソフトはpythonおよびperlによって書かれた録画ツールです。
-ライセンスは LGPL v3に準拠します(license.txt参照)
-
-[必要コマンド]
-python(2.5にて動作確認)
-xvfb-run
-wine
-mencoder
-ffmpeg
-
-[必要環境:Webインターフェース部分]
-perl
-一部のperlモジュール
-
-[必要環境:外部ツール]
-TsSplitter
-BonTsDemux
-tsEpg2xml
-b25
-recpt1
-
-以上のソフトについては実行パスをconfig.iniに書いておいてください
-その後chdate.pyのチャンネル設定部分を書き換え、chdate.pyを実行してください
-次にinstall.pyを実行すると番組表の取得が始まります。
-wwwフォルダにあるrectool.plを好みの場所に移動させ、そのフォルダにch.dbにたいするリンクを作成してください。
-最後にrec10d.pyをcronで五分おきに実行するようにしてください
-crontab -e を実行するとcronを編集できるようになるので
-*/5 * * * * /rec10d.py
-のように書いてください
-ログが見たい場合は
-*/5 * * * * /rec10d.py > /dev/pts/0
-などのようにすれば/dev/pts/0端末に出力します(ttyコマンドで調べられます)
-
-以上で設定は終了です。
-
-ちなみに
-dbviewer.pyを実行すると現在のデーターベースを見ることができます。
-エンコードの設定を変えたい場合はts2x264を参照してください
-
-チャンネルの設定を買えた場合は一度chdate.pyを変更したのちに実行してください
-その後番組表が更新されます
-
-バグだらけのコードですが、改善点などを指摘していただけるとうれしいです。
-yukikaze.jp@gmail.com
-
-[History]
-09/05/24 0.3.1 release
-fix
-チャンネルの増加
-エンコードオプションを実際に使えるようにした。
-1passモード実装
-niceコマンドをより広範囲に適用するようにした。
-09/05/08 0.1.1 release
-fix
-2passエンコードのログファイルがかぶるのを訂正
-一部チャンネル指定が間違っていたのを訂正
-その他多くのバグの訂正
-09/05/05 0.0.1b release
-fix
-replace tab to 4 spaces(it caused errors)
-add some cs-e2 channels
-09/05/04 0.0.1a release
diff --git a/rec10/branches/0.4/src/rec10d.py b/rec10/branches/0.4/src/rec10d.py
deleted file mode 100644 (file)
index fc91a37..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import timerec
-path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-
-timerec.task()
-
diff --git a/rec10/branches/0.4/src/rec10gridserver.py b/rec10/branches/0.4/src/rec10gridserver.py
deleted file mode 100755 (executable)
index e1b7cca..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-from SocketServer import *
-import recdb
-import configreader
-RECV_BUF = 8192
-
-class Handler(BaseRequestHandler):
-    """
-    This is a server to encode ts files in another pc.
-
-    """
-    def handle(self):
-        print "connect from:", self.client_address
-        cons=getTask()
-        print cons+" is sent"
-        self.request.send(cons)
-        """while True:
-            #ret = self.request.recv(RECV_BUF)
-            #if len(ret) == 0:
-            #    break
-            self.request.send()
-
-            """
-        self.request.close()
-
-def getTask():
-    tasks=recdb.getnow("1")
-    rett=""
-    for task in tasks:
-        if task["type"]=="ts2avi":
-            title=task['title']
-            opt=task['opt']
-            btime=task['btime']
-            etime=task['etime']
-            chtxt=task['chtxt']
-            recdb.del_reckey("ts2avi", title, chtxt, btime)
-            recdb.rec_reckey("grid", title, chtxt, btime, etime, opt)
-            rett="title="+title+","+"opt="+opt+";"
-            break
-    return rett
-def main():
-    port=int(configreader.getpath("gridserver_port"))
-    sv = ThreadingTCPServer(('', port), Handler)
-    print "This is a Rec10 GridServer."
-    print "Waiting for connections at port"+str(port)
-    print 'listen to:', sv.socket.getsockname()
-    sv.serve_forever()
-
-if __name__ == '__main__': main()
diff --git a/rec10/branches/0.4/src/recdb.py b/rec10/branches/0.4/src/recdb.py
deleted file mode 100644 (file)
index 127c579..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import sqlite3
-import recdb
-dbpath=str(os.path.dirname(os.path.abspath(__file__)))+"/"+"ch.db"
-db=sqlite3.connect(dbpath)
-
-global REC_RESERVE
-REC_RESERVE="res"
-global REC_FINAL_RESERVE
-REC_FINAL_RESERVE="rec"
-global REC_END
-REC_END="end"
-global REC_GRID
-REC_GRID="grid"
-global REC_ENCODE_QUE
-REC_ENCODE_QUE="ts2avi"
-global REC_MIXING_SOUND
-REC_MIXING_SOUND="mixsound"
-global REC_MISS_ENCODE
-REC_MISS_ENCODE="miss"
-global REC_KEYWORD
-REC_KEYWORD="key"
-global REC_KEYWORD_EVERY_SOME_DAYS
-REC_KEYWORD_EVERY_SOME_DAYS="keyevery"
-global REC_FIN_DECODE
-REC_FIN_DECODE="tsfin"
-global REC_MISS_DECODE
-REC_MISS_DECODE="tsmiss"
-global REC_TS_DECODING
-REC_TS_DECODING="tsdecoding"
-try:
-    db.execute('create table rectime (type TEXT,chtxt TEXT,title TEXT,btime TEXT,etime TEXT,deltatime TEXT,deltaday TEXT,opt TEXT,id INTEGER PRIMARY KEY,UNIQUE(type,chtxt,title,btime,deltaday))')
-except:
-    #print "テーブル作成に失敗しました"
-    db.commit()
-    db.close()
-def recreserv(title,chtxt,btime,etime,opt):#optにはa(アニメ)d(副音声)v(xvid)
-    rec_reckey("res",title,chtxt,btime,etime,opt)
-def keyreserv(keyword,chtxt,btime,etime,deltatime,opt):
-    db=sqlite3.connect(dbpath)
-    recline="\""+recdb.REC_KEYWORD+"\",\""+chtxt+"\",\""+keyword+"\",datetime(\""+btime+"\"),datetime(\""+etime+"\"),\""+deltatime+"\",\""+opt+"\""
-    db.execute('insert into rectime ("type","chtxt","title","btime","etime","deltatime","opt") values ('+recline+')')
-    db.commit()
-    db.close()
-def everyreserv(keyword,chtxt,btime,etime,deltatime,opt,deltaday):
-    db=sqlite3.connect(dbpath)
-    recline="\""+recdb.REC_KEYWORD_EVERY_SOME_DAYS+"\",\""+chtxt+"\",\""+keyword+"\",datetime(\""+btime+"\"),datetime(\""+etime+"\"),\""+deltatime+"\",\""+opt+"\",\""+deltaday+"\""
-    db.execute('insert into rectime ("type","chtxt","title","btime","etime","deltatime","opt","deltaday") values ('+recline+')')
-    db.commit()
-    db.close()
-def lastrecreserv(title,chtxt,btime,etime,opt):#optにはa(アニメ)d(副音声)v(xvid)##btimeなどは2006-07-17 13:25:23の形
-    """
-    Caution this is old function and you should not use it.
-    Please use rec_reckey(recdb.REC_FINAL_RESERVE,title,chtxt,btime,etime,opt) instead of lastrecreserv(title,chtxt,btime,etime,opt)
-    """
-    rec_reckey(recdb.REC_FINAL_RESERVE,title,chtxt,btime,etime,opt)
-def misrecwrite(title,chtxt,btime,etime,opt):
-
-    """
-    Caution this is old function and you should not use it.
-    Please use rec_reckey(recdb.REC_MISS_ENCODE,title,chtxt,btime,etime,opt) instead.
-    """
-    rec_reckey(recdb.REC_MISS_ENCODE,title,chtxt,btime,etime,opt)
-def recend(title,chtxt,btime,etime,opt):#optにはa(アニメ)d(副音声)v(xvid)
-    """
-    Caution this is old function and you should not use it.
-    Please use rec_reckey(recdb.REC_END,title,chtxt,btime,etime,opt) instead.
-    """
-    rec_reckey(recdb.REC_END,title,chtxt,btime,etime,opt)
-def rec_reckey(type,title,chtxt,btime,etime,opt):
-    db=sqlite3.connect(dbpath)
-    recline="\""+type+"\",\""+chtxt+"\",\""+title+"\",datetime(\""+btime+"\"),datetime(\""+etime+"\"),\""+opt+"\""
-    db.execute('insert into rectime ("type","chtxt","title","btime","etime","opt") values ('+recline+')')
-    db.commit()
-    db.close()
-def delrec(title,chtxt,btime):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_RESERVE,title,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_RESERVE,title,chtxt,btime)
-def delkey(keyword,chtxt,btime,deltatime):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_FINAL_RESERVE,keyword,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_KEYWORD,keyword,chtxt,btime)
-def dellastrec(title,chtxt,btime):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_FINAL_RESERVE,title,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_FINAL_RESERVE,title,chtxt,btime)
-def delevery(keyword,chtxt,btime,deltatime,deltaday):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_FINAL_RESERVE,keyword,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_KEYWORD_EVERY_SOME_DAYS,keyword,chtxt,btime)
-def delend(title,chtxt,btime):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_END,title,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_END,title,chtxt,btime)
-def deltitle(key):
-    db=sqlite3.connect(dbpath)
-    i=0
-    for title in db.execute("SELECT title FROM rectime WHERE title like \"%"+key+"%\""):
-        i=i+1
-    if i==1:
-        db.execute("delete from rectime where title like \'%"+key+"%\'")
-    db.commit()
-    db.close()
-def del_reckey(type,title,chtxt,btime):
-    db=sqlite3.connect(dbpath)
-    db.execute("delete from rectime where type = \'"+type+"\' AND title = \'"+title+"\' AND chtxt = \'"+chtxt+"\' AND btime = datetime(\""+btime+"\")")
-    db.commit()
-    db.close()
-def getnow(dhour):
-    db=sqlite3.connect(dbpath)
-    recdatum=[]
-    for typet, chtxt, title, btime, etime, deltatime ,deltaday ,opt in db.execute("SELECT type, chtxt, title, DATETIME(btime), DATETIME(etime), deltatime ,deltaday ,opt FROM rectime WHERE btime < datetime(\'now\',\'localtime\',\'+"+dhour+" hours\') AND btime >datetime(\'now\',\'localtime\',\'-"+dhour+" hours\')"):
-        ret={}
-        ret['type']=typet
-        ret['chtxt']=chtxt
-        ret['title']=title.encode('utf-8')
-        ret['btime']=btime
-        ret['etime']=etime
-        ret['opt']=opt
-        if typet=='key':
-            ret['deltatime']=deltatime
-        elif typet=='keyevery':
-            ret['deltatime']=deltatime
-            ret['deltaday']=deltaday
-        recdatum.append(ret)
-    db.commit()
-    db.close()
-    return recdatum
-def delete_old(dhour):
-    """
-    delete keys except recdb.REC_MISS_ENCODE and recdb.REC_KEYWORD_EVERY_SOME_DAYS before dhour hours from now.
-    """
-    db=sqlite3.connect(dbpath)
-    db.execute("DELETE FROM rectime WHERE NOT ( type = \""+recdb.REC_MISS_ENCODE+"\" OR type = \""+recdb.REC_KEYWORD_EVERY_SOME_DAYS+"\" ) AND btime < datetime(\'now\',\'localtime\',\'-"+dhour+" hours\')")
-    db.commit()
-    db.close()
-def getall():
-    db=sqlite3.connect(dbpath)
-    recdata=[]
-    for typet, chtxt, title, btime, etime, deltatime ,deltaday ,opt in db.execute("SELECT type, chtxt, title, btime, etime, deltatime ,deltaday ,opt FROM rectime"):
-        ret={}
-        ret['type']=typet
-        ret['chtxt']=chtxt
-        ret['title']=title.encode('utf-8')
-        ret['btime']=btime
-        ret['etime']=etime
-        ret['opt']=opt
-        if typet=='key':
-            ret['deltatime']=deltatime
-        elif typet=='keyevery':
-            ret['deltatime']=deltatime
-            ret['deltaday']=deltaday
-        recdata.append(ret)
-    db.close()
-    return recdata
diff --git a/rec10/branches/0.4/src/recdblist.py b/rec10/branches/0.4/src/recdblist.py
deleted file mode 100644 (file)
index 831b7d1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import recdb
-tasks=recdb.getall()
-for task in tasks:
-    #value=line.split(",")
-    if task["type"]=="res":#"res,"+chtxt+","+title+","+btime+","+etime+","+opt
-        chtxt=task['chtxt']
-        title=task['title']
-        btime=task['btime']
-        etime=task['etime']
-        opt=task['opt']
-        print "res"+","+chtxt+","+title+","+btime+","+etime+","+opt
-    elif task["type"]=="key":#"key,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-        chtxt=task['chtxt']
-        #title=task['title']
-        btime=task['btime']
-        #etime=task['etime']
-        keyword=task['title']
-        deltatime=task['deltatime']
-        opt=task['opt']
-        print "key"+","+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-    elif task["type"]=="keyevery":#"keyevery,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-        chtxt=task['chtxt']
-        #title=task['title']
-        btime=task['btime']
-        #etime=task['etime']
-        keyword=task['title']
-        deltatime=task['deltatime']
-        opt=task['opt']                        
-        deltaday=task['deltaday']
-        print "keyevery"+","+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-    elif task["type"]=="rec":#"rec,"+chtxt+","+title+","+btime+","+etime+","+opt
-        chtxt=task['chtxt']
-        title=task['title']
-        print title
-        btime=task['btime']
-        etime=task['etime']
-        #keyword=task['keyword']
-        #deltatime==task['deltatime']
-        opt=task['opt']
-        print "rec"+","+chtxt+","+title+","+btime+","+etime+","+opt
diff --git a/rec10/branches/0.4/src/src/chdata.py b/rec10/branches/0.4/src/src/chdata.py
deleted file mode 100644 (file)
index 098f9e5..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import sqlite3
-
-import os
-#CS放送では複数のチャンネルを指定する必要があるためチャンネル名をテキストデータで持っておき(chtxt)、必要に応じて変換する
-#ontvはepgデータなどで指定されている名前
-#ここの設定は愛知県の設定(+CS放送スカパーe2)
-dbpath = str(os.path.dirname(os.path.abspath(__file__))) + "/" + "ch.db"
-#db=sqlite3.connect(dbpath)
-db = sqlite3.connect(dbpath)
-try:
-
-    db.execute('drop table chdata')
-    db.commit()
-except:
-    test = ""
-
-try:
-    db.execute('create table chdata (bctype TEXT,ontv TEXT,chtxt TEXT,ch TEXT,csch TEXT,station TEXT,updatetime TEXT)')
-except:
-    ""
-db.commit()
-
-#except:
-#   print "テーブル作成に失敗しました"
-#   db.commit()
-#db.commit()
-db.close()
-def chadd(bctype, ontv, chtxt, ch, csch,station):#すべて文字列
-    """
-    ChannelDBに指定したデータを追加する
-    bctype:放送種別,bs/cs/te10などが入る。
-    番組表データがbs,csは一括でとれるためbs,cs内で区別はなし
-    te(地上波)は各チャンネルごとに設定する必要があるためteに
-    チャンネルの数字を足したものにする
-    """
-    db = sqlite3.connect(dbpath)
-    value = "(\'" + bctype + "\',\'" + ontv + "\',\'" + chtxt + "\',\'" + ch + "\',\'" + csch + "\',\'" +station+ "\',datetime(\'2009-04-01 00:00:00\'))"
-    print value
-    value = unicode(value)
-    db.execute('insert into chdata values ' + value)
-    db.commit()
-    db.close()
-#db.commit
-chadd('cs', '1204.ontvjapan.com', 'natiogeo', 'CS6', '343','CSDT343')
-chadd('cs', '1070.ontvjapan.com', 'bbc', 'CS12', '353','CSDT353')
-chadd('cs', '1069.ontvjapan.com', 'cnn', 'CS12', '354','CSDT354')
-chadd('cs', '1045.ontvjapan.com', 'kids', 'CS22', '330','CSDT330')
-chadd('cs', '1007.ontvjapan.com', 'movieplus', 'CS18', '240','CSDT240')
-chadd('cs', '1016.ontvjapan.com', 'fox', 'CS4', '312','CSDT312')
-chadd('cs', '1014.ontvjapan.com', 'axn', 'CS6', '311','CSDT311')
-chadd('cs', '1201.ontvjapan.com', 'atx', 'CS16', '333','CSDT333')
-chadd('cs', '1050.ontvjapan.com', 'hisch', 'CS16', '342','CSDT342')
-chadd('cs', '1047.ontvjapan.com', 'animax', 'CS20', '332','CSDT332')
-chadd('cs', '1062.ontvjapan.com', 'disch', 'CS20', '340','CSDT340')
-chadd('cs', '1193.ontvjapan.com', 'anipla', 'CS20', '341','CSDT341')
-chadd('cs', '1008.ontvjapan.com', 'neco', 'CS6', '223','CSDT223')
-chadd('cs', '1015.ontvjapan.com', 'family', 'CS22', '293','CSDT293')
-
-chadd('cs', '1009.ontvjapan.com', 'yo-ga', 'CS6', '224','CSDT224')
-chadd('cs2', '1217.ontvjapan.com', 'thecinema', 'CS10', '228','CSDT228')
-chadd('cs2', '1086.ontvjapan.com', 'nihoneiga', 'CS2', '239','CSDT239')
-
-#chadd('cs', '1015.ontvjapan.com', 'fuji-one', 'CS22', '293')
-#chadd('cs', '1015.ontvjapan.com', 'fuji-two', 'CS22', '293')
-chadd('te13', '0442.ontvjapan.com', 'nhk-k', '13', '0','DFS00C08')
-chadd('te20', '0432.ontvjapan.com', 'nhk-s', '20', '0','DFS08400')
-chadd('te22', '0404.ontvjapan.com', 'me-tere', '22', '0','DFS00C20')
-chadd('te18', '0405.ontvjapan.com', 'cbc', '18', '0','DFS00C18')
-chadd('te21', '0406.ontvjapan.com', 'toukai', '21', '0','DFS00C10')
-chadd('te19', '0407.ontvjapan.com', 'chukyo', '19', '0','DFS00C28')
-chadd('te23', '0420.ontvjapan.com', 'aichi', '23', '0','DFS08430')
-chadd('bs', '3001.ontvjapan.com', 'bs-nhk-1', '101', '0','BSDT101')
-chadd('bs', '3002.ontvjapan.com', 'bs-nhk-2', '102', '0','BSDT102')
-chadd('bs', '3003.ontvjapan.com', 'bs-nhk-hi', '103', '0','BSDT103')
-chadd('bs', '3004.ontvjapan.com', 'bs-nittere', '141', '0','BSDT141')
-chadd('bs', '3005.ontvjapan.com', 'bs-asahi', '151', '0','BSDT151')
-chadd('bs', '3006.ontvjapan.com', 'bs-tbs', '161', '0','BSDT161')
-chadd('bs', '3007.ontvjapan.com', 'bs-japan', '171', '0','BSDT171')
-chadd('bs', '3008.ontvjapan.com', 'bs-fuji', '181', '0','BSDT181')
-chadd('bs', '3013.ontvjapan.com', 'bs-11', '211', '0','BSDT211')
-
diff --git a/rec10/branches/0.4/src/src/chdb.py b/rec10/branches/0.4/src/src/chdb.py
deleted file mode 100644 (file)
index 9b3e06b..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
- # モジュール属性 argv を取得するため
-import os
-import sqlite3
-
-dbpath=str(os.path.dirname(os.path.abspath(__file__)))+"/"+"ch.db"
-#db=sqlite3.connect(dbpath)
-
-def ontvsearch(ontvin):
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata WHERE ontv = \""+ontvin+"\""):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        ret.append(rett)
-    db.close()
-    return ret[0]
-def chtxtsearch(chtxtin):
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    print chtxtin
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata WHERE chtxt = \""+chtxtin+"\""):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        #print rett
-        ret.append(rett)
-    db.close()
-    return ret[0]
-def bctypesearch(bctypein):
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata WHERE bctype = \""+bctypein+"\""):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        #print rett
-        ret.append(rett)
-    db.close()
-    return ret[0]
-def chsearch(chin):
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata WHERE ch = \""+chin+"\""):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        #print rett
-        ret.append(rett)
-    db.close()
-    return ret[0]
-def getall():
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata"):
-        rett={'bctype':bctype,'ontv':ontv,'chtxt':chtxt,'ch':ch,'csch':csch,'update':updatetime}
-        #print rett
-        ret.append(rett)
-    db.close()
-    print ret
-    return ret[0]
-
-def update():
-    db=sqlite3.connect(dbpath)
-    ret=[]
-    CSupdate=0
-    CS2update=0
-    BSupdate=0
-    for bctype , chtxt in db.execute("SELECT bctype,chtxt FROM chdata WHERE updatetime < datetime(\'now\',\'localtime\',\'-6 hours\')"):
-        #print bctype
-        if bctype=="cs":
-            if CSupdate==0:
-                ret.append("cs")
-                CSupdate=1
-                print "csの番組表取得開始"
-                db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE bctype = \""+bctype+"\"")
-        if bctype=="cs2":
-            if CS2update==0:
-                ret.append("cs2")
-                CSupdate=1
-                print "csの番組表取得開始"
-                db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE bctype = \""+bctype+"\"")
-        elif bctype=="bs":
-            if BSupdate==0:
-                ret.append("bs")
-                BSupdate=1
-                print "bsの番組表取得開始"
-                db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE bctype = \""+bctype+"\"")
-        else:
-            ret.append(bctype)
-            print bctype
-            print "取得開始"
-            db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE bctype = \""+bctype+"\" AND chtxt = \""+chtxt+"\"")
-    #db.execute("UPDATE chdata SET updatetime=datetime(\'now\',\'localtime\') WHERE updatetime < datetime(\'now\',\'localtime\',\'-2 hours\')")
-    db.commit()
-    db.close()
-    print ret
-    return ret
-def viewall():
-    db=sqlite3.connect(dbpath)
-    for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata"):
-        print (bctype+","+ontv+","+chtxt+","+ch+","+csch+","+updatetime)
-    db.close()
-#def updateall():
-
-       
diff --git a/rec10/branches/0.4/src/src/config.ini b/rec10/branches/0.4/src/src/config.ini
deleted file mode 100644 (file)
index f1269a8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[path]
-recpt1=/usr/local/bin/recpt1
-recpt1-bak=/pt1-tools/recpt1/recpt1
-b25-BAK=/pt1-tools/b25/b25
-b25=/usr/local/bin/b25
-splitt=/pt1-tools/tstools/TsSplitter.exe
-tsrename=/pt1-tools/tstools/TsRename.exe
-bontsdemux=/pt1-tools/tstools/BonTsDemux.exe
-tsepg2xml=/pt1-tools/tstools/tsEpg2xml/tsEpg2xml.exe
-temppath=/pt1-tools/temp
-recpath=/home/ftpusr/ftp3/Recording
-cmdow=/pt1-tools/tstools/cmdow.exe
-cmdwine=wine /pt1-tools/tstools/cmdow.exe /run /hid
-gridserver_port=10910
-wine=wine 
-epg2xmlpath=/media/ramdisk
-
diff --git a/rec10/branches/0.4/src/src/configreader.py b/rec10/branches/0.4/src/src/configreader.py
deleted file mode 100644 (file)
index 3f7d663..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import ConfigParser
-
-mypath=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-
-confp=ConfigParser.SafeConfigParser()
-Conf='config.ini'
-confp.read(mypath+Conf)
-
-def getpath(string):
-    global confp
-    return confp.get('path',string)
diff --git a/rec10/branches/0.4/src/src/dbviewer.py b/rec10/branches/0.4/src/src/dbviewer.py
deleted file mode 100644 (file)
index eade363..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import recdb
-import sqlite3
-import os
-dbpath=str(os.path.dirname(os.path.abspath(__file__)))+"/"+"ch.db"
-tasks=recdb.getall()
-db=sqlite3.connect(dbpath)
-
-
-print "チャンネルデータ"
-for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata"):
-    print (bctype+","+ontv+","+chtxt+","+ch+","+csch+","+updatetime)
-db.close()
-print "録画予約"
-for task in tasks:
-        #value=line.split(",")
-        if task["type"]=="res":#"res,"+chtxt+","+title+","+btime+","+etime+","+opt
-            chtxt=task['chtxt']
-            title=task['title']
-            btime=task['btime']
-            etime=task['etime']
-            opt=task['opt']
-            print "録画予約"+","+chtxt+","+title+","+btime+","+etime+","+opt
-        elif task["type"]=="key":#"key,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-            chtxt=task['chtxt']
-            #title=task['title']
-            btime=task['btime']
-            #etime=task['etime']
-            keyword=task['title']
-            deltatime=task['deltatime']
-            opt=task['opt']
-            print "検索予約"+","+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-        elif task["type"]=="keyevery":#"keyevery,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-            chtxt=task['chtxt']
-            #title=task['title']
-            btime=task['btime']
-            #etime=task['etime']
-            keyword=task['title']
-            deltatime=task['deltatime']
-            opt=task['opt']                    
-            deltaday=task['deltaday']
-            print "隔日予約"+","+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-        elif task["type"]=="rec":#"rec,"+chtxt+","+title+","+btime+","+etime+","+opt
-            chtxt=task['chtxt']
-            title=task['title']
-            print title
-            btime=task['btime']
-            etime=task['etime']
-            #keyword=task['keyword']
-            #deltatime==task['deltatime']
-            opt=task['opt']
-            print "予約最終"+","+chtxt+","+title+","+btime+","+etime+","+opt
-
diff --git a/rec10/branches/0.4/src/src/epgdb.py b/rec10/branches/0.4/src/src/epgdb.py
deleted file mode 100644 (file)
index 40850ef..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import sqlite3
-import chdb
-import datetime
-import ts2epg
-import xml2db
-path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-tmppath=path
-def update(chtxt):
-    print chtxt
-    tnow=datetime.datetime.now()
-    try:
-        lastup=datetime.datetime.strptime(chdb.chtxtsearch(chtxt)[0]['update'],"%Y-%m-%d %H:%M:%S")
-    except:
-        lastup=datetime.datetime.strptime("2009-04-01 00:00:00","%Y-%m-%d %H:%M:%S")
-    dt=tnow-lastup
-    dt=dt.days*24*60+dt.seconds
-    if dt>2*60*60:
-        ts2epg.write(tmppath+"epgdate.xml",chdb.chtxtsearch(chtxt)['ch'])
-        xml2db.xml2db(tmppath+"epgdate.xml",path+"ch.db",chdb.chtxtsearch(chtxt)['bctype'])
-def updatebc(bctype):
-    bctypel=chdb.bctypesearch(bctype)
-    print bctypel
-    ts2epg.write(tmppath+"epgdate.xml",chdb.bctypesearch(bctype)['ch'])
-    xml2db.xml2db(tmppath+"epgdate.xml",path+"ch.db",bctype)
-def updateall():
-    update("hisch")
-    update("nhk-k")
-    update("nhk-s")
-    update("me-tere")
-    update("cbc")
-    update("aichi")
-    update("toukai")
-    update("chukyo")
-    update("bs-nhk-1")
-    
-def search(titletxt):
-    dbpath=path+"ch.db"
-    db=sqlite3.connect(dbpath)
-    #print dbpath
-    ret=[]
-    for ch, title, start, stop in db.execute("SELECT channel,title,start,stop FROM tv WHERE title LIKE \"%"+titletxt+"%\""):
-        btime=start.replace(" +0900","")
-        btime=btime[0:4]+"-"+btime[4:6]+"-"+btime[6:8]+" "+btime[8:10]+":"+btime[10:12]+":00"
-        etime=stop.replace(" +0900","")
-        etime=etime[0:4]+"-"+etime[4:6]+"-"+etime[6:8]+" "+etime[8:10]+":"+etime[10:12]+":00"
-        try:
-            chtxt=chdb.ontvsearch(ch)['chtxt']
-        except:
-            chtxt="Unknown"
-            #print ch
-        ret.append(chtxt+","+title.encode('utf-8')+","+btime+","+etime)
-    db.close()
-    return ret
-def searchtime(titletxt,time,deltatime):#時間以内のものだけを表示 deltatimeはhours
-    dbpath=path+"ch.db"
-    db=sqlite3.connect(dbpath)
-    #print dbpath
-    ret=[]
-    deltatime=int(deltatime)
-    for ch, title, start, stop in db.execute("SELECT channel,title,start,stop FROM tv WHERE title LIKE \"%"+titletxt+"%\""):
-        btime=start.replace(" +0900","")
-        btime=btime[0:4]+"-"+btime[4:6]+"-"+btime[6:8]+" "+btime[8:10]+":"+btime[10:12]+":00"
-        etime=stop.replace(" +0900","")
-        etime=etime[0:4]+"-"+etime[4:6]+"-"+etime[6:8]+" "+etime[8:10]+":"+etime[10:12]+":00"
-        bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
-        t=datetime.datetime.strptime(time,"%Y-%m-%d %H:%M:%S")
-        try:
-            chtxt=chdb.ontvsearch(ch)['chtxt']
-        except:
-            chtxt="Unknown"
-            #print ch
-        dt=bt-t
-        dt=dt.days*24*60*60+dt.seconds
-        dt=abs(dt)
-        if dt<deltatime*60*60:
-            ret.append(chtxt+","+title.encode('utf-8')+","+btime+","+etime)
-    db.close()
-    return ret
-
diff --git a/rec10/branches/0.4/src/src/install.py b/rec10/branches/0.4/src/src/install.py
deleted file mode 100644 (file)
index 48956c4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import epgdb
-import chdate
-
-epgdb.updateall()
-chdate
diff --git a/rec10/branches/0.4/src/src/license-ja.txt b/rec10/branches/0.4/src/src/license-ja.txt
deleted file mode 100644 (file)
index b489776..0000000
+++ /dev/null
@@ -1,462 +0,0 @@
-GNU 劣等一般公衆利用許諾書 (GNU Lesser General Public License)¶
-
-バージョン3、2007年6月29日
-日本語訳、2007年9月5日
-
-Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
-
-Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-
-(訳: 本ライセンス文書を、一字一句忠実に複製、頒布することは許可する。しかし変更は認めない。)
-
-This is an unofficial translation of the GNU Lesser General Public License into Japanese. It was not published by the Free Software Foundation, and does not legally state the distribution terms for software that uses the GNU LGPL--only the original English text of the GNU LGPL does that. However, we hope that this translation will help Japanese speakers understand the GNU LGPL better.
-
-(訳: 以下はGNU Lesser General Public Licenseの非公式な日本語訳です。これはフリーソフトウェア財団 (Free Software Foundation)によって正式に発表されたものではなく、GNU LGPLが適用されたソフトウェアの頒布条件を法的に有効な形で述べたものではありません。頒布条件としては、GNU LGPLの英語版テキストで指定されているもののみが有効です。しかしながら、私たちはこの翻訳が、日本語を使用する人々にとってGNU LGPLをより良く理解する助けとなることを望んでいます。)
-
-翻訳は八田真行 <mhatta@gnu.org>が行った。原文はhttp://www.gnu.org/licenses/lgpl-3.0.html である。誤訳の指摘や訳の改善案を歓迎する。なお、日本語訳の利用条件は原文に準ずる。
-
-このバージョンのGNU 劣等一般利用許諾書では、GNU 一般公衆利用許諾書(GNU General Public License)バージョン3が規定する利用条件を取り込んだ上で、以下に列挙する追加的許可で補足するものとする。
-0. 追加された定義¶
-
-本文中で使われている通り、「本許諾書」はGNU 劣等一般公衆利用許諾書バージョン3を指す。「GNU GPL」は、GNU 一般公衆利用許諾書バージョン3を指す。
-
-『ライブラリ』(The Library)とは、本許諾書の下で管理された『保護された作品』のうち、以下で定義する『アプリケーション』や『結合された作品』以外のものを指す。
-
-『アプリケーション』(Application)とは、『ライブラリ』が提供するインターフェースを利用するが、『ライブラリ』を基にはしていない作品すべてのことである。『ライブラリ』によって定義されたクラスの下位クラスを定義するのは、『ライブラリ』が提供するインターフェースの利用の一形態と見なされる。
-
-『結合された作品』(Combined Work)とは、『アプリケーション』と『ライブラリ』を結合ないしリンクすることによって作成された作品のことである。また、それによって『結合された作品』が作られた特定のバージョンの『ライブラリ』は、『リンクされたバージョン』(Linked Version)と呼ばれる。
-
-『結合された作品』に対する『最小限の対応するソース』 (Minimal Corresponding Source)とは、『結合された作品』に対する(訳注: GPLv3における)『対応するソース』のことを意味する。ただし、『結合された作品』に含まれる部分のうち、それのみを分離して考えた場合、『アプリケーション』を基にしているが、『リンクされたバージョン』は基にしていない部分のソースコードのすべては除外される。
-
-『結合された作品』に『対応するアプリケーションコード』 (Corresponding Application Code)とは、『アプリケーション』のオブジェクトコードかソースコードを意味する。『対応するアプリケーションコード』には、『アプリケーション』から『結合された作品』を再生成するために必要なデータやユーティリティ・プログラムすべてが含まれるが、『結合された作品』の『システムライブラリ』は除く。
-1. GNU GPL第3項への例外¶
-
-あなたは本許諾書の第3項および第4項に従い、『保護された作品』を伝達することができる。その際、GNU GPL第3項の第2段落に束縛される必要はない。
-2. 改変されたバージョンの伝達¶
-
-『ライブラリ』のコピーを改変し、かつあなたの改変点において、ある機能が (その機能が呼び出される際に引数として渡されるものを除いて)その機能を利用する『アプリケーション』から提供される関数やデータを参照する場合、以下のどちらかに従えば、あなたは改変されたバージョンのコピーを伝達することができる:
-
-    * a) 本許諾書に従って伝達する。ただし、『アプリケーション』が関数やデータを提供しない場合でも、その機能が依然として動作し、機能の目的のうち意味あるものとして残った部分はすべて実行するよう誠実な配慮を尽くさなければならない。あるいは、
-    * b) GNU GPLに従って伝達する。この場合、本ライセンス文書によってそのコピーに適用可能な追加的許可は一切認められない。 
-
-3. ライブラリのヘッダファイルに由来するコードや各種データを取り込んだオブジェクトコード¶
-
-オブジェクトコード形式の『アプリケーション』は、『ライブラリ』の一部であるヘッダファイルに含まれるコードや各種データを取り込むことができる。あなたは、そのようなオブジェクトコードを、あなたが選択したいかなる条項の下でも複製、伝達して構わない。ただし、取り込まれたコード等が数値的パラメータや、データ構造のレイアウトやアクセサー、小さなマクロ、インライン関数やテンプレート(長さにして10行以下)ではない場合、あなたは以下の両方を行わなければならない。
-
-    * a) オブジェクトコードのコピーそれぞれにおいて、『ライブラリ』がその中で利用されており、『ライブラリ』とその利用は本許諾書によって保護されている旨を目立つように告知する。
-    * b) オブジェクトコードに、GNU GPLと本許諾書のコピーを添付する。 
-
-4. 結合された作品¶
-
-あなたは、『結合された作品』に含まれる『ライブラリ』部分の改変を事実上禁止したり、そのような改変をデバッグするためのリバースエンジニアリングを禁止したりしない限り、『結合された作品』をあなたが選択したいかなる条件の下でも複製、伝達して構わない。ただしその場合、以下をすべて行う必要がある:
-
-    * a) 『ライブラリ』が『結合された作品』中で利用されており、また『ライブラリ』とその利用は本許諾書によって保護されるということを、『結合された作品』のコピーそれぞれにおいて目立つように告知する。
-    * b) 『結合された作品』に、GNU GPLと本ライセンス文書のコピーを添付する。
-    * c) 実行中に『コピーライト』告知を表示する『結合された作品』の場合、そういった告知文中に 『ライブラリ』の著作権告知と、ユーザに対してGNU GPLと本ライセンス文書のコピーがどこにあるかを示す参照先情報を含める。
-    * d) 以下のどれか一つを行う:
-          o 0) 本許諾書の条項に従い、『最小限の対応するソース』を伝達する。また、『対応するアプリケーションコード』を、『対応するソース』の伝達に関して GNU GPL第6項が指定しているのと同様のやり方で、ユーザが『アプリケーション』を『ライブラリ』の改変されたバージョンと再結合または再リンクして改変された『結合された作品』を作成するのに適した形式、かつそういった再結合や再リンクを許可する条項の下で伝達する。
-          o 1) 『ライブラリ』をリンクするのに適した共有ライブラリメカニズムを利用する。適したメカニズムとは、(a)実行時すでにユーザのコンピュータシステムに存在する『ライブラリ』のコピーを利用し、(b) 『リンクされたバージョン』とインターフェースに互換性がある『ライブラリ』の改変されたバージョンと共に適切に機能するものである。 
-    * e) 『インストール用情報』を提供する。ただしこれはGNU GPL第6項に従いそのような情報を提供することが義務付けられている場合に限られ、またそのような情報が、『リンクされたバージョン』の改変されたバージョンと『アプリケーション』を再結合ないし再リンクすることによって作成された『結合された作品』の改変されたバージョンをインストール、実行するのに必要とされる限りにおいてのみである(あなたが小項4dの0を選択する場合、『インストール用情報』は『最小限の対応するソース』と『対応するアプリケーションコード』と共に供しなければならない。あなたが小項4dの1を選択する場合、あなたは『インストール用情報』をGNU GPL第6項が『対応するソース』の伝達に関して指定するのと同様のやり方で提供しなければならない)。 
-
-5. 結合されたライブラリ¶
-
-あなたは、『ライブラリ』を基にした作品であるライブラリ機能を、『アプリケーション』ではなく、かつ本許諾書で保護されていない他のライブラリ機能と一緒に、単一のライブラリ内で並置し、そのような結合されたライブラリをあなたが選んだ条項に従って伝達することができる。ただしその場合、以下の両方を行わなければならない。
-
-    * a) 結合されたライブラリに、他のいかなるライブラリ機能とも結合されておらず、本許諾書の条項に従って伝達される、元のままの『ライブラリ』を基にした作品のコピーを添付する。
-    * b) その一部が『ライブラリ』を元にした作品である結合されたライブラリに、対応する結合されていない形式の同じ作品がどこで見つかるかを説明した目立つ告知を載せる。 
-
-6. GNU 劣等一般公衆利用許諾書の改訂されたバージョン¶
-
-フリーソフトウェア財団は、改訂された、あるいは新しいバージョンのGNU 劣等一般公衆利用許諾書を折りに触れて発行することができる。そのような新バージョンは、その精神においては現在のバージョンと似たものになるだろうが、細部については新たに生じた問題や懸念を解決すべく異なるものになるだろう。
-
-それぞれのバージョンには、見分けがつくようなバージョン番号が振られている。あなたが受領した『ライブラリ』において、ある特定のバージョン番号が振られたGNU 劣等一般公衆利用許諾書「かそれ以降のバージョンのいずれか (or any later version)」が適用されると指定されていた場合、あなたは指定された番号のバージョンか、それ以降にフリーソフトウェア財団によって発行されたバージョンのいずれかのバージョンのどちらの利用条件に従うかを選ぶことができる。あなたが受領した『ライブラリ』が特定のバージョン番号の GNU 劣等一般公衆利用許諾書を指定していなかった場合には、あなたはフリーソフトウェア財団がそれまでに発行したGNU 劣等一般公衆利用許諾書のバージョンの中からどれを選択しても構わない。
-
-(訳注: 日本語訳のバージョンは日付で管理している。冒頭を見よ。)
-
-あなたが受領した『ライブラリ』において、GNU 劣等一般公衆利用許諾書の将来のバージョンのうちどれが適用されうるかは代理人が決定できる、と指定されていた場合、その代理人が、あるバージョンを受諾すると述べた公的な声明は、あなたに対し、その『ライブラリ』に関してそのバージョンのGNU LGPLを選ぶことを永続的かつ正式に許可するのと等しい。
-
-
-
-
-
-
-利用条件 (TERMS AND CONDITIONS)¶
-0. 定義¶
-
-「本許諾書」(The License)とは、GNU 一般公衆利用許諾書のバージョン3を指す。
-
-「『コピーライト』」(Copyright)とは、いわゆる著作権のみならず、半導体マスクのようなその他の作品に適用される、著作権に類似した法的権利をも意味する。
-
-(訳注: この規定により、本許諾書は著作権法で保護されたいわゆる「著作物」よりも広い範囲をカバーすることになる。よってこの訳のライセンス本文中においては、work(s)に「著作物」ではなく「作品」という訳語を宛てることにした。)
-
-「『プログラム』」(The Program)とは、本許諾書の下でライセンスされた、『コピーライト』が主張可能な作品すべてを意味する。個々のライセンシーは「あなた」として表現される。ライセンシーは個人でも組織でも構わない。
-
-ある作品の「改変」(modify)とは、その作品の全体ないし一部を、『コピーライト』の許可を必要とするようなやり方で複製ないし翻案することを意味する。ただし、完全に同一なコピーを作成する場合は除く。改変の結果出来た作品は、以前の作品の「改変されたバージョン」(modified version)、または、以前の作品を「基にした」(based on)作品と呼ばれる。
-
-「『保護された作品』」(covered work)とは、改変されていない『プログラム』か、『プログラム』を基にした作品のいずれかを指す。
-
-ある作品の「普及」(propagate)とは、コンピュータ上で実行すること、または私的なコピーを改変することを除き、適用可能な『コピーライト』法規の下で許可無く行うと、権利侵害として、直接的、あるいは間接的にあなたが責任を問われる何らかの行為を意味する。普及には、複製、頒布 (改変の有無を問わない)、公衆への利用可能化が含まれ、またいくつかの国々では他の活動も含まれる可能性がある。
-
-ある作品の「伝達」(convey)とは、第三者がコピーを作成ないし受領するのを可能とする普及行為すべてを意味する。ただし、コンピュータネットワーク越しにユーザとやりとりするだけで、コピーの転送は伴わない場合は、伝達ではない。
-
-対話的なユーザインターフェースが「『適切な法的告知』」(Appropriate Legal Notices)を表示するという場合、そのインターフェースは (1)適切な『コピーライト』告知を表示し、(2)ユーザに対して、その作品には何の保証もない(別途保証が提供されている場合は除く)ということ、ライセンシーはその作品を本許諾書の下で伝達できるということ、そして本許諾書のコピーを見るにはどうしたらよいかということを便利かつ顕著に視認できるような機能を含むものとする。もしインターフェースが、メニューのようなユーザコマンドやオプションの一覧を表示するならば、その一覧中には上記の基準を満たすようなアイテムが目立つように含まれていなければならない。
-1. ソースコード¶
-
-ある作品の「ソースコード」(source code)とは、その作品に改変を加えるに当たって好ましいと考えられる形式のことである。「オブジェクトコード」 (object code)とは、作品がとりうるソースコード以外の形式すべてを意味する。
-
-「標準インターフェース」(Standard Interface)とは、標準化団体として認知された組織によって定義された公式な標準か、ある特定のプログラミング言語向けに指定されたインターフェースの場合には、その言語を利用する開発者の間で広く使われているインターフェースのことを指す。
-
-実行可能な作品の「『システムライブラリ』」(System Libraries)とは、 (a)「主要コンポーネント」(Major Component) の頒布物に通常含まれるが、その主要コンポーネントの一部ではなく、かつ(b)作品をその「主要コンポーネント」といっしょに利用することを可能にする、あるいは公衆にとってソースコード形式で利用可能な実装がひとつは存在する標準インターフェースを提供するためにのみ機能するものすべてを意味する。ただし、全体としての作品そのものは除く。ここでいう「主要コンポーネント」とは、実行可能な作品がその上で実行されるある特定のオペレーティングシステム (そういったものが必要ならば)の主要で不可欠な一部分(カーネルやウィンドウシステムなど)、あるいはその作品を作成するのに使われるコンパイラ、実行するのに使われるオブジェクトコードインタプリタなどを意味する。
-
-オブジェクトコード形式の作品に「『対応するソース』」(Corresponding Source)とは、その作品を生成、インストール、(実行可能な作品に関しては)オブジェクトコードを実行、または作品を改変する上で必要とされるソースコードのすべてを意味する。この場合、そうした活動をコントロールするためのスクリプトは『対応するソース』に含まれるが、その作品にとっての『システムライブラリ』や、先ほど列挙した活動を行う上で改変されることなく利用されるものの作品の一部ではない、汎用のツールや一般的に利用可能なフリープログラムは除外される。例えば『対応するソース』には、その作品のソースファイルと連携するインターフェース定義ファイルに加え、共有ライブラリや動的にリンクされた下位プログラムと作品のその他の部分との間での親密なデータのやりとりやコントロールフローなどのために、その作品が設計上明確に必要とする、そうした共有ライブラリや下位プログラムのソースコードなどが含まれる。
-
-『対応するソース』には、ユーザが『対応するソース』の他の部分から自動的に再生成できるものを含む必要はない。
-
-ソースコード形式の作品にとっての『対応するソース』とは、その作品そのものである。
-2. 基本的な許可¶
-
-本許諾書の下で認められるすべての権利は、『プログラム』に主張される『コピーライト』の条項に基づき授与されるものであり、ここで述べられた条件が満たされている限り覆すことはできない。本許諾書は、改変されていない『プログラム』をあなたが無制限に実行することを許可し、明示的に確約する。『保護された作品』を実行することから得られた出力結果は、その出力内容が『保護された作品』を構成する場合のみ本許諾書で保護される。本許諾書は、あなたが有するフェアユースまたはその同等物の権利を、『コピーライト』法規によって提供される通りに承認する。
-
-その他の状況においてあなたのライセンスが有効である限り、『保護された作品』の、伝達を伴わない作成、実行、および普及は無条件に行うことができる。他者にあなた専用の改変を行わせる、あるいは他者にあなたがそういった作品を実行するための機能を提供させるということが唯一の目的であれば、『保護された作品』を他者に伝達することができる。ただしその場合、あなたが『コピーライト』を支配していない部分すべての伝達に関しては、本許諾書の条項に従わなければならない。従って、あなたのために『保護された作品』を作成または実行する者は、専らあなたのためだけに、あなたの監督と支配の下で、あなたとの関係の範囲外ではあなたが『コピーライト』を有する一部分のいかなるコピーをも作成することを禁止するという条件の下で行わなければならないということになる。
-
-上記以外のあらゆる状況下においては、伝達は以下で述べる条件の下でのみ許可される。再許諾は認められない。下記第10項により、再許諾は必要ないからである。
-3. ユーザの法的権利を、技術的保護手段の回避を禁ずる法律から守る¶
-
-『保護された作品』は、 1996年12月20日に採択されたWIPO著作権条約第11項の下での義務を満たす適用可能な法のいずれか、あるいはそれに類似の法が、回避の禁止または制限の対象として規定する、「効果的な技術的手段」 (effective technological measure)の一部として見なされてはならない。
-
-(訳注: WIPO著作権条約については、http://www.cric.or.jp/db/article/wch.html 等を参照せよ。)
-
-あなたが『保護された作品』を伝達する場合、『保護された作品』に関して本許諾書の下で権利を行使することにより、技術的手段の回避に影響が出る範囲において、そのような手段の回避を禁じるいかなる法的権力をも放棄することになる。また、あなたはその作品のユーザに対して、技術的手段の回避を禁じるためにあなたや第三者の法的権利を強制するための手段として、その作品の動作や改変を制限するいかなる意図も否認することになる。
-4. 一字一句忠実なコピーの伝達¶
-
-あなたは、自分が受領した『プログラム』のソースコードと一字一句同じコピーであれば、いかなる媒体でも伝達することができる。ただしその場合、あなたはそれぞれのコピーにおいて、目立つように、かつ適切な形で、ふさわしい『コピーライト』告知を掲載しなければならない。すなわち、本許諾書と、下記第7項に従い追加された非許可的条項のすべてがそのコードに適用される旨の告知を掲載し、あらゆる保証が存在しない旨の告知をすべてそのまま保全し、かつ『プログラム』の受領者すべてに、『プログラム』といっしょにこの許諾書のコピーを与えなければならない。
-
-あなたは、自分が伝達するコピーのそれぞれに関していかなる価格を付けても良いし、無料で伝達しても構わない。また、報酬を取ってサポートや保証保護 (warranty protection)を提供しても良い。
-5. 改変されたバージョンのソースの伝達¶
-
-あなたは、『プログラム』を基にした作品、あるいはそうした作品を『プログラム』から作成するための改変点を、上記第4項の規定に従ってソースコード形式で伝達することができる。ただしその場合、あなたは以下に示す条件のすべてを満たさなければならない:
-
-    * a) 作品には、あなたが作品を改変したということと、改変に関連した日時を記述した告知を目立つように載せなければならない。
-    * b) 作品には、それが本許諾書と、下記第7項に従って追加された条件すべての下で公開されていることを記述した告知を目立つように載せなければな らない。この条件は、上記第4項における「告知をすべてそのまま保全」するための条項を改変する。
-    * c) 作品の全部分を、総体として、コピーを所有するに至った人全員に、本許諾書の下でライセンスしなければならない。そこで、本許諾書は、本許諾書第7項に基づく適用可能な追加的条項のすべてとともに、作品全体に、すなわちその全部分に、それらがどのようにパッケージされているかに関わらず適用されることになる。本許諾書は、これ以外のやり方には作品をライセンスする許可を与えないが、あなたが本許諾書以外で別途許可を得ていた場合には、それによって得られた許可まで無効とするものではない。
-    * d) 改変された作品が対話的なユーザインターフェースを有する場合、それらのインターフェースは『適切な法的告知』を表示しなければならない。ただし、『プログラム』に元々『適切な法的告知』を表示しない対話的なインターフェースがある場合、あなたの作品で表示するようにする必要はない。 
-
-一巻の記憶装置の中か頒布媒体上で、『保護された作品』と、本来『保護された作品』の拡張ではなく、『保護された作品』とより大規模なプログラムを形成するような形で結合されているわけでもないその他の分離かつ独立した作品とをまとめた編集物は、編集作業とそれに由来する『コピーライト』が、個々の作品が許可する範囲を越えて編集物のユーザの作品へのアクセスや法的権利を制限するのに使われない限り、「集積物」(aggregate)と呼ばれる。単に『保護された作品』を集積物に含めるだけでは、その集積物の他の部分にまで本許諾書が適用されるということにはならない。
-6. ソース以外の形式における伝達¶
-
-あなたは、オブジェクトコード形式の『保護された著作物』を、上記第4項および第5項の規定に従って伝達することができる。ただしその場合、あなたは機械読み取り可能な『対応するソース』も本許諾書の条件に従って、以下のいずれかの方法で伝達しなければならない。
-
-    * a) オブジェクトコードを物理的製品(物理的頒布媒体を含む)で、あるいはそれに組み込んで伝達する。その際、『対応するソース』を、ソフトウェア のやりとりで一般的に使われる耐久性のある物理的媒体に固定していっしょに頒布する。
-    * b) オブジェクトコードを物理的製品(物理的頒布媒体を含む)で、あるいはそれに組み込んで伝達する。その際、最低でも3年間、あるいはあなたがその製品モデルに補修用部品やカスタマーサポートを提供する限り有効な、書面 による申し出を添付する。その申し出には、(1) オブジェクトコードを所有する者すべてに対して、その製品に含まれるソフトウェアのうち本許諾書で保護されるものすべてに『対応するソース』のコピーを、ソフトウェアのやりとりで一般的に使われる耐久性のある物理的媒体で頒布する旨を記載する。その際、物理的にこのソースの伝達を行うのにかかる正当なコスト以上の価格を要求してはならない。あるいは、(2) 『対応するソース』を無料でネットワークサーバから複製するためのアクセスを提供する旨を記載する。
-    * c) オブジェクトコードの個々のコピーを、対応するソースを提供するという書面による申し出のコピーといっしょに伝達する。この選択肢は特別な場合、かつ非商業的な場合のみに、そしてあなたがオブジェクトコードを上記小項 6bに合致した申し出といっしょに受領した場合にのみに認められる。
-    * d) オブジェクトコードを、指定の場所から複製するためのアクセスを提供することによって伝達し、『対応するソース』に対しても同じ場所を通じて同じ方法で複製するための同等のアクセスを提供する。伝達は無料でも手数料を課しても構わないが、『対応するソース』に対して追加的な課金を行ってはならない。受領者に対して、『対応するソース』をオブジェクトコードといっしょに複製することを義務づける必要はない。オブジェクトコードの複製元がネットワークサーバの場合、対応するソースは同等の複製機能をサポートする異なったサーバ(あなたか第三者が運営)上にあっても良い。その場合、オブジェクトコードの傍らに、『対応するソース』はどこで見つけられるかを明確に指示しておかなければならない。どのサーバが『対応するソース』をホストするかに関わらず、あなたは『対応するソース』がこれらの条 項を満たすために必要なかぎり利用可能であることを保証する責任がある。
-    * e) オブジェクトコードをピア・ツー・ピア伝送を使って伝達する。ただしこの場合、あなたは上記小項6dに従い、その作品のオブジェクトコードと 『対応するソース』がどこで一般公衆に無料で提供されるのかということを他のピアに知らせておかなければならない。 
-
-オブジェクトコードの分離した一部であり、そのソースコードが『対応するソース』から『システムライブラリ』として除外されているものは、オブジェクトコード作品を伝達する場合に含める必要はない。
-
-「ユーザ製品」(User Product)とは、(1)「コンシューマ製品」(consumer product)、すなわち、個人、子供、あるいは家庭用に通常使用される有形個人資産すべてか、あるいは(2)居住所における導入を目的に設計ないし販売されるものすべてを指す。ある物品がコンシューマ製品であるかを決定する際疑義がある場合には、極力範囲を広げる方向で決定されるべきである。ここで、ある特定のユーザによって受領されたある特定の製品にとっての「通常使用」 (nomally used)とは、その種の製品において典型的な、あるいは一般的な利用のことであり、その特定のユーザが置かれた状況や、その特定のユーザがその製品を実際にどう使っているか、どう使うことを予期しているか、あるいは予期されているかとは関係ない。その製品に相当な商業的、産業的または非コンシューマ的な利用法があったとしても、そうした利用がその製品の唯一重要な利用形態を代表するものでない限り、その製品はコンシューマ製品である。
-
-ユーザ製品の「『インストール用情報』」(Installation Information)とは、ユーザ製品内の『保護された作品』に関して、『対応するソース』の改変されたバージョンから得られる『保護された作品』の改変されたバージョンを、インストール、実行するために必要な手法、手順、認証キーやその他の情報すべてを意味する。この情報は、改変されたオブジェクトコードの継続的な動作が、改変が為されたということによってのみ拒否されたり妨害されることが決してないことを保証するのに十分なものでなければならない。
-
-本節の下において、作品をユーザ製品の内で、またはユーザ製品と共に、あるいは特にユーザ製品での利用を念頭においてオブジェクトコードで伝達し、またその伝達がユーザ製品の受領者への所有と利用の権利の永遠ないし有期の移転の一部として起こる場合(移転がどのように行われるかは問わない)、この条項の下で『対応するソース』は『インストール用情報』と共に提供されなければならない。しかしこの条件は、あなたと第三者のいずれもが改変されたオブジェクトコードをユーザ製品にインストールする能力を有していない際には適用されない(例えば、作品がROMにインストールされている場合)。
-
-『インストール用情報』を提供する条件には、受領者によって改変ないしインストールされた作品、あるいはそうした作品が改変ないしインストールされたユーザ製品に対し、サービスや保証、アップデートを提供しつづけるという条件は含まれない。改変自体がネットワークの運用に実質的かつ有害な影響をもたらし、ネットワークを介したコミュニケーションのプロトコルや規則に違反する場合には、ネットワークアクセスを拒否しても構わない。
-
-伝達される『対応するソース』や提供される『インストール用情報』が本節を満たすためには、それらが公に文書化された形式で(かつ公衆に対してソースコード形式で利用可能な実装とともに)提供されなければならない。この場合、これらの圧縮展開や読み込み、複製に特別なパスワードやキーを必要としてならない。
-7. 追加的条項¶
-
-「追加的許可」(Additional permissions)とは、本許諾書が課す条件に一つかそれ以上の例外を設けることにより、本許諾書の条項を補足する条項のことである。『プログラム』全体に適用可能な追加的許可は、適用可能な法の下でそれらが有効である限り、あたかもそれらが本許諾書に含まれているかのように扱われなければならない。追加的許可が『プログラム』の一部にのみ適用される場合、その部分に関してはそういった追加的許可の下で別途利用可能だが、『プログラム』全体としては追加的許可に関わりなく本許諾書によってのみ管理される。
-
-あなたが『保護された作品』のコピーを伝達する場合、あなたは追加的許可をそのコピー、あるいはその一部から削除することを選択できる (追加的許可は、あなたが作品をある種の形で改変する際には、そうした許可自身の削除を要求するような形で書かれてもよい)。あなたは、あなたによって『保護された作品』に追加され、あなたが適切な『コピーライト』許可を有するか、与えることができる限り、その一部分に追加的許可を設定することができる。
-
-本許諾書の他の条件に関わらず、あなたが『保護された作品』に追加した一部分について(その部分の『コピーライト』保有者らによって正式に許可されていれば)、本許諾書の条項を、以下に示す条項で補足することができる:
-
-    * a) 本許諾書第15項および第16項の条項とは異なった形で保証の否認や責任の限定を主張する。あるいは、
-    * b) 追加した一部分において、明示的で妥当な法的告知や作者特定の保全、またはそれを含む作品において『適切な法的告知』の表示を要求する。あるいは、
-    * c) 追加した一部分の出自を不当に表示することを禁じるか、あるいはそのような一部分の改変されたバージョンはオリジナルのバージョンとは異なっ ているということを適切な方法で印づけることを要求する。あるいは、
-    * d) その一部分のライセンサーや作者の名前を、宣伝目的で利用することを制限する。あるいは、
-    * e) 商品名や商標、サービスマークの利用に関して、商標法に従い権利を授与することを拒否する。あるいは、
-    * f) その一部分(あるいはその改変されたバージョン)を伝達する者に、受領 者への責任に関して契約上の引き受けがあり、そうした責任が直接的にそういったライセンサーや作者にまで課せられる場合、その一部分のライセンサーや作者の免責を要求する。 
-
-他の非許可的な追加的条項は下記第10項が意味するところの「さらなる権利制限」(further restrictions)とみなされる。あなたが受領した『プログラム』、あるいはその一部に、それが本許諾書とともにさらなる権利制限である条項によっても管理されていると述べた告知が含まれている場合には、あなたはそういった条項を削除して構わない。あるライセンス文書にさらなる権利制限がふくまれているが、しかし本許諾書の下での再許諾や伝達を許可しているならば、あなたはそのライセンス文書の条項によって管理されている一部分を『保護された作品』に追加することができる。ただしその場合、さらなる権利制限はそのような再許諾や伝達では無効としなければならない。
-
-あなたが本節に従って『保護された著作物』に条項を追加した場合、あなたは関係するソースファイル中に、それらのファイルに適用される追加的条項に関する声明、あるいは適用可能な条項を見つけることができる場所を示す告知を掲載しなければならない。
-
-追加的条項は、それが許可的であろうと非許可的であろうと、別途書面化されたライセンスという形式で述べられてもよいし、本許諾書への例外として述べられてもよい。上記の要件はどちらの場合でも適用される。
-8. 終了¶
-
-あなたは『保護された作品』を、本許諾書の下で明示的に提供されている場合を除いて、普及、または改変してはならない。それ以外に『保護された作品』を普及、または改変しようとする試みはすべて無効であり、本許諾書の下であなたに認められた権利(下記第11項の第3段落に従い授与されたパテントライセンスすべてを含む)を自動的に終了させることになる。
-
-しかしながら、あなたが本許諾書への違反をすべて中止するならば、あなたがある特定の『コピーライト』保有者から得たライセンスは、(a)その『コピーライト』保有者が明白かつ決定的にあなたへのライセンスを終了させるか、あるいはさせないまでは暫定的に、(b)その『コピーライト』保有者が、あなたに対し違反について、何らかの正当な手段によりライセンス停止後60日以内に通知することができなかった場合には永続的に、回復される。
-
-加えて、あなたがある特定の『コピーライト』保有者から得たライセンスは、その『コピーライト』保有者があなたに対して違反を何らかの正当な手段で通知し、それより前にその『コピーライト』保有者から、(当該作品に限らずその『コピーライト』保有者の作品のいずれかに関して)本許諾書に関する違反の通知を受領したことがなく、さらにあなたがその通知を受領してから30日以内に違反を正した場合、永続的に回復される。
-
-本節に従いあなたの権利が終了した場合でも、本許諾書に従ってあなたからコピーや権利を受領した当事者が得た許諾は終了しない。あなたの権利が終了され、永続的に回復されなかった場合には、あなたは同じライセンス対象に関し下記第10項に従って新たにライセンスを受領する資格を失うものとする。
-9. コピーの所有に必要とされない受諾¶
-
-あなたは、『プログラム』のコピーを受領あるいは実行するために本許諾書を受諾する必要はない。コピーを受領するためにピア・ツー・ピア伝送を使った結果としてのみ発生する『保護された作品』の付随的な普及も、同様に受諾を必要としない。しかしながら、他の場合においては、本許諾書以外にあなたに対して『保護された作品』の普及や改変をする許可を認めるものはない。これらの行為は、本許諾書を受諾しない限り『コピーライト』を侵害することになる。そこで、『保護された作品』を改変あるいは普及することにより、あなたはそうした行為を行うために本許諾書を受諾したということを示したことになる。
-10. 下流の受領者への自動的許諾¶
-
-あなたが『保護された作品』を伝達するたびに、受領者は自動的にオリジナルのライセンサーから、本許諾書に従いその作品を実行、改変、普及するライセンスを得る。なお、あなたには第三者が本許諾書に従うことを強制する責任はない。
-
-「主体取引」(entity transaction)とは、ある組織そのもの、ないしその組織の実質的に全ての資産の支配権が移転するか、あるいは組織の細分化や合併が行われるような取引を指す。もし主体取引の結果として『保護された作品』の普及が起こった場合、作品のコピーを受領したそれぞれの取引当事者は、利害関係のある当事者の先任者から、その先任者が前段落に従って有する、あるいは与えることができる、その作品に関するライセンスもまたすべて受領する。加えて個々の取引当事者は、利害関係のある先任者から、その先任者が有しているか、適正な努力によって得ることが可能な限りにおいて、その作品の『対応するソース』の所有権も得る権利を有する。
-
-あなたは本許諾書の下で授与された、あるいは確約された権利の行使に対して、本許諾書が規定する以上のさらなる権利制限を課してはならない。たとえば、あなたはライセンス料、ロイヤルティや他の料金を、本許諾書の下で認められている権利の行使に関して課してはならない。また、あなたは『プログラム』やその一部の作成、利用、販売、販売の申し出、取り込みによって何らかのパテントクレームが侵害されたとして、訴訟(訴訟における反対請求ないし反訴を含む)を開始してはならない。
-11. 特許¶
-
-「貢献者」(contributor)とは、本許諾書の下で『プログラム』、あるいは『プログラム』が基にした作品を利用することを正式に許可した『コピーライト』保有者のことを指す。従って、そのようにしてライセンスされた作品は、貢献者による「貢献者バージョン」(contributor version)と呼ばれる。
-
-ある貢献者の「必須パテントクレーム」(essential patent claims)とは、すでに取得しているか、あるいは今後取得する見込みがあるため、その貢献者が現在所有ないし支配していると言える特許のうち、貢献者バージョンに対して、本許諾書で許可されているような作成や利用、販売といった何らかの形の行為を行うことによって侵害される可能性があるパテントクレームのすべてを意味する。ただし、貢献者バージョンをさらに改変した結果としてのみ侵害されるようなクレームは含まれない。この定義において、「支配」には本許諾書が課す条件と整合的なやり方で特許の再許諾を認める権利も含まれる。
-
-個々の貢献者はあなたに対して、その貢献者の必須パテントクレームに関し、あなたがその貢献者バージョンの内容を作成、利用、販売、販売の申し出、取り込み、その他実行、改変、普及するために必要な、非排他的で全世界的に有効、かつロイヤルティフリーのパテントライセンスを授与する。
-
-以下の3段落において「『パテントライセンス』」とは、ある特許を実施しないという明示的な協定やコミットメントのすべてを指す(例えば、ある特許の実施に対する明示的な許可や、特許侵害訴訟を提起しないという誓約など)。そのような『パテントライセンス』をある当事者に「授与」するとは、その当事者と特許を実施しないという協定やコミットメントを結ぶことを意味する。
-
-もしあなたが、『保護された作品』の伝達を、それがある『パテントライセンス』に依存しており、よってその作品の『対応するソース』は、すべての人にとって、公衆が利用可能なネットワークサーバや他の容易にアクセス可能な手段を通じ、無料かつ本許諾書に従って複製可能ではないということを知りながら行うならば、あなたは (1)『対応するソース』も同様に利用可能にするか、 (2)この特定の作品に関して『パテントライセンス』から得られる便益を自ら剥奪するか、あるいは(3)下流の受領者に対しても、本許諾書の条項と整合的な形で、『パテントライセンス』が拡大されるように計らうかのいずれかを行わなければならない。ここで「『パテントライセンス』に依存するのを知りながら」というのは、あなたが『保護された作品』をある国で伝達すること、あるいはあなたの受領者が『保護された著作物』をある国で利用することが、『パテントライセンス』を授与されない限り、その国において、あなたにとってそれが有効だと信じるだけの理由がある一つかそれ以上の同定可能な特許を侵害するということを実際に知っているということである。
-
-ある一対一の取引や協定に基づき、あるいは関連して、あなたが『保護された作品』の伝達、または伝達によって引き起こされる普及を行い、その際『保護された作品』を受領した一部の当事者に対して、『保護された作品』の特定のコピーの利用、普及、改変、または伝達を正式に許可するような『パテントライセンス』を授与するならば、あなたが授与した『パテントライセンス』は『保護された作品』やそれを基にした作品のすべての受領者にまで自動的に拡大されることになる。
-
-ある『パテントライセンス』が「差別的」(discriminatory)であるとは、本許諾書の下で明確に認められた一つかそれ以上の権利を、『パテントライセンス』がカバーする範囲内に含まなかったり、そうした権利の行使を禁じたり、あるいは権利を行使しないことを条件として課すようなものである場合を指す。あなたを一方の当事者とし、ソフトウェアの頒布を生業とする第三者との間で、あなたは第三者に対し、作品を伝達する活動の程度に基づいて支払いを行う一方、第三者は、あなたから『保護された作品』を受領したすべての当事者に対して「差別的」な『パテントライセンス』を、(a)あなたが伝達した『保護された作品』のコピー(またはそうしたコピーから作成されたコピー)に対して、または(b)『保護された作品』を含む特定製品や編集物を、主要な、あるいは関連した対象として授与する、というような協定を結んでいる場合、あなたは『保護された作品』を伝達してはならない。ただし、あなたがそのような協定を締結したり、『パテントライセンス』を授与されたのが2007年3月28日より以前である場合は本節の例外とする。
-
-本許諾書に含まれる一切の記述は、適用可能な特許法の下であなたが利用可能な暗黙のライセンス、その他侵害への防御手段を排除したり制限したりするように解釈されてはならない。
-12. 他者の自由を明け渡してはならない¶
-
-何らかの条件(裁判所の指令や協定など)があなたに課せられ、それが本許諾書の条件と矛盾したとしても、あなたが本許諾書の条件を免れることにはならない。あなたが、『保護された作品』を、本許諾書が課す義務と他の関連した義務の両方を同時に満たすような形で伝達できないのであれば、結果としてあなたがそれを伝達することは全く不可能ということになる。例えばあなたが、自分が『プログラム』を伝達した人々がさらに伝達を行う場合には、彼らからロイヤルティを徴収する、というような義務を負う条項に同意していた場合、あなたがそういった条項と本許諾書の両方を満たすには、『プログラム』の伝達を完全に止めてしまうしかないだろう。
-13. GNU Affero 一般公衆利用許諾書との利用¶
-
-本許諾書に含まれる他の条件に関わらず、あなたには、『保護された作品』を GNU Affero 一般公衆利用許諾書バージョン3の下で許諾された作品とリンクまたは結合して単一の結合物とし、その結果物を伝達する許可が与えられる。本許諾書の条項は『保護された作品』である部分に関してはそのまま適用されるが、結合物それ自体としては、GNU Affero 一般公衆利用許諾書の第13項が規定する、ネットワークを介したやりとりに関する特殊な条件も適用されることになる。
-
-(訳注: 訳出時点では、GNU Affero GPLは改定作業が依然続いており、確定バージョンはリリースされていない。 http://gplv3.fsf.org/agplv3-dd2-guide.htmlを参照せよ。)
-14. 本許諾書の改訂されたバージョン¶
-
-フリーソフトウェア財団は、改訂された、あるいは新しいバージョンの GNU 一般公衆利用許諾書を折りに触れて発行することができる。そのような新バージョンは、その精神においては現在のバージョンと似たものになるだろうが、細部については新たな問題や懸念を解決すべく異なるものになるだろう。
-
-それぞれのバージョンには、見分けがつくようなバージョン番号が振られている。『プログラム』に、ある特定のバージョン番号が振られた GNU 一般公衆利用許諾書「かそれ以降のバージョンのいずれか(or any later version)」が適用されると指定されていた場合、あなたは指定された番号のバージョンか、それ以降にフリーソフトウェア財団によって発行されたいずれかのバージョンのどちらの利用条件に従うかを選ぶことができる。『プログラム』が本許諾書のバージョン番号を指定していなかった場合には、あなたはフリーソフトウェア財団がそれまでに発行したバージョンの中からどれを選択しても構わない。
-
-(訳注: 日本語訳のバージョンは日付で管理している。冒頭を見よ。)
-
-『プログラム』において、GNU 一般公衆利用許諾書の将来のバージョンのうちどれが適用されうるかは代理人が決定できる、と指定されていた場合、その代理人が、あるバージョンを受諾すると述べた公的な声明は、あなたに対し、その『プログラム』に関してそのバージョンのGNU GPLを選ぶことを永続的かつ正式に許可するのと等しい。
-
-本許諾書の今後のバージョンでは、あなたに追加的な、または従来とは異なった形での許可を与えるかもしれない。しかしながら、作者や『コピーライト』保有者に対し、あなたが以降のバージョンに従うことを選んだ結果として、追加的な義務が課せられることはない。
-15. 保証の否認¶
-
-『プログラム』には、適用可能な法で許可されている範囲において何の保証もない。書面で述べられていない限り、『コピーライト』保有者やその他の当事者は『プログラム』を「あるがまま(as is)」で、明示的、暗示的を問わず、いかなる種類の保証もなく提供する。この保証には、商用可能性や特定目的への適合性の暗黙的保証が含まれるが、これらに限定されない。『プログラム』の質や性能に関するリスクはすべてあなたに帰属する。『プログラム』に問題があると判明した場合、あなたは必要なすべての対応、補修、修正にかかる費用を負うものとする。
-16. 責任の限定¶
-
-適用可能な法において義務づけられるか、書面による同意がない限り、『コピーライト』保有者あるいはその他『プログラム』を上記で許可された通りに改変あるいは伝達する当事者は、たとえそうした保有者や他の当事者が損害が発生する可能性について事前に通知されていたとしても、あなたに対して損害賠償責任を有することはない。ここでいう損害には、『プログラム』の利用あるいは利用できないことから発生した一般的、特殊的、偶然的、必然的な損害のすべてが含まれる(データの消失やデータの不正確な解釈、あなたや第三者によって被った、あるいは『プログラム』が他のプログラムといっしょにうまく動作しなかったために引き起こされた損害などが含まれるが、これらに限定されない)。
-17. 第15項と第16項の解釈について¶
-
-上記のような保証の否認や責任の限定が、特定国内においてそういった条項が指定する通りの法的効力を持ち得ない場合、再審裁判所は、『プログラム』に関連したすべての民事責任の絶対的棄権に最も近く肉薄する国内法を適用すべきである。ただし、報酬の見返りとして責任の保証や引き受けが『プログラム』のコピーに付随する場合は除く。 
-
-
-
-
-GNU 一般公衆利用許諾書 (GNU General Public License)¶
-
-バージョン3、2007年6月29日
-日本語訳、2007年9月5日
-
-Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
-
-Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-
-(訳: 本ライセンス文書を、一字一句忠実に複製、頒布することは許可する。しかし変更は認めない。)
-
-This is an unofficial translation of the GNU General Public License into Japanese. It was not published by the Free Software Foundation, and does not legally state the distribution terms for software that uses the GNU GPL--only the original English text of the GNU GPL does that. However, we hope that this translation will help Japanese speakers understand the GNU GPL better.
-
-(訳: 以下はGNU General Public Licenseの非公式な日本語訳です。これはフリーソフトウェア財団 (Free Software Foundation)によって正式に発表されたものではなく、GNU GPLが適用されたソフトウェアの頒布条件を法的に有効な形で述べたものではありません。頒布条件としては、GNU GPLの英語版テキストで指定されているもののみが有効です。しかしながら、私たちはこの翻訳が、日本語を使用する人々にとってGNU GPLをより良く理解する助けとなることを望んでいます。)
-
-翻訳は八田真行 <mhatta@gnu.org>が行った。原文はhttp://www.gnu.org/licenses/gpl-3.0.html である。誤訳の指摘や訳の改善案を歓迎する。なお、日本語訳の利用条件は原文に準ずる。
-はじめに¶
-
-GNU 一般公衆利用許諾書は、ソフトウェアやその他の種類の著作物のための、フリーかつコピーレフトを主張するライセンスです。
-
-ソフトウェアやその他の実用的著作物向けのライセンスの大半は、あなたから著作物を共有したり変更したりする自由を奪い去るよう設計されています。それらとは対照的に、GNU 一般公衆利用許諾書は、あなたに対してあるプログラムの全てのバージョンを共有、変更する自由を保証すること、すなわち、そのソフトウェアがそのユーザすべてにとってフリーでありつづけることを保証することを目的としています。私たちフリーソフトウェア財団(Free Software Foundation)は、GNU 一般公衆利用許諾書を私たちのソフトウェアの大半に適用しています。その作者が私たちと同様の方法で公開するならば、他のいかなる著作物にも適用することが可能です。もちろん、あなたのプログラムにも適用することができます。
-
-私たちがフリーソフトウェアについて語るとき、私たちは自由について言及しているのであって、価格は問題にしていません。私たちが用意した一般公衆利用許諾書の数々は、フリーソフトウェアのコピーを頒布する(そして希望によっては頒布に際して手数料を要求する)自由をあなたに保証すべく設計されています。すなわち、ソースコードを受領するか、望めばそれを手に入れられるということ、ソフトウェアを変更し、その一部を新たなフリープログラムで利用することができるということ、そしてこうしたことが可能であることをあなたが知っているということが保証されるのです。
-
-(訳注: GNU GPL以外の一般公衆利用許諾書として、GNU AGPLとGNU LGPLが用意されている。)
-
-あなたの権利を守るため、私たちは誰か他人が上記のようなあなたの権利を否定したり、権利を放棄するように求めることを防ぐ必要があります。そこで、あなたがソフトウェアのコピーを頒布したり改変したりする場合、あなたにはある種の責任が発生します。それは、他人の自由を尊重するという責任です。
-
-たとえば、本許諾書が適用されたプログラムのコピーをあなたが頒布する場合、それが無料であろうと手数料を取る場合であろうと、あなたは受領者たちに、あなた自身が受け取ったのと同じ自由を渡さなければなりません。あなたは、彼らもまた、ソースコードを受領するか後に得られることを保証しなければなりません。そしてあなたは、彼らに本許諾書の条項を示し、彼らの権利について彼らに知らしめなければなりません。
-
-GNU GPLを利用する開発者は、あなたの権利を2段階の手順を踏んで守ります。その手順とは、(1) ソフトウェアに著作権を主張し、(2) あなたに本許諾書を提示して、ソフトウェアを複製、頒布、または改変する法的な許可を与える、というものです。
-
-開発者や作者を守るため、GPLでは、このフリーソフトウェアには何の保証もないということを明確に説明しています。ユーザと開発者両方の便宜のため、 GPLでは改変されたバージョンには変更された旨を印づけるよう要求しており、改変されたバージョンの問題が、誤って以前のバージョンの作者に帰せられることがないようにしています。
-
-一部の機器は、それらに収録されたソフトウェアを改変した上で再びインストールしたり、実行したりするために必要なアクセスを、製造者には拒否しないにもかわらずユーザに対しては拒否するよう設計されています。これは、ユーザが自らの有するソフトウェアを変更する自由を守るというGPLの目的とは、根本的に相容れません。このような技術の濫用は、往々にして個人使用向けの製品の分野で見られるものですが、まさにこのような分野こそ、こうした慣行が最も容認しがたいものとなるのです。そこで私たちは、このバージョンのGPLを、そうした製品においてこの種の慣行を禁止するように設計しました。もし同種の問題が他の領域にまで相当程度広がってきた場合には、私たちはユーザの自由を守るためのに必要とされるだけ、GPLの将来のバージョンにおいてこの規定をそうした領域にも拡大すべく準備を整えています。
-
-最後に、すべてのプログラムはソフトウェア特許によって絶え間なく脅かされています。およそ国家は、特許が汎用コンピュータにおけるソフトウェアの開発と利用を制限することを認めるべきではありません。しかし、そういったことを認めてしまっている地域においては、私たちは、特許がフリーなプログラムに適用され、実質的にプログラムがプロプライエタリにされてしまうという特別な脅威を避けたいと思います。こうした事態を防ぐために、GPLでは、プログラムを非フリーとするために特許を使うことはできないということを保証します。
-
-(訳注: 本許諾書で「プロプライエタリ (proprietary)」とは、ソフトウェアの利用や再頒布、改変が禁止されているか、許可を得ることが必要とされているか、あるいは厳しい制限が課せられていて自由にそうすることが事実上できなくなっている状態のことを指す。詳しくはhttp://www.gnu.org/philosophy/categories.ja.html#ProprietarySoftware をを参照せよ。)
-
-複製、頒布、改変に関する正確な利用条件は以下で述べていきます。
-利用条件 (TERMS AND CONDITIONS)¶
-0. 定義¶
-
-「本許諾書」(The License)とは、GNU 一般公衆利用許諾書のバージョン3を指す。
-
-「『コピーライト』」(Copyright)とは、いわゆる著作権のみならず、半導体マスクのようなその他の作品に適用される、著作権に類似した法的権利をも意味する。
-
-(訳注: この規定により、本許諾書は著作権法で保護されたいわゆる「著作物」よりも広い範囲をカバーすることになる。よってこの訳のライセンス本文中においては、work(s)に「著作物」ではなく「作品」という訳語を宛てることにした。)
-
-「『プログラム』」(The Program)とは、本許諾書の下でライセンスされた、『コピーライト』が主張可能な作品すべてを意味する。個々のライセンシーは「あなた」として表現される。ライセンシーは個人でも組織でも構わない。
-
-ある作品の「改変」(modify)とは、その作品の全体ないし一部を、『コピーライト』の許可を必要とするようなやり方で複製ないし翻案することを意味する。ただし、完全に同一なコピーを作成する場合は除く。改変の結果出来た作品は、以前の作品の「改変されたバージョン」(modified version)、または、以前の作品を「基にした」(based on)作品と呼ばれる。
-
-「『保護された作品』」(covered work)とは、改変されていない『プログラム』か、『プログラム』を基にした作品のいずれかを指す。
-
-ある作品の「普及」(propagate)とは、コンピュータ上で実行すること、または私的なコピーを改変することを除き、適用可能な『コピーライト』法規の下で許可無く行うと、権利侵害として、直接的、あるいは間接的にあなたが責任を問われる何らかの行為を意味する。普及には、複製、頒布 (改変の有無を問わない)、公衆への利用可能化が含まれ、またいくつかの国々では他の活動も含まれる可能性がある。
-
-ある作品の「伝達」(convey)とは、第三者がコピーを作成ないし受領するのを可能とする普及行為すべてを意味する。ただし、コンピュータネットワーク越しにユーザとやりとりするだけで、コピーの転送は伴わない場合は、伝達ではない。
-
-対話的なユーザインターフェースが「『適切な法的告知』」(Appropriate Legal Notices)を表示するという場合、そのインターフェースは (1)適切な『コピーライト』告知を表示し、(2)ユーザに対して、その作品には何の保証もない(別途保証が提供されている場合は除く)ということ、ライセンシーはその作品を本許諾書の下で伝達できるということ、そして本許諾書のコピーを見るにはどうしたらよいかということを便利かつ顕著に視認できるような機能を含むものとする。もしインターフェースが、メニューのようなユーザコマンドやオプションの一覧を表示するならば、その一覧中には上記の基準を満たすようなアイテムが目立つように含まれていなければならない。
-1. ソースコード¶
-
-ある作品の「ソースコード」(source code)とは、その作品に改変を加えるに当たって好ましいと考えられる形式のことである。「オブジェクトコード」 (object code)とは、作品がとりうるソースコード以外の形式すべてを意味する。
-
-「標準インターフェース」(Standard Interface)とは、標準化団体として認知された組織によって定義された公式な標準か、ある特定のプログラミング言語向けに指定されたインターフェースの場合には、その言語を利用する開発者の間で広く使われているインターフェースのことを指す。
-
-実行可能な作品の「『システムライブラリ』」(System Libraries)とは、 (a)「主要コンポーネント」(Major Component) の頒布物に通常含まれるが、その主要コンポーネントの一部ではなく、かつ(b)作品をその「主要コンポーネント」といっしょに利用することを可能にする、あるいは公衆にとってソースコード形式で利用可能な実装がひとつは存在する標準インターフェースを提供するためにのみ機能するものすべてを意味する。ただし、全体としての作品そのものは除く。ここでいう「主要コンポーネント」とは、実行可能な作品がその上で実行されるある特定のオペレーティングシステム (そういったものが必要ならば)の主要で不可欠な一部分(カーネルやウィンドウシステムなど)、あるいはその作品を作成するのに使われるコンパイラ、実行するのに使われるオブジェクトコードインタプリタなどを意味する。
-
-オブジェクトコード形式の作品に「『対応するソース』」(Corresponding Source)とは、その作品を生成、インストール、(実行可能な作品に関しては)オブジェクトコードを実行、または作品を改変する上で必要とされるソースコードのすべてを意味する。この場合、そうした活動をコントロールするためのスクリプトは『対応するソース』に含まれるが、その作品にとっての『システムライブラリ』や、先ほど列挙した活動を行う上で改変されることなく利用されるものの作品の一部ではない、汎用のツールや一般的に利用可能なフリープログラムは除外される。例えば『対応するソース』には、その作品のソースファイルと連携するインターフェース定義ファイルに加え、共有ライブラリや動的にリンクされた下位プログラムと作品のその他の部分との間での親密なデータのやりとりやコントロールフローなどのために、その作品が設計上明確に必要とする、そうした共有ライブラリや下位プログラムのソースコードなどが含まれる。
-
-『対応するソース』には、ユーザが『対応するソース』の他の部分から自動的に再生成できるものを含む必要はない。
-
-ソースコード形式の作品にとっての『対応するソース』とは、その作品そのものである。
-2. 基本的な許可¶
-
-本許諾書の下で認められるすべての権利は、『プログラム』に主張される『コピーライト』の条項に基づき授与されるものであり、ここで述べられた条件が満たされている限り覆すことはできない。本許諾書は、改変されていない『プログラム』をあなたが無制限に実行することを許可し、明示的に確約する。『保護された作品』を実行することから得られた出力結果は、その出力内容が『保護された作品』を構成する場合のみ本許諾書で保護される。本許諾書は、あなたが有するフェアユースまたはその同等物の権利を、『コピーライト』法規によって提供される通りに承認する。
-
-その他の状況においてあなたのライセンスが有効である限り、『保護された作品』の、伝達を伴わない作成、実行、および普及は無条件に行うことができる。他者にあなた専用の改変を行わせる、あるいは他者にあなたがそういった作品を実行するための機能を提供させるということが唯一の目的であれば、『保護された作品』を他者に伝達することができる。ただしその場合、あなたが『コピーライト』を支配していない部分すべての伝達に関しては、本許諾書の条項に従わなければならない。従って、あなたのために『保護された作品』を作成または実行する者は、専らあなたのためだけに、あなたの監督と支配の下で、あなたとの関係の範囲外ではあなたが『コピーライト』を有する一部分のいかなるコピーをも作成することを禁止するという条件の下で行わなければならないということになる。
-
-上記以外のあらゆる状況下においては、伝達は以下で述べる条件の下でのみ許可される。再許諾は認められない。下記第10項により、再許諾は必要ないからである。
-3. ユーザの法的権利を、技術的保護手段の回避を禁ずる法律から守る¶
-
-『保護された作品』は、 1996年12月20日に採択されたWIPO著作権条約第11項の下での義務を満たす適用可能な法のいずれか、あるいはそれに類似の法が、回避の禁止または制限の対象として規定する、「効果的な技術的手段」 (effective technological measure)の一部として見なされてはならない。
-
-(訳注: WIPO著作権条約については、http://www.cric.or.jp/db/article/wch.html 等を参照せよ。)
-
-あなたが『保護された作品』を伝達する場合、『保護された作品』に関して本許諾書の下で権利を行使することにより、技術的手段の回避に影響が出る範囲において、そのような手段の回避を禁じるいかなる法的権力をも放棄することになる。また、あなたはその作品のユーザに対して、技術的手段の回避を禁じるためにあなたや第三者の法的権利を強制するための手段として、その作品の動作や改変を制限するいかなる意図も否認することになる。
-4. 一字一句忠実なコピーの伝達¶
-
-あなたは、自分が受領した『プログラム』のソースコードと一字一句同じコピーであれば、いかなる媒体でも伝達することができる。ただしその場合、あなたはそれぞれのコピーにおいて、目立つように、かつ適切な形で、ふさわしい『コピーライト』告知を掲載しなければならない。すなわち、本許諾書と、下記第7項に従い追加された非許可的条項のすべてがそのコードに適用される旨の告知を掲載し、あらゆる保証が存在しない旨の告知をすべてそのまま保全し、かつ『プログラム』の受領者すべてに、『プログラム』といっしょにこの許諾書のコピーを与えなければならない。
-
-あなたは、自分が伝達するコピーのそれぞれに関していかなる価格を付けても良いし、無料で伝達しても構わない。また、報酬を取ってサポートや保証保護 (warranty protection)を提供しても良い。
-5. 改変されたバージョンのソースの伝達¶
-
-あなたは、『プログラム』を基にした作品、あるいはそうした作品を『プログラム』から作成するための改変点を、上記第4項の規定に従ってソースコード形式で伝達することができる。ただしその場合、あなたは以下に示す条件のすべてを満たさなければならない:
-
-    * a) 作品には、あなたが作品を改変したということと、改変に関連した日時を記述した告知を目立つように載せなければならない。
-    * b) 作品には、それが本許諾書と、下記第7項に従って追加された条件すべての下で公開されていることを記述した告知を目立つように載せなければな らない。この条件は、上記第4項における「告知をすべてそのまま保全」するための条項を改変する。
-    * c) 作品の全部分を、総体として、コピーを所有するに至った人全員に、本許諾書の下でライセンスしなければならない。そこで、本許諾書は、本許諾書第7項に基づく適用可能な追加的条項のすべてとともに、作品全体に、すなわちその全部分に、それらがどのようにパッケージされているかに関わらず適用されることになる。本許諾書は、これ以外のやり方には作品をライセンスする許可を与えないが、あなたが本許諾書以外で別途許可を得ていた場合には、それによって得られた許可まで無効とするものではない。
-    * d) 改変された作品が対話的なユーザインターフェースを有する場合、それらのインターフェースは『適切な法的告知』を表示しなければならない。ただし、『プログラム』に元々『適切な法的告知』を表示しない対話的なインターフェースがある場合、あなたの作品で表示するようにする必要はない。 
-
-一巻の記憶装置の中か頒布媒体上で、『保護された作品』と、本来『保護された作品』の拡張ではなく、『保護された作品』とより大規模なプログラムを形成するような形で結合されているわけでもないその他の分離かつ独立した作品とをまとめた編集物は、編集作業とそれに由来する『コピーライト』が、個々の作品が許可する範囲を越えて編集物のユーザの作品へのアクセスや法的権利を制限するのに使われない限り、「集積物」(aggregate)と呼ばれる。単に『保護された作品』を集積物に含めるだけでは、その集積物の他の部分にまで本許諾書が適用されるということにはならない。
-6. ソース以外の形式における伝達¶
-
-あなたは、オブジェクトコード形式の『保護された著作物』を、上記第4項および第5項の規定に従って伝達することができる。ただしその場合、あなたは機械読み取り可能な『対応するソース』も本許諾書の条件に従って、以下のいずれかの方法で伝達しなければならない。
-
-    * a) オブジェクトコードを物理的製品(物理的頒布媒体を含む)で、あるいはそれに組み込んで伝達する。その際、『対応するソース』を、ソフトウェア のやりとりで一般的に使われる耐久性のある物理的媒体に固定していっしょに頒布する。
-    * b) オブジェクトコードを物理的製品(物理的頒布媒体を含む)で、あるいはそれに組み込んで伝達する。その際、最低でも3年間、あるいはあなたがその製品モデルに補修用部品やカスタマーサポートを提供する限り有効な、書面 による申し出を添付する。その申し出には、(1) オブジェクトコードを所有する者すべてに対して、その製品に含まれるソフトウェアのうち本許諾書で保護されるものすべてに『対応するソース』のコピーを、ソフトウェアのやりとりで一般的に使われる耐久性のある物理的媒体で頒布する旨を記載する。その際、物理的にこのソースの伝達を行うのにかかる正当なコスト以上の価格を要求してはならない。あるいは、(2) 『対応するソース』を無料でネットワークサーバから複製するためのアクセスを提供する旨を記載する。
-    * c) オブジェクトコードの個々のコピーを、対応するソースを提供するという書面による申し出のコピーといっしょに伝達する。この選択肢は特別な場合、かつ非商業的な場合のみに、そしてあなたがオブジェクトコードを上記小項 6bに合致した申し出といっしょに受領した場合にのみに認められる。
-    * d) オブジェクトコードを、指定の場所から複製するためのアクセスを提供することによって伝達し、『対応するソース』に対しても同じ場所を通じて同じ方法で複製するための同等のアクセスを提供する。伝達は無料でも手数料を課しても構わないが、『対応するソース』に対して追加的な課金を行ってはならない。受領者に対して、『対応するソース』をオブジェクトコードといっしょに複製することを義務づける必要はない。オブジェクトコードの複製元がネットワークサーバの場合、対応するソースは同等の複製機能をサポートする異なったサーバ(あなたか第三者が運営)上にあっても良い。その場合、オブジェクトコードの傍らに、『対応するソース』はどこで見つけられるかを明確に指示しておかなければならない。どのサーバが『対応するソース』をホストするかに関わらず、あなたは『対応するソース』がこれらの条 項を満たすために必要なかぎり利用可能であることを保証する責任がある。
-    * e) オブジェクトコードをピア・ツー・ピア伝送を使って伝達する。ただしこの場合、あなたは上記小項6dに従い、その作品のオブジェクトコードと 『対応するソース』がどこで一般公衆に無料で提供されるのかということを他のピアに知らせておかなければならない。 
-
-オブジェクトコードの分離した一部であり、そのソースコードが『対応するソース』から『システムライブラリ』として除外されているものは、オブジェクトコード作品を伝達する場合に含める必要はない。
-
-「ユーザ製品」(User Product)とは、(1)「コンシューマ製品」(consumer product)、すなわち、個人、子供、あるいは家庭用に通常使用される有形個人資産すべてか、あるいは(2)居住所における導入を目的に設計ないし販売されるものすべてを指す。ある物品がコンシューマ製品であるかを決定する際疑義がある場合には、極力範囲を広げる方向で決定されるべきである。ここで、ある特定のユーザによって受領されたある特定の製品にとっての「通常使用」 (nomally used)とは、その種の製品において典型的な、あるいは一般的な利用のことであり、その特定のユーザが置かれた状況や、その特定のユーザがその製品を実際にどう使っているか、どう使うことを予期しているか、あるいは予期されているかとは関係ない。その製品に相当な商業的、産業的または非コンシューマ的な利用法があったとしても、そうした利用がその製品の唯一重要な利用形態を代表するものでない限り、その製品はコンシューマ製品である。
-
-ユーザ製品の「『インストール用情報』」(Installation Information)とは、ユーザ製品内の『保護された作品』に関して、『対応するソース』の改変されたバージョンから得られる『保護された作品』の改変されたバージョンを、インストール、実行するために必要な手法、手順、認証キーやその他の情報すべてを意味する。この情報は、改変されたオブジェクトコードの継続的な動作が、改変が為されたということによってのみ拒否されたり妨害されることが決してないことを保証するのに十分なものでなければならない。
-
-本節の下において、作品をユーザ製品の内で、またはユーザ製品と共に、あるいは特にユーザ製品での利用を念頭においてオブジェクトコードで伝達し、またその伝達がユーザ製品の受領者への所有と利用の権利の永遠ないし有期の移転の一部として起こる場合(移転がどのように行われるかは問わない)、この条項の下で『対応するソース』は『インストール用情報』と共に提供されなければならない。しかしこの条件は、あなたと第三者のいずれもが改変されたオブジェクトコードをユーザ製品にインストールする能力を有していない際には適用されない(例えば、作品がROMにインストールされている場合)。
-
-『インストール用情報』を提供する条件には、受領者によって改変ないしインストールされた作品、あるいはそうした作品が改変ないしインストールされたユーザ製品に対し、サービスや保証、アップデートを提供しつづけるという条件は含まれない。改変自体がネットワークの運用に実質的かつ有害な影響をもたらし、ネットワークを介したコミュニケーションのプロトコルや規則に違反する場合には、ネットワークアクセスを拒否しても構わない。
-
-伝達される『対応するソース』や提供される『インストール用情報』が本節を満たすためには、それらが公に文書化された形式で(かつ公衆に対してソースコード形式で利用可能な実装とともに)提供されなければならない。この場合、これらの圧縮展開や読み込み、複製に特別なパスワードやキーを必要としてならない。
-7. 追加的条項¶
-
-「追加的許可」(Additional permissions)とは、本許諾書が課す条件に一つかそれ以上の例外を設けることにより、本許諾書の条項を補足する条項のことである。『プログラム』全体に適用可能な追加的許可は、適用可能な法の下でそれらが有効である限り、あたかもそれらが本許諾書に含まれているかのように扱われなければならない。追加的許可が『プログラム』の一部にのみ適用される場合、その部分に関してはそういった追加的許可の下で別途利用可能だが、『プログラム』全体としては追加的許可に関わりなく本許諾書によってのみ管理される。
-
-あなたが『保護された作品』のコピーを伝達する場合、あなたは追加的許可をそのコピー、あるいはその一部から削除することを選択できる (追加的許可は、あなたが作品をある種の形で改変する際には、そうした許可自身の削除を要求するような形で書かれてもよい)。あなたは、あなたによって『保護された作品』に追加され、あなたが適切な『コピーライト』許可を有するか、与えることができる限り、その一部分に追加的許可を設定することができる。
-
-本許諾書の他の条件に関わらず、あなたが『保護された作品』に追加した一部分について(その部分の『コピーライト』保有者らによって正式に許可されていれば)、本許諾書の条項を、以下に示す条項で補足することができる:
-
-    * a) 本許諾書第15項および第16項の条項とは異なった形で保証の否認や責任の限定を主張する。あるいは、
-    * b) 追加した一部分において、明示的で妥当な法的告知や作者特定の保全、またはそれを含む作品において『適切な法的告知』の表示を要求する。あるいは、
-    * c) 追加した一部分の出自を不当に表示することを禁じるか、あるいはそのような一部分の改変されたバージョンはオリジナルのバージョンとは異なっ ているということを適切な方法で印づけることを要求する。あるいは、
-    * d) その一部分のライセンサーや作者の名前を、宣伝目的で利用することを制限する。あるいは、
-    * e) 商品名や商標、サービスマークの利用に関して、商標法に従い権利を授与することを拒否する。あるいは、
-    * f) その一部分(あるいはその改変されたバージョン)を伝達する者に、受領 者への責任に関して契約上の引き受けがあり、そうした責任が直接的にそういったライセンサーや作者にまで課せられる場合、その一部分のライセンサーや作者の免責を要求する。 
-
-他の非許可的な追加的条項は下記第10項が意味するところの「さらなる権利制限」(further restrictions)とみなされる。あなたが受領した『プログラム』、あるいはその一部に、それが本許諾書とともにさらなる権利制限である条項によっても管理されていると述べた告知が含まれている場合には、あなたはそういった条項を削除して構わない。あるライセンス文書にさらなる権利制限がふくまれているが、しかし本許諾書の下での再許諾や伝達を許可しているならば、あなたはそのライセンス文書の条項によって管理されている一部分を『保護された作品』に追加することができる。ただしその場合、さらなる権利制限はそのような再許諾や伝達では無効としなければならない。
-
-あなたが本節に従って『保護された著作物』に条項を追加した場合、あなたは関係するソースファイル中に、それらのファイルに適用される追加的条項に関する声明、あるいは適用可能な条項を見つけることができる場所を示す告知を掲載しなければならない。
-
-追加的条項は、それが許可的であろうと非許可的であろうと、別途書面化されたライセンスという形式で述べられてもよいし、本許諾書への例外として述べられてもよい。上記の要件はどちらの場合でも適用される。
-8. 終了¶
-
-あなたは『保護された作品』を、本許諾書の下で明示的に提供されている場合を除いて、普及、または改変してはならない。それ以外に『保護された作品』を普及、または改変しようとする試みはすべて無効であり、本許諾書の下であなたに認められた権利(下記第11項の第3段落に従い授与されたパテントライセンスすべてを含む)を自動的に終了させることになる。
-
-しかしながら、あなたが本許諾書への違反をすべて中止するならば、あなたがある特定の『コピーライト』保有者から得たライセンスは、(a)その『コピーライト』保有者が明白かつ決定的にあなたへのライセンスを終了させるか、あるいはさせないまでは暫定的に、(b)その『コピーライト』保有者が、あなたに対し違反について、何らかの正当な手段によりライセンス停止後60日以内に通知することができなかった場合には永続的に、回復される。
-
-加えて、あなたがある特定の『コピーライト』保有者から得たライセンスは、その『コピーライト』保有者があなたに対して違反を何らかの正当な手段で通知し、それより前にその『コピーライト』保有者から、(当該作品に限らずその『コピーライト』保有者の作品のいずれかに関して)本許諾書に関する違反の通知を受領したことがなく、さらにあなたがその通知を受領してから30日以内に違反を正した場合、永続的に回復される。
-
-本節に従いあなたの権利が終了した場合でも、本許諾書に従ってあなたからコピーや権利を受領した当事者が得た許諾は終了しない。あなたの権利が終了され、永続的に回復されなかった場合には、あなたは同じライセンス対象に関し下記第10項に従って新たにライセンスを受領する資格を失うものとする。
-9. コピーの所有に必要とされない受諾¶
-
-あなたは、『プログラム』のコピーを受領あるいは実行するために本許諾書を受諾する必要はない。コピーを受領するためにピア・ツー・ピア伝送を使った結果としてのみ発生する『保護された作品』の付随的な普及も、同様に受諾を必要としない。しかしながら、他の場合においては、本許諾書以外にあなたに対して『保護された作品』の普及や改変をする許可を認めるものはない。これらの行為は、本許諾書を受諾しない限り『コピーライト』を侵害することになる。そこで、『保護された作品』を改変あるいは普及することにより、あなたはそうした行為を行うために本許諾書を受諾したということを示したことになる。
-10. 下流の受領者への自動的許諾¶
-
-あなたが『保護された作品』を伝達するたびに、受領者は自動的にオリジナルのライセンサーから、本許諾書に従いその作品を実行、改変、普及するライセンスを得る。なお、あなたには第三者が本許諾書に従うことを強制する責任はない。
-
-「主体取引」(entity transaction)とは、ある組織そのもの、ないしその組織の実質的に全ての資産の支配権が移転するか、あるいは組織の細分化や合併が行われるような取引を指す。もし主体取引の結果として『保護された作品』の普及が起こった場合、作品のコピーを受領したそれぞれの取引当事者は、利害関係のある当事者の先任者から、その先任者が前段落に従って有する、あるいは与えることができる、その作品に関するライセンスもまたすべて受領する。加えて個々の取引当事者は、利害関係のある先任者から、その先任者が有しているか、適正な努力によって得ることが可能な限りにおいて、その作品の『対応するソース』の所有権も得る権利を有する。
-
-あなたは本許諾書の下で授与された、あるいは確約された権利の行使に対して、本許諾書が規定する以上のさらなる権利制限を課してはならない。たとえば、あなたはライセンス料、ロイヤルティや他の料金を、本許諾書の下で認められている権利の行使に関して課してはならない。また、あなたは『プログラム』やその一部の作成、利用、販売、販売の申し出、取り込みによって何らかのパテントクレームが侵害されたとして、訴訟(訴訟における反対請求ないし反訴を含む)を開始してはならない。
-11. 特許¶
-
-「貢献者」(contributor)とは、本許諾書の下で『プログラム』、あるいは『プログラム』が基にした作品を利用することを正式に許可した『コピーライト』保有者のことを指す。従って、そのようにしてライセンスされた作品は、貢献者による「貢献者バージョン」(contributor version)と呼ばれる。
-
-ある貢献者の「必須パテントクレーム」(essential patent claims)とは、すでに取得しているか、あるいは今後取得する見込みがあるため、その貢献者が現在所有ないし支配していると言える特許のうち、貢献者バージョンに対して、本許諾書で許可されているような作成や利用、販売といった何らかの形の行為を行うことによって侵害される可能性があるパテントクレームのすべてを意味する。ただし、貢献者バージョンをさらに改変した結果としてのみ侵害されるようなクレームは含まれない。この定義において、「支配」には本許諾書が課す条件と整合的なやり方で特許の再許諾を認める権利も含まれる。
-
-個々の貢献者はあなたに対して、その貢献者の必須パテントクレームに関し、あなたがその貢献者バージョンの内容を作成、利用、販売、販売の申し出、取り込み、その他実行、改変、普及するために必要な、非排他的で全世界的に有効、かつロイヤルティフリーのパテントライセンスを授与する。
-
-以下の3段落において「『パテントライセンス』」とは、ある特許を実施しないという明示的な協定やコミットメントのすべてを指す(例えば、ある特許の実施に対する明示的な許可や、特許侵害訴訟を提起しないという誓約など)。そのような『パテントライセンス』をある当事者に「授与」するとは、その当事者と特許を実施しないという協定やコミットメントを結ぶことを意味する。
-
-もしあなたが、『保護された作品』の伝達を、それがある『パテントライセンス』に依存しており、よってその作品の『対応するソース』は、すべての人にとって、公衆が利用可能なネットワークサーバや他の容易にアクセス可能な手段を通じ、無料かつ本許諾書に従って複製可能ではないということを知りながら行うならば、あなたは (1)『対応するソース』も同様に利用可能にするか、 (2)この特定の作品に関して『パテントライセンス』から得られる便益を自ら剥奪するか、あるいは(3)下流の受領者に対しても、本許諾書の条項と整合的な形で、『パテントライセンス』が拡大されるように計らうかのいずれかを行わなければならない。ここで「『パテントライセンス』に依存するのを知りながら」というのは、あなたが『保護された作品』をある国で伝達すること、あるいはあなたの受領者が『保護された著作物』をある国で利用することが、『パテントライセンス』を授与されない限り、その国において、あなたにとってそれが有効だと信じるだけの理由がある一つかそれ以上の同定可能な特許を侵害するということを実際に知っているということである。
-
-ある一対一の取引や協定に基づき、あるいは関連して、あなたが『保護された作品』の伝達、または伝達によって引き起こされる普及を行い、その際『保護された作品』を受領した一部の当事者に対して、『保護された作品』の特定のコピーの利用、普及、改変、または伝達を正式に許可するような『パテントライセンス』を授与するならば、あなたが授与した『パテントライセンス』は『保護された作品』やそれを基にした作品のすべての受領者にまで自動的に拡大されることになる。
-
-ある『パテントライセンス』が「差別的」(discriminatory)であるとは、本許諾書の下で明確に認められた一つかそれ以上の権利を、『パテントライセンス』がカバーする範囲内に含まなかったり、そうした権利の行使を禁じたり、あるいは権利を行使しないことを条件として課すようなものである場合を指す。あなたを一方の当事者とし、ソフトウェアの頒布を生業とする第三者との間で、あなたは第三者に対し、作品を伝達する活動の程度に基づいて支払いを行う一方、第三者は、あなたから『保護された作品』を受領したすべての当事者に対して「差別的」な『パテントライセンス』を、(a)あなたが伝達した『保護された作品』のコピー(またはそうしたコピーから作成されたコピー)に対して、または(b)『保護された作品』を含む特定製品や編集物を、主要な、あるいは関連した対象として授与する、というような協定を結んでいる場合、あなたは『保護された作品』を伝達してはならない。ただし、あなたがそのような協定を締結したり、『パテントライセンス』を授与されたのが2007年3月28日より以前である場合は本節の例外とする。
-
-本許諾書に含まれる一切の記述は、適用可能な特許法の下であなたが利用可能な暗黙のライセンス、その他侵害への防御手段を排除したり制限したりするように解釈されてはならない。
-12. 他者の自由を明け渡してはならない¶
-
-何らかの条件(裁判所の指令や協定など)があなたに課せられ、それが本許諾書の条件と矛盾したとしても、あなたが本許諾書の条件を免れることにはならない。あなたが、『保護された作品』を、本許諾書が課す義務と他の関連した義務の両方を同時に満たすような形で伝達できないのであれば、結果としてあなたがそれを伝達することは全く不可能ということになる。例えばあなたが、自分が『プログラム』を伝達した人々がさらに伝達を行う場合には、彼らからロイヤルティを徴収する、というような義務を負う条項に同意していた場合、あなたがそういった条項と本許諾書の両方を満たすには、『プログラム』の伝達を完全に止めてしまうしかないだろう。
-13. GNU Affero 一般公衆利用許諾書との利用¶
-
-本許諾書に含まれる他の条件に関わらず、あなたには、『保護された作品』を GNU Affero 一般公衆利用許諾書バージョン3の下で許諾された作品とリンクまたは結合して単一の結合物とし、その結果物を伝達する許可が与えられる。本許諾書の条項は『保護された作品』である部分に関してはそのまま適用されるが、結合物それ自体としては、GNU Affero 一般公衆利用許諾書の第13項が規定する、ネットワークを介したやりとりに関する特殊な条件も適用されることになる。
-
-(訳注: 訳出時点では、GNU Affero GPLは改定作業が依然続いており、確定バージョンはリリースされていない。 http://gplv3.fsf.org/agplv3-dd2-guide.htmlを参照せよ。)
-14. 本許諾書の改訂されたバージョン¶
-
-フリーソフトウェア財団は、改訂された、あるいは新しいバージョンの GNU 一般公衆利用許諾書を折りに触れて発行することができる。そのような新バージョンは、その精神においては現在のバージョンと似たものになるだろうが、細部については新たな問題や懸念を解決すべく異なるものになるだろう。
-
-それぞれのバージョンには、見分けがつくようなバージョン番号が振られている。『プログラム』に、ある特定のバージョン番号が振られた GNU 一般公衆利用許諾書「かそれ以降のバージョンのいずれか(or any later version)」が適用されると指定されていた場合、あなたは指定された番号のバージョンか、それ以降にフリーソフトウェア財団によって発行されたいずれかのバージョンのどちらの利用条件に従うかを選ぶことができる。『プログラム』が本許諾書のバージョン番号を指定していなかった場合には、あなたはフリーソフトウェア財団がそれまでに発行したバージョンの中からどれを選択しても構わない。
-
-(訳注: 日本語訳のバージョンは日付で管理している。冒頭を見よ。)
-
-『プログラム』において、GNU 一般公衆利用許諾書の将来のバージョンのうちどれが適用されうるかは代理人が決定できる、と指定されていた場合、その代理人が、あるバージョンを受諾すると述べた公的な声明は、あなたに対し、その『プログラム』に関してそのバージョンのGNU GPLを選ぶことを永続的かつ正式に許可するのと等しい。
-
-本許諾書の今後のバージョンでは、あなたに追加的な、または従来とは異なった形での許可を与えるかもしれない。しかしながら、作者や『コピーライト』保有者に対し、あなたが以降のバージョンに従うことを選んだ結果として、追加的な義務が課せられることはない。
-15. 保証の否認¶
-
-『プログラム』には、適用可能な法で許可されている範囲において何の保証もない。書面で述べられていない限り、『コピーライト』保有者やその他の当事者は『プログラム』を「あるがまま(as is)」で、明示的、暗示的を問わず、いかなる種類の保証もなく提供する。この保証には、商用可能性や特定目的への適合性の暗黙的保証が含まれるが、これらに限定されない。『プログラム』の質や性能に関するリスクはすべてあなたに帰属する。『プログラム』に問題があると判明した場合、あなたは必要なすべての対応、補修、修正にかかる費用を負うものとする。
-16. 責任の限定¶
-
-適用可能な法において義務づけられるか、書面による同意がない限り、『コピーライト』保有者あるいはその他『プログラム』を上記で許可された通りに改変あるいは伝達する当事者は、たとえそうした保有者や他の当事者が損害が発生する可能性について事前に通知されていたとしても、あなたに対して損害賠償責任を有することはない。ここでいう損害には、『プログラム』の利用あるいは利用できないことから発生した一般的、特殊的、偶然的、必然的な損害のすべてが含まれる(データの消失やデータの不正確な解釈、あなたや第三者によって被った、あるいは『プログラム』が他のプログラムといっしょにうまく動作しなかったために引き起こされた損害などが含まれるが、これらに限定されない)。
-17. 第15項と第16項の解釈について¶
-
-上記のような保証の否認や責任の限定が、特定国内においてそういった条項が指定する通りの法的効力を持ち得ない場合、再審裁判所は、『プログラム』に関連したすべての民事責任の絶対的棄権に最も近く肉薄する国内法を適用すべきである。ただし、報酬の見返りとして責任の保証や引き受けが『プログラム』のコピーに付随する場合は除く。 
-
diff --git a/rec10/branches/0.4/src/src/license.txt b/rec10/branches/0.4/src/src/license.txt
deleted file mode 100644 (file)
index 69e51ec..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-GNU LESSER GENERAL PUBLIC LICENSE
-
-Version 3, 29 June 2007
-
-Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
-
-Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-
-This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
-0. Additional Definitions.
-
-As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License.
-
-“The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
-
-An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
-
-A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”.
-
-The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
-
-The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
-1. Exception to Section 3 of the GNU GPL.
-
-You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
-2. Conveying Modified Versions.
-
-If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
-
-    * a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
-    * b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
-
-3. Object Code Incorporating Material from Library Header Files.
-
-The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
-
-    * a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
-    * b) Accompany the object code with a copy of the GNU GPL and this license document.
-
-4. Combined Works.
-
-You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
-
-    * a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
-    * b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
-    * c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
-    * d) Do one of the following:
-          o 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
-          o 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
-    * e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
-
-5. Combined Libraries.
-
-You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
-
-    * a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
-    * b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
-
-6. Revised Versions of the GNU Lesser General Public License.
-
-The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
-
-If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
-
-
-GNU GENERAL PUBLIC LICENSE
-
-Version 3, 29 June 2007
-
-Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
-
-Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-Preamble
-
-The GNU General Public License is a free, copyleft license for software and other kinds of works.
-
-The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
-
-To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
-
-For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
-
-Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
-
-For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
-
-Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
-
-Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
-
-The precise terms and conditions for copying, distribution and modification follow.
-TERMS AND CONDITIONS
-0. Definitions.
-
-“This License” refers to version 3 of the GNU General Public License.
-
-“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
-
-“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
-
-To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
-
-A “covered work” means either the unmodified Program or a work based on the Program.
-
-To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
-
-To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
-
-An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
-1. Source Code.
-
-The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
-
-A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
-
-The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
-
-The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
-
-The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
-
-The Corresponding Source for a work in source code form is that same work.
-2. Basic Permissions.
-
-All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
-
-You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
-
-Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
-3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
-
-When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
-4. Conveying Verbatim Copies.
-
-You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
-
-You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
-5. Conveying Modified Source Versions.
-
-You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
-
-    * a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
-    * b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
-    * c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
-    * d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
-
-A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
-6. Conveying Non-Source Forms.
-
-You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
-
-    * a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
-    * b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
-    * c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
-    * d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
-    * e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
-
-A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
-
-A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
-
-“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
-
-If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
-
-The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
-
-Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
-7. Additional Terms.
-
-“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
-
-When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
-
-Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
-
-    * a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
-    * b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
-    * c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
-    * d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
-    * e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
-    * f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
-
-All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
-
-If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
-
-Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
-8. Termination.
-
-You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
-
-However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
-
-Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
-
-Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
-9. Acceptance Not Required for Having Copies.
-
-You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
-10. Automatic Licensing of Downstream Recipients.
-
-Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
-
-An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
-
-You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
-11. Patents.
-
-A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
-
-A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
-
-Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
-
-In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
-
-If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
-
-If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
-
-A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
-
-Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
-12. No Surrender of Others' Freedom.
-
-If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
-13. Use with the GNU Affero General Public License.
-
-Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
-14. Revised Versions of this License.
-
-The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
-
-If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
-
-Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
-15. Disclaimer of Warranty.
-
-THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-16. Limitation of Liability.
-
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-17. Interpretation of Sections 15 and 16.
-
-If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
diff --git a/rec10/branches/0.4/src/src/missed.py b/rec10/branches/0.4/src/src/missed.py
deleted file mode 100755 (executable)
index 2671ca8..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import configreader
-import glob
-import time
-import sqlite3
-dbpath=str(os.path.dirname(os.path.abspath(__file__)))+"/"+"ch.db"
-if __name__ == "__main__":
-    print "Hello Rec10 Recording Que Search.";
-def search_b25(path):
-    """
-    録画フォルダを検索し、各QUEの実行状況を表示する
-    """
-    b25list=glob.glob(path+"/*.b25")
-    tslist=glob.glob(path+"/*.ts")
-    avilist=glob.glob(path+"/*.avi")
-    for b25f in b25list:
-        ##b25f is title.ts.b25  avi is title.avi
-        dir=os.path.split(b25f)[0]
-        title=os.path.split(b25f)[1]
-        title=title.replace(".ts.b25","")
-        avipath=os.path.join(dir,title+".avi")
-        tspath=os.path.join(dir,title+".ts")
-        b25f=b25f.replace(".ts.b25",".avi")
-        mode="ts"
-        if os.path.isfile(tspath):##tsファイルが存在している
-            dtime=time.time()-os.path.getmtime(tspath)
-            dtime=int(dtime)
-            if dtime > 120 :
-                if os.path.getsize(tspath)>1*1000*1000:##最終更新から22分以上経過かつ1MB以上
-                    mode="avi"
-                else:
-                    mode="tsmiss"
-            else :
-                mode="ts"
-        if os.path.isfile(avipath):##tsファイルが存在している
-            dtime=time.time()-os.path.getmtime(avipath)
-            dtime=int(dtime)
-            if dtime > 120 :
-                if os.path.getsize(avipath)>1*1000*1000:##最終更新から22分以上経過かつ1MB以上
-                    mode="fin"
-                else:
-                    mode="avimiss"
-            else :
-                mode="avi"
-        print title+":"+mode
-def search_b25_DB(path):
-    """
-    検索結果をDBに書き込む。
-    """
-    db = sqlite3.connect(dbpath)
-    try:
-        db.execute('drop table que')
-        db.commit()
-    except:
-        test = ""
-
-    try:
-        db.execute('create table que (title TEXT,que TEXT,status TEXT)')
-    except:
-        ""
-    db.commit()
-    
-    b25list=glob.glob(path+"/*.b25")
-    tslist=glob.glob(path+"/*.ts")
-    avilist=glob.glob(path+"/*.avi")
-    for b25f in b25list:
-        ##b25f is title.ts.b25  avi is title.avi
-        dir=os.path.split(b25f)[0]
-        title=os.path.split(b25f)[1]
-        title=title.replace(".ts.b25","")
-        avipath=os.path.join(dir,title+".avi")
-        tspath=os.path.join(dir,title+".ts")
-        b25f=b25f.replace(".ts.b25",".avi")
-        mode="ts"
-        if os.path.isfile(tspath):##tsファイルが存在している
-            dtime=time.time()-os.path.getmtime(tspath)
-            dtime=int(dtime)
-            if dtime > 120 :
-                if os.path.getsize(tspath)>1*1000*1000:##最終更新から22分以上経過かつ1MB以上
-                    mode="avi"
-                else:
-                    mode="tsmiss"
-            else :
-                mode="ts"
-        if os.path.isfile(avipath):##tsファイルが存在している
-            dtime=time.time()-os.path.getmtime(avipath)
-            dtime=int(dtime)
-            if dtime > 120 :
-                if os.path.getsize(avipath)>1*1000*1000:##最終更新から22分以上経過かつ1MB以上
-                    mode="fin"
-                else:
-                    mode="avimiss"
-            else :
-                mode="avi"
-        print title+":"+mode
-path=configreader.getpath("recpath")
-search_b25(path)
-        
\ No newline at end of file
diff --git a/rec10/branches/0.4/src/src/readme.txt b/rec10/branches/0.4/src/src/readme.txt
deleted file mode 100644 (file)
index 0bd580d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-###########################################
-#     Rec10 for PT1                  #
-#                     Ver.0.1.0b     #
-# 2009/05/09    Yukikaze                 #
-#  Copyright (C) 2009 Yukikaze   #
-###########################################
-
-本ソフトはpythonおよびperlによって書かれた録画ツールです。
-ライセンスは LGPL v3に準拠します(license.txt参照)
-
-[必要コマンド]
-python(2.5にて動作確認)
-xvfb-run
-wine
-mencoder
-ffmpeg
-
-[必要環境:Webインターフェース部分]
-perl
-一部のperlモジュール
-
-[必要環境:外部ツール]
-TsSplitter
-BonTsDemux
-tsEpg2xml
-b25
-recpt1
-
-以上のソフトについては実行パスをconfig.iniに書いておいてください
-その後chdate.pyのチャンネル設定部分を書き換え、chdate.pyを実行してください
-次にinstall.pyを実行すると番組表の取得が始まります。
-wwwフォルダにあるrectool.plを好みの場所に移動させ、そのフォルダにch.dbにたいするリンクを作成してください。
-最後にrec10d.pyをcronで五分おきに実行するようにしてください
-crontab -e を実行するとcronを編集できるようになるので
-*/5 * * * * /rec10d.py
-のように書いてください
-ログが見たい場合は
-*/5 * * * * /rec10d.py > /dev/pts/0
-などのようにすれば/dev/pts/0端末に出力します(ttyコマンドで調べられます)
-
-以上で設定は終了です。
-
-ちなみに
-dbviewer.pyを実行すると現在のデーターベースを見ることができます。
-エンコードの設定を変えたい場合はts2x264を参照してください
-
-チャンネルの設定を買えた場合は一度chdate.pyを変更したのちに実行してください
-その後番組表が更新されます
-
-バグだらけのコードですが、改善点などを指摘していただけるとうれしいです。
-yukikaze.jp@gmail.com
-
-[History]
-09/05/24 0.3.1 release
-fix
-チャンネルの増加
-エンコードオプションを実際に使えるようにした。
-1passモード実装
-niceコマンドをより広範囲に適用するようにした。
-09/05/08 0.1.1 release
-fix
-2passエンコードのログファイルがかぶるのを訂正
-一部チャンネル指定が間違っていたのを訂正
-その他多くのバグの訂正
-09/05/05 0.0.1b release
-fix
-replace tab to 4 spaces(it caused errors)
-add some cs-e2 channels
-09/05/04 0.0.1a release
diff --git a/rec10/branches/0.4/src/src/rec10d.py b/rec10/branches/0.4/src/src/rec10d.py
deleted file mode 100644 (file)
index fc91a37..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import timerec
-path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-
-timerec.task()
-
diff --git a/rec10/branches/0.4/src/src/rec10gridserver.py b/rec10/branches/0.4/src/src/rec10gridserver.py
deleted file mode 100755 (executable)
index 5a7c71e..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-from SocketServer import *
-import recdb
-import configreader
-RECV_BUF = 8192
-
-class Handler(BaseRequestHandler):
-    """
-    This is a server to encode ts files in another pc.
-
-    """
-    def handle(self):
-        print "connect from:", self.client_address
-        cons=getTask()
-        print cons+" is sent"
-        self.request.send(cons)
-        """while True:
-            #ret = self.request.recv(RECV_BUF)
-            #if len(ret) == 0:
-            #    break
-            self.request.send()
-
-            """
-        self.request.close()
-
-def getTask():
-    tasks=recdb.getnow("1")
-    rett=""
-    for task in tasks:
-        if task["type"]==recdb.REC_ENCODE_QUE:
-            title=task['title']
-            opt=task['opt']
-            btime=task['btime']
-            etime=task['etime']
-            chtxt=task['chtxt']
-            recdb.del_reckey(recdb.REC_ENCODE_QUE, title, chtxt, btime)
-            recdb.rec_reckey(recdb.REC_ENCODE_GRID, title, chtxt, btime, etime, opt)
-            rett="title="+title+","+"opt="+opt+";"
-            break
-    return rett
-def main():
-    port=int(configreader.getpath("gridserver_port"))
-    sv = ThreadingTCPServer(('', port), Handler)
-    print "This is a Rec10 GridServer."
-    print "Waiting for connections at port"+str(port)
-    print 'listen to:', sv.socket.getsockname()
-    sv.serve_forever()
-
-if __name__ == '__main__': main()
diff --git a/rec10/branches/0.4/src/src/recdb.py b/rec10/branches/0.4/src/src/recdb.py
deleted file mode 100644 (file)
index d0d6761..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import sqlite3
-import recdb
-dbpath=str(os.path.dirname(os.path.abspath(__file__)))+"/"+"ch.db"
-db=sqlite3.connect(dbpath)
-
-global REC_RESERVE
-REC_RESERVE="res"
-global REC_FINAL_RESERVE
-REC_FINAL_RESERVE="rec"
-global REC_END
-REC_END="end"
-global REC_ENCODE_GRID
-REC_ENCODE_GRID="grid"
-global REC_ENCODE_LOCAL
-REC_ENCODE_LOCAL="local"
-global REC_ENCODE_QUE
-REC_ENCODE_QUE="ts2avi"
-global REC_MIXING_SOUND
-REC_MIXING_SOUND="mixsound"
-global REC_MISS_ENCODE
-REC_MISS_ENCODE="miss"
-global REC_KEYWORD
-REC_KEYWORD="key"
-global REC_KEYWORD_EVERY_SOME_DAYS
-REC_KEYWORD_EVERY_SOME_DAYS="keyevery"
-global REC_FIN_DECODE
-REC_FIN_DECODE="tsfin"
-global REC_MISS_DECODE
-REC_MISS_DECODE="tsmiss"
-global REC_TS_DECODING
-REC_TS_DECODING="tsdecoding"
-try:
-    db.execute('create table rectime (type TEXT,chtxt TEXT,title TEXT,btime TEXT,etime TEXT,deltatime TEXT,deltaday TEXT,opt TEXT,id INTEGER PRIMARY KEY,UNIQUE(type,chtxt,title,btime,deltaday))')
-except:
-    #print "テーブル作成に失敗しました"
-    db.commit()
-    db.close()
-def recreserv(title,chtxt,btime,etime,opt):#optにはa(アニメ)d(副音声)v(xvid)
-    rec_reckey("res",title,chtxt,btime,etime,opt)
-def keyreserv(keyword,chtxt,btime,etime,deltatime,opt):
-    db=sqlite3.connect(dbpath)
-    recline="\""+recdb.REC_KEYWORD+"\",\""+chtxt+"\",\""+keyword+"\",datetime(\""+btime+"\"),datetime(\""+etime+"\"),\""+deltatime+"\",\""+opt+"\""
-    db.execute('insert into rectime ("type","chtxt","title","btime","etime","deltatime","opt") values ('+recline+')')
-    db.commit()
-    db.close()
-def everyreserv(keyword,chtxt,btime,etime,deltatime,opt,deltaday):
-    db=sqlite3.connect(dbpath)
-    recline="\""+recdb.REC_KEYWORD_EVERY_SOME_DAYS+"\",\""+chtxt+"\",\""+keyword+"\",datetime(\""+btime+"\"),datetime(\""+etime+"\"),\""+deltatime+"\",\""+opt+"\",\""+deltaday+"\""
-    db.execute('insert into rectime ("type","chtxt","title","btime","etime","deltatime","opt","deltaday") values ('+recline+')')
-    db.commit()
-    db.close()
-def lastrecreserv(title,chtxt,btime,etime,opt):#optにはa(アニメ)d(副音声)v(xvid)##btimeなどは2006-07-17 13:25:23の形
-    """
-    Caution this is old function and you should not use it.
-    Please use rec_reckey(recdb.REC_FINAL_RESERVE,title,chtxt,btime,etime,opt) instead of lastrecreserv(title,chtxt,btime,etime,opt)
-    """
-    rec_reckey(recdb.REC_FINAL_RESERVE,title,chtxt,btime,etime,opt)
-def misrecwrite(title,chtxt,btime,etime,opt):
-
-    """
-    Caution this is old function and you should not use it.
-    Please use rec_reckey(recdb.REC_MISS_ENCODE,title,chtxt,btime,etime,opt) instead.
-    """
-    rec_reckey(recdb.REC_MISS_ENCODE,title,chtxt,btime,etime,opt)
-def recend(title,chtxt,btime,etime,opt):#optにはa(アニメ)d(副音声)v(xvid)
-    """
-    Caution this is old function and you should not use it.
-    Please use rec_reckey(recdb.REC_END,title,chtxt,btime,etime,opt) instead.
-    """
-    rec_reckey(recdb.REC_END,title,chtxt,btime,etime,opt)
-def rec_reckey(type,title,chtxt,btime,etime,opt):
-    db=sqlite3.connect(dbpath)
-    recline="\""+type+"\",\""+chtxt+"\",\""+title+"\",datetime(\""+btime+"\"),datetime(\""+etime+"\"),\""+opt+"\""
-    db.execute('insert into rectime ("type","chtxt","title","btime","etime","opt") values ('+recline+')')
-    db.commit()
-    db.close()
-def delrec(title,chtxt,btime):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_RESERVE,title,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_RESERVE,title,chtxt,btime)
-def delkey(keyword,chtxt,btime,deltatime):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_FINAL_RESERVE,keyword,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_KEYWORD,keyword,chtxt,btime)
-def dellastrec(title,chtxt,btime):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_FINAL_RESERVE,title,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_FINAL_RESERVE,title,chtxt,btime)
-def delevery(keyword,chtxt,btime,deltatime,deltaday):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_FINAL_RESERVE,keyword,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_KEYWORD_EVERY_SOME_DAYS,keyword,chtxt,btime)
-def delend(title,chtxt,btime):
-    """
-    Caution this is old function and you should not use it.
-    Please use del_reckey(recdb.REC_END,title,chtxt,btime) instead.
-    """
-    del_reckey(recdb.REC_END,title,chtxt,btime)
-def deltitle(key):
-    db=sqlite3.connect(dbpath)
-    i=0
-    for title in db.execute("SELECT title FROM rectime WHERE title like \"%"+key+"%\""):
-        i=i+1
-    if i==1:
-        db.execute("delete from rectime where title like \'%"+key+"%\'")
-    db.commit()
-    db.close()
-def del_reckey(type,title,chtxt,btime):
-    db=sqlite3.connect(dbpath)
-    db.execute("delete from rectime where type = \'"+type+"\' AND title = \'"+title+"\' AND chtxt = \'"+chtxt+"\' AND btime = datetime(\""+btime+"\")")
-    db.commit()
-    db.close()
-def getnow(dhour):
-    db=sqlite3.connect(dbpath)
-    recdatum=[]
-    for typet, chtxt, title, btime, etime, deltatime ,deltaday ,opt in db.execute("SELECT type, chtxt, title, DATETIME(btime), DATETIME(etime), deltatime ,deltaday ,opt FROM rectime WHERE btime < datetime(\'now\',\'localtime\',\'+"+dhour+" hours\') AND btime >datetime(\'now\',\'localtime\',\'-"+dhour+" hours\')"):
-        ret={}
-        ret['type']=typet
-        ret['chtxt']=chtxt
-        ret['title']=title.encode('utf-8')
-        ret['btime']=btime
-        ret['etime']=etime
-        ret['opt']=opt
-        if typet=='key':
-            ret['deltatime']=deltatime
-        elif typet=='keyevery':
-            ret['deltatime']=deltatime
-            ret['deltaday']=deltaday
-        recdatum.append(ret)
-    db.commit()
-    db.close()
-    return recdatum
-def delete_old(dhour):
-    """
-    delete keys except recdb.REC_MISS_ENCODE and recdb.REC_KEYWORD_EVERY_SOME_DAYS before dhour hours from now.
-    """
-    db=sqlite3.connect(dbpath)
-    db.execute("DELETE FROM rectime WHERE NOT ( type = \""+recdb.REC_MISS_ENCODE+"\" OR type = \""+recdb.REC_KEYWORD_EVERY_SOME_DAYS+"\" ) AND btime < datetime(\'now\',\'localtime\',\'-"+dhour+" hours\')")
-    db.commit()
-    db.close()
-def getall():
-    db=sqlite3.connect(dbpath)
-    recdata=[]
-    for typet, chtxt, title, btime, etime, deltatime ,deltaday ,opt in db.execute("SELECT type, chtxt, title, btime, etime, deltatime ,deltaday ,opt FROM rectime"):
-        ret={}
-        ret['type']=typet
-        ret['chtxt']=chtxt
-        ret['title']=title.encode('utf-8')
-        ret['btime']=btime
-        ret['etime']=etime
-        ret['opt']=opt
-        if typet=='key':
-            ret['deltatime']=deltatime
-        elif typet=='keyevery':
-            ret['deltatime']=deltatime
-            ret['deltaday']=deltaday
-        recdata.append(ret)
-    db.close()
-    return recdata
diff --git a/rec10/branches/0.4/src/src/recdblist.py b/rec10/branches/0.4/src/src/recdblist.py
deleted file mode 100644 (file)
index 831b7d1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import recdb
-tasks=recdb.getall()
-for task in tasks:
-    #value=line.split(",")
-    if task["type"]=="res":#"res,"+chtxt+","+title+","+btime+","+etime+","+opt
-        chtxt=task['chtxt']
-        title=task['title']
-        btime=task['btime']
-        etime=task['etime']
-        opt=task['opt']
-        print "res"+","+chtxt+","+title+","+btime+","+etime+","+opt
-    elif task["type"]=="key":#"key,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-        chtxt=task['chtxt']
-        #title=task['title']
-        btime=task['btime']
-        #etime=task['etime']
-        keyword=task['title']
-        deltatime=task['deltatime']
-        opt=task['opt']
-        print "key"+","+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-    elif task["type"]=="keyevery":#"keyevery,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-        chtxt=task['chtxt']
-        #title=task['title']
-        btime=task['btime']
-        #etime=task['etime']
-        keyword=task['title']
-        deltatime=task['deltatime']
-        opt=task['opt']                        
-        deltaday=task['deltaday']
-        print "keyevery"+","+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-    elif task["type"]=="rec":#"rec,"+chtxt+","+title+","+btime+","+etime+","+opt
-        chtxt=task['chtxt']
-        title=task['title']
-        print title
-        btime=task['btime']
-        etime=task['etime']
-        #keyword=task['keyword']
-        #deltatime==task['deltatime']
-        opt=task['opt']
-        print "rec"+","+chtxt+","+title+","+btime+","+etime+","+opt
diff --git a/rec10/branches/0.4/src/src/status.py b/rec10/branches/0.4/src/src/status.py
deleted file mode 100755 (executable)
index 3dd88e5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import re
-path=os.path.dirname(os.path.abspath(__file__))+"/"
-
-def getEncoding():
-    f = open(path+'status')
-    lines = f.readlines() # 1行毎にファイル終端まで全て読む(改行文字も含まれる)
-    f.close()
-    ts2avi=0
-    # lines2: リスト。要素は1行の文字列データ
-    for line in lines:
-        if re.search('ts2avi=',line):
-            line=line.replace("ts2avi=","")
-            line=line.replace(" ","")
-            ts2avi=int(line)
-            break
-    return ts2avi
-def setEncoding(tasknum):
-    if tasknum<0:
-        tasknum=0
-    s = "ts2avi="+str(tasknum)
-    f = open('status', 'w') # 書き込みモードで開く
-    f.write(s) # 引数の文字列をファイルに書き込む
-    f.close() # ファイルを閉じる
diff --git a/rec10/branches/0.4/src/src/tester.py b/rec10/branches/0.4/src/src/tester.py
deleted file mode 100644 (file)
index ad61ffb..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import epgdb
-#import ts2epg
-#import xml2db
-#import chdb
-#import tv2ts
-##import tv2avi
-import recdb
-import tv2avi
-import re
-import ts2x264
-#import datetime
-path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-recordingpath="/home/ftpusr/ftp3/Recording/"
-recordedpath="/home/ftpusr/ftp3/Recorded/"
diff --git a/rec10/branches/0.4/src/src/timerec.py b/rec10/branches/0.4/src/src/timerec.py
deleted file mode 100644 (file)
index d992637..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import sys
-import time
-import os
-import datetime
-import epgdb
-import configreader
-import ts2x264
-import tv2avi
-import recdb
-import chdb
-import status
-import re
-recpath=configreader.getpath('recpath')
-path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-def task():
-    """
-    数分毎に実行されるタスク処理
-    予定によって子プロセスを生成し処理する。
-    """
-    recdb.delete_old("6")
-    tasks=recdb.getnow("1")
-    if len(tasks)==0:
-        update=chdb.update()
-        print "番組表更新処理"
-        print update
-        if len(update)>0:
-            print "番組表を更新"
-            print update
-            pid=os.fork()
-            if pid>0:#親プロセスの場合
-                ""
-            else:#子プロセスの場合 アップデートを行って終了
-                for bctype in update:
-                    time.sleep(1)
-                    print bctype
-                    epgdb.updatebc(bctype)
-                sys.exit(0)
-
-    for task in tasks:
-        try:
-            chtxt=task['chtxt']
-        except:
-            chtxt=""
-        try:
-            title=task['title']
-        except:
-            title=""
-        try:
-            btime=task['btime']
-            bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
-        except:
-            btime=""
-            bt=datetime.datetime.strptime("2009-01-01 00:00:00","%Y-%m-%d %H:%M:%S")
-        try:
-            etime=task['etime']
-            et=datetime.datetime.strptime(etime,"%Y-%m-%d %H:%M:%S")
-        except:
-            etime=""
-            et=datetime.datetime.strptime("2009-01-01 00:00:00","%Y-%m-%d %H:%M:%S")
-        try:
-            opt=task['opt']
-        except:
-            opt=""
-        tnow=datetime.datetime.now()
-        dtt=bt-tnow#
-        dt=dtt.days*24*60*60+dtt.seconds
-        
-        if task["type"]==recdb.REC_RESERVE:#"res,"+chtxt+","+title+","+btime+","+etime+","+opt
-            if dt<58*60:
-                recdb.del_reckey(recdb.REC_RESERVE, title, chtxt, btime)
-                recdb.rec_reckey(recdb.REC_FINAL_RESERVE, title, chtxt, btime, etime, opt)
-
-        elif task["type"]==recdb.REC_KEYWORD:#"key,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-            deltatime=task['deltatime']
-            if dt<30*60:
-                recdatum=epgdb.searchtime(title,btime,deltatime)
-                if len(recdatum)>0:
-                    recdb.del_reckey(recdb.REC_KEYWORD, title, chtxt, btime)
-                    for recdata in recdatum:
-                        recds=recdata.split(",")
-                        chtxt=recds[0]
-                        title=recds[1]
-                        btime=recds[2]
-                        etime=recds[3]
-                        bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
-                        et=datetime.datetime.strptime(etime,"%Y-%m-%d %H:%M:%S")
-                        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, title, chtxt, btime, etime, opt)
-                else :
-                    print "nothing match"
-
-        elif task["type"]==recdb.REC_KEYWORD_EVERY_SOME_DAYS:#"keyevery,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-            deltatime=task['deltatime']
-            deltaday=task['deltaday']
-            dd=datetime.timedelta(days=int(deltaday))
-            if dtt.days<0:
-                recdb.del_reckey(recdb.REC_KEYWORD_EVERY_SOME_DAYS, title, chtxt, btime)
-                bt=bt+dd
-                et=et+dd
-                btxt=bt.strftime("%Y-%m-%d %H:%M:%S")
-                etxt=et.strftime("%Y-%m-%d %H:%M:%S")
-                recdb.everyreserv(title,chtxt,btxt,etxt,deltatime,opt,deltaday)
-            elif dt<30*60*60:
-                recdb.keyreserv(title,chtxt,btime,etime,deltatime,opt)
-                recdb.del_reckey(recdb.REC_KEYWORD_EVERY_SOME_DAYS, title, chtxt, btime)
-                bt=bt+dd
-                et=et+dd
-                btxt=bt.strftime("%Y-%m-%d %H:%M:%S")
-                etxt=et.strftime("%Y-%m-%d %H:%M:%S")
-                recdb.everyreserv(title,chtxt,btxt,etxt,deltatime,opt,deltaday)
-
-        elif task["type"]==recdb.REC_FINAL_RESERVE:#"rec,"+chtxt+","+title+","+btime+","+etime+","+opt
-            print dt
-            if dt<6*60:
-                recdb.del_reckey(recdb.REC_FINAL_RESERVE, title, chtxt, btime)
-                recdb.rec_reckey(recdb.REC_TS_DECODING, title, chtxt, btime, etime, opt)
-                print "録画開始"
-                pid=os.fork()
-                if pid>0:#親プロセスの場合
-                    ""
-                else:
-                    #print title
-                    tv2avi.timetv2avi(recpath+"/"+title+".avi",chtxt,btime,etime,opt)
-                    if not os.access(recpath+"/"+title+".ts", os.F_OK):
-                        recdb.del_reckey(recdb.REC_TS_DECODING, title, chtxt, btime)
-                        recdb.rec_reckey(recdb.REC_MISS_DECODE, title, chtxt, btime, etime, opt)
-                    else:
-                        recdb.del_reckey(recdb.REC_TS_DECODING, title, chtxt, btime)
-                        tnow=datetime.datetime.now()
-                        bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
-                        et=datetime.datetime.strptime(etime,"%Y-%m-%d %H:%M:%S")
-                        dt=tnow-bt
-                        bt=tnow+datetime.timedelta(seconds=600)
-                        et=et+dt+datetime.timedelta(seconds=600)
-                        btime=bt.strftime("%Y-%m-%d %H:%M:%S")
-                        etime=et.strftime("%Y-%m-%d %H:%M:%S")
-                        recdb.rec_reckey(recdb.REC_ENCODE_QUE,title,chtxt,btime,etime,opt)
-                        recdb.rec_reckey(recdb.REC_FIN_DECODE,title,chtxt,btime,etime,opt)
-                    sys.exit(0)
-
-        elif task["type"]==recdb.REC_ENCODE_QUE:
-            if dt<10*60:
-                if status.getEncoding()<2:
-                    pid=os.fork()
-                    if pid>0:#親プロセスの場合
-                            ""
-                    else:
-                        pin=recpath+"/"+title+".ts"
-                        if re.search("d",opt):
-                            pin=recpath+"/"+title+"sa.avi"
-                        if re.search("5",opt):
-                            pin=recpath+"/"+title+"sa.avi"
-                        pout=recpath+"/"+title+".avi"
-                        print pin+":"+pout+":"+opt
-                        recdb.del_reckey(recdb.REC_ENCODE_QUE,title,chtxt,btime)
-                        recdb.rec_reckey(recdb.REC_ENCODE_LOCAL, title, chtxt, btime, etime, opt)
-                        ts2x264.ts2x264(pin, pout, opt)
-                        sys.exit(0)
-                else:
-                    recdb.del_reckey(recdb.REC_ENCODE_QUE,title,chtxt,btime)
-                    bt=bt+datetime.timedelta(seconds=600)
-                    et=et+datetime.timedelta(seconds=600)
-                    btime=bt.strftime("%Y-%m-%d %H:%M:%S")
-                    etime=et.strftime("%Y-%m-%d %H:%M:%S")
-                    recdb.rec_reckey(recdb.REC_ENCODE_QUE,title,chtxt,btime,etime,opt)
diff --git a/rec10/branches/0.4/src/src/ts2epg.py b/rec10/branches/0.4/src/src/ts2epg.py
deleted file mode 100644 (file)
index 82b11d1..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-#import sys # モジュール属性 argv を取得するため
-import os
-import configreader
-import tv2ts
-import re
-import chdb
-
-
-def write(pout,ch):
-    """
-    tsを取得してepgの入ったxmlとして書き出す
-    """
-    print "ts2epg処理"
-    bctype=chdb.chsearch(ch)['bctype']
-    print ch+":"+bctype
-    time="120"
-    if re.search('cs',bctype):
-        mode="/CS"
-        time="300"
-    elif re.search('bs',bctype):
-        mode="/BS"
-        time="300"
-    else :
-        mode=chdb.bctypesearch('te'+ch)['ontv']
-    tsepg2xml=configreader.getpath("tsepg2xml")
-    tv2ts.tv2tsmix(pout+".ts",ch,"180")
-    exe="export LANG=ja_JP.UTF-8 && /usr/bin/nice -n 19 wine "+tsepg2xml+" "+mode+" "+pout+".ts >"+pout
-    print exe
-    os.system(exe)
-
-        
-
diff --git a/rec10/branches/0.4/src/src/ts2x264.py b/rec10/branches/0.4/src/src/ts2x264.py
deleted file mode 100644 (file)
index 5908d27..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import tv2avi
-import status
-import os
-import time
-import re
-
-def ts2x264(pin,pout,opts):#sizeは"HD"か"SD"
-    pout = pout.encode('utf-8')
-    pin = pin.encode('utf-8')
-    """
-    pinで指定されたファイルをpoutにx264でエンコードして書き出す
-    """
-    
-    status.setEncoding(status.getEncoding()+1)
-    isAnime=0
-    size="SD"
-
-    makemini=0
-    if re.search("a",opts):
-        isAnime=1
-        #print "isAnime"
-    dualpass=0
-    if re.search("2",opts):
-        dualpass=1
-    if re.search("Q",opts):
-        size="WQVGA"
-    if re.search("F",opts):
-        size="FHD"
-    if re.search("H",opts):
-        size="HD"
-    if re.search("S",opts):
-        size="SD"
-    if isAnime==1:
-        encvf="-vf pullup,softskip,pp=l5,"
-    else:
-        encvf="-vf pp=l5,"
-    if size=="SD":
-        encvf=encvf+"scale=720:480,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_SD
-    elif size=="HD":
-        encvf=encvf+"scale=1280:720,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_HD
-    elif size=="FHD":
-        encvf=encvf+"scale=1920:1080,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_FHD
-    elif size=="WQVGA":
-        encvf=encvf+"scale=400:240,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_WQVGA
-    else:
-        encvf=encvf+"scale=1280:720,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_HD
-
-    if dualpass==1:
-        pas1exe="mencoder \'"+pin+"\' -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=1:turbo=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
-        pas2exe="mencoder \'"+pin+"\' -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
-        pas1exe="/usr/bin/nice -n 19 "+pas1exe
-        pas2exe="/usr/bin/nice -n 19 "+pas2exe
-        print pas2exe
-        os.system(pas1exe)
-        print "1pass終了"
-        time.sleep(5)
-        os.system(pas2exe)
-    else:
-        pas1exe="mencoder \'"+pin+"\' -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto -oac mp3lame -lameopts cbr:br=128  -o \'"+pout+"\'"
-        os.system(pas1exe)
-    status.setEncoding(status.getEncoding()-1)
\ No newline at end of file
diff --git a/rec10/branches/0.4/src/src/ts2xvid.py b/rec10/branches/0.4/src/src/ts2xvid.py
deleted file mode 100644 (file)
index 4371678..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import time
-import re
-import status
-import tv2avi
-def ts2xvid(pin,pout,opts):#sizeは"HD"か"SD"
-    """
-    pinで指定されたファイルをpoutにx264でエンコードして書き出す
-    """
-    pout = pout.encode('utf-8')
-    pin = pin.encode('utf-8')
-    isAnime=0
-    size="SD"
-    status.setEncoding(status.getEncoding()+1)
-    makemini=0
-    if re.search("a",opts):
-        isAnime=1
-        #print "isAnime"
-    dualpass=0
-    if re.search("2",opts):
-        dualpass=1
-    if re.search("Q",opts):
-        size="WQVGA"
-    if re.search("F",opts):
-        size="FHD"
-    if re.search("H",opts):
-        size="HD"
-    if re.search("S",opts):
-        size="SD"
-    if isAnime==1:
-        encvf="-vf pullup,softskip,pp=l5,"
-    else:
-        encvf="-vf pp=l5,"
-    if size=="SD":
-        encvf=encvf+"scale=720:480,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_SD
-    elif size=="HD":
-        encvf=encvf+"scale=1280:720,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_HD
-    elif size=="FHD":
-        encvf=encvf+"scale=1920:1080,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_FHD
-    elif size=="WQVGA":
-        encvf=encvf+"scale=400:240,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_WQVGA
-    else:
-        encvf=encvf+"scale=1280:720,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_HD
-
-    if dualpass==1:
-        pas1exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=1:turbo -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
-        pas2exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
-        pas1exe="/usr/bin/nice -n 19 "+pas1exe
-        pas2exe="/usr/bin/nice -n 19 "+pas2exe
-        print pas2exe
-        os.system(pas1exe)
-        print "1pass終了"
-        time.sleep(5)
-        os.system(pas2exe)
-    else:
-        pas1exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2 -oac mp3lame -lameopts cbr:br=128  -o \'"+pout+"\'"
-        os.system(pas1exe)
-    status.setEncoding(status.getEncoding()-1)
\ No newline at end of file
diff --git a/rec10/branches/0.4/src/src/tv2avi.py b/rec10/branches/0.4/src/src/tv2avi.py
deleted file mode 100644 (file)
index b4e682d..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import time
-import chdb
-import configreader
-import datetime
-import os
-import re
-import ts2x264
-import ts2xvid
-import tv2ts
-import recdb
-
-global Bitrate_HD
-global Bitrate_FHD
-global Bitrate_SD
-global Bitrate_WQVGA
-Bitrate_HD="2000"
-Bitrate_FHD="2500"
-Bitrate_SD="1250"
-Bitrate_WQVGA="200"
-
-def timetv2avi(pout, chtxt, btime, etime,opt):
-    bt = datetime.datetime.strptime(btime, "%Y-%m-%d %H:%M:%S")
-    et = datetime.datetime.strptime(etime, "%Y-%m-%d %H:%M:%S")
-    extt = os.path.splitext(pout)
-    tsout = extt[0]
-    #tsout=pout####
-    #print "4"+tsout
-    tnow = datetime.datetime.now()
-    wt = bt-tnow
-    waitt = wt.seconds-5
-    time.sleep(waitt)
-    tnow = datetime.datetime.now()
-    dt = et-tnow
-    rectime = dt.seconds-10
-    rectime = str(rectime)
-    #print tsout+".ts,"+chdb.chtxtsearch(chtxt)['ch']+","+chdb.chtxtsearch(chtxt)['csch']+","+rectime
-    tv2ts.tv2ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'], rectime)
-    aviin = tsout + ".ts"
-    dualaudio = 0
-    pentaaudio = 0
-    if re.search("5",opt):
-        pentaaudio = 1
-    if re.search("d",opt):
-        dualaudio = 1
-    if re.search("\[二\]", pout):
-        dualaudio = 1
-    elif re.search('(二)', pout):
-        dualaudio = 1
-    elif re.search('\(二\)', pout):
-        dualaudio = 1
-    if opt=="":
-        opts=""
-        if chdb.chtxtsearch(chtxt)['bctype'] == 'cs':
-            opts=opts+"S2"
-            if chtxt == "disch":
-                ""
-            elif chtxt == "hisch":
-                ""
-            else:
-                opts=opts+"a"
-        else:
-            opts=opts+"Ha2"
-    else:
-        opts=opt
-    if re.search("x",opt):
-        makexvid = 0
-    else:
-        makexvid = 1
-    if dualaudio == 1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    if pentaaudio ==1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    """
-    if makexvid==1:
-        ts2xvid.ts2xvid(aviin, pout,opts)
-    else:
-        ts2x264.ts2x264(aviin, pout,opts)
-        """
-    bt=datetime.datetime.now()+datetime.timedelta(seconds=600)
-    btime=bt.strftime("%Y-%m-%d %H:%M:%S")
-    et=datetime.datetime.now()+datetime.timedelta(seconds=600)
-    etime=et.strftime("%Y-%m-%d %H:%M:%S")
-    title=os.path.split(tsout)[1]
-    #try:
-    #    os.remove(aviin)
-    #except:
-    #    ""
-def tv2avi(pout, chtxt, btime, etime,opt):
-    bt = datetime.datetime.strptime(btime, "%Y-%m-%d %H:%M:%S")
-    et = datetime.datetime.strptime(etime, "%Y-%m-%d %H:%M:%S")
-    dt = et-bt
-    time = dt.seconds-10
-    time = str(time)
-    extt = os.path.splitext(pout)
-    tsout = extt[0]
-    #tsout=pout####
-    #print "4"+tsout
-    #print tsout+".ts,"+chdb.chtxtsearch(chtxt)['ch']+","+chdb.chtxtsearch(chtxt)['csch']+","+time
-    tv2ts.tv2ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'], time)
-    aviin = tsout + ".ts"
-    dualaudio = 0
-    pentaaudio = 0 
-    if re.search("5",opt):
-        pentaaudio = 1
-    if re.search("d",opt):
-        dualaudio = 1
-    if re.search('\[二\]', pout):
-        dualaudio = 1
-    elif re.search('(二)', pout):
-        dualaudio = 1
-    elif re.search('\(二\)', pout):
-        dualaudio = 1
-    opts=""
-    if chdb.chtxtsearch(chtxt)['bctype'] == 'cs':
-        opts=opts+"S2"
-        if chtxt == "disch":
-            ""
-        elif chtxt == "hisch":
-            ""
-        else:
-            opts=opts+"a"
-    else:
-        opts=opts+"Ha2"
-    if dualaudio == 1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    if pentaaudio ==1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    ts2x264.ts2x264(aviin, pout,opts)
-    #os.remove(aviin)
-def b252avi(pout, chtxt,opt):
-    #bt = datetime.datetime.strptime(btime, "%Y-%m-%d %H:%M:%S")
-    #et = datetime.datetime.strptime(etime, "%Y-%m-%d %H:%M:%S")
-    extt = os.path.splitext(pout)
-    tsout = extt[0]
-    #tsout=pout####
-    #print "4"+tsout
-    #tnow = datetime.datetime.now()
-    #wt = bt-tnow
-    #waitt = wt.seconds-5
-    #time.sleep(waitt)
-    #tnow = datetime.datetime.now()
-    #dt = et-tnow
-    #rectime = dt.seconds-10
-    #rectime = str(rectime)
-    tv2ts.b252ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'])
-    #tv2ts.tv2ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'], rectime)
-    aviin = tsout + ".ts"
-    dualaudio = 0
-    pentaaudio = 0
-    if re.search("5",opt):
-        pentaaudio = 1
-    if re.search("d",opt):
-        dualaudio = 1
-    if re.search('\[二\]', pout):
-        dualaudio = 1
-    elif re.search('(二)', pout):
-        dualaudio = 1
-    elif re.search('\(二\)', pout):
-        dualaudio = 1
-    if opt=="":
-        opts=""
-        if chdb.chtxtsearch(chtxt)['bctype'] == 'cs':
-            opts=opts+"S2"
-            if chtxt == "disch":
-                ""
-            elif chtxt == "hisch":
-                ""
-            else:
-                opts=opts+"a"
-        else:
-            opts=opts+"Ha2"
-    else:
-        opts=opt
-    if re.search("x",opt):
-        makexvid = 0
-    else:
-        makexvid = 1
-    if dualaudio == 1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    if pentaaudio ==1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    if makexvid==1:
-        ts2xvid.ts2xvid(aviin, pout,opts)
-    else:
-        ts2x264.ts2x264(aviin, pout,opts)
-    #try:
-    #    os.remove(aviin)
-    #except:
-    #    ""
-
-    """
-    pout = pout.encode('utf-8')
-    extt = os.path.splitext(pout)
-    tsout = extt[0]
-    #print tsout+".ts,"+chdb.chtxtsearch(chtxt)['ch']+","+chdb.chtxtsearch(chtxt)['csch']+","+time
-    tv2ts.b252ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'])
-    aviin = tsout + ".ts"
-    dualaudio = 0
-    if re.search("d",opt):
-        dualaudio = 1
-    if re.search('\[二\]', pout):
-        dualaudio = 1
-    elif re.search('(二)', pout):
-        dualaudio = 1
-    elif re.search('\(二\)', pout):
-        dualaudio = 1
-    opts=""
-    if chdb.chtxtsearch(chtxt)['bctype'] == 'cs':
-        opts=opts+"S2"
-        if chtxt == "disch":
-            ""
-        elif chtxt == "hisch":
-            ""
-        else:
-            opts=opts+"a"
-    else:
-        opts=opts+"Ha2"
-    if dualaudio == 1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    ts2x264.ts2x264(aviin, pout,opts)
-    #os.remove(aviin)
-
-    """
-
-def dualaudiots2avi(pin, pout):
-    bontsdemux = configreader.getpath('bontsdemux')
-    wine = configreader.getpath('wine')
-    cmdwine = configreader.getpath('cmdwine')
-    bonpin = "Z:\\" + pin[1:]
-    outf = os.path.splitext(pin)[0]
-    bonpout = "Z:\\" + outf[1:]
-    exe = 'wine ' + bontsdemux + " -i \"" + bonpin + "\" -delay 167 -nd -sound 0 -o \"" + bonpout + "\" -start -quit"
-    #print exe
-    exe = 'xvfb-run -a ' + exe
-    #exe='export Display=:2&&'+exe
-    print exe
-    os.system(exe)
-    ffpin1 = pin.replace("ts", "wav")
-    ffpin2 = pin.replace("ts", "m2v")
-    exe = "ffmpeg -y  -i \'" + ffpin1 + "\' -i \'" + ffpin2 + "\' -r 29.97 -vsync 200 -vcodec copy -acodec libmp3lame -async 200 -ab 128k -f avi  \'" + pout + "\'"
-    #print exe
-    os.system(exe)
-    os.remove(ffpin1)
-    os.remove(ffpin2)
-
-def pentaaudiots2avi(pin, pout):
-    bontsdemux = configreader.getpath('bontsdemux')
-    wine = configreader.getpath('wine')
-    cmdwine = configreader.getpath('cmdwine')
-    bonpin = "Z:\\" + pin[1:]
-    outf = os.path.splitext(pin)[0]
-    bonpout = "Z:\\" + outf[1:]
-    exe = 'wine ' + bontsdemux + " -i \"" + bonpin + "\" -delay 167 -nd -sound 3 -o \"" + bonpout + "\" -start -quit"
-    #print exe
-    exe = 'xvfb-run -a ' + exe
-    #exe='export Display=:2&&'+exe
-    print exe
-    os.system(exe)
-    ffpin1 = pin.replace("ts", "wav")
-    ffpin2 = pin.replace("ts", "m2v")
-    exe = "ffmpeg -y  -i \'" + ffpin1 + "\' -i \'" + ffpin2 + "\' -r 29.97 -vsync 200 -vcodec copy -acodec libmp3lame -async 200 -ab 128k -f avi  \'" + pout + "\'"
-    #print exe
-    os.system(exe)
-    os.remove(ffpin1)
-    os.remove(ffpin2)
-
diff --git a/rec10/branches/0.4/src/src/tv2ts.py b/rec10/branches/0.4/src/src/tv2ts.py
deleted file mode 100644 (file)
index 1fce8df..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-#import sys # モジュール属性 argv を取得するため
-import os
-import shutil
-import configreader
-#import japanesenkf
-import random
-import base64
-#import re
-#import glob
-import time
-import hashlib
-#japanesenkf.overrideEncodings()
-
-mypath=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-def tv2tsmix(pout,ch,time):
-    tv2b25ts(pout+".b25",ch,time)
-    b252tsmix(pout+".b25",pout)
-    #os.remove(pout+".b25")
-    if os.access(pout, os.F_OK):
-        try:
-            os.remove(pout+".b25")
-        except:
-            ""
-def tv2ts(pout,ch,csch,time):
-    #print "1"+pout
-    #print "2"+temp[0]
-    #print "3"+temp[1]
-    #tv2tsmix(temp[0]+"mix."+temp[1],ch,time)
-    #tsmix2ts(temp[0]+"mix."+temp[1],pout,csch)
-    #os.remove(temp[0]+"mix."+temp[1])
-    temp=pout.split(".")
-    #t=base64.b16encode(pout)
-    #t=t[0:30]
-    t=hashlib.md5(pout).hexdigest()
-    #m.update(pout)
-    #t=m.hexdigest()
-    #t=str(random.randint(10000,90000))
-    tempt=os.path.split(pout)
-    path=tempt[0]
-    tv2b25ts(pout+".b25",ch,time)
-    b252tsmix(pout+".b25",path+"/"+t+"."+temp[1])
-    tsmix2ts(path+"/"+t+"."+temp[1],pout,csch)
-    #os.remove(path+"/"+t+"."+temp[1])
-    if os.access(pout, os.F_OK):
-        try:
-            os.remove(path+"/"+t+"."+temp[1])
-        except:
-            ""
-
-def b252ts(pout,ch,csch):
-    temp=pout.split(".")
-    #m=hashlib.md5
-    #m.update(pout)
-    #t=m.hexdigest()
-    t=hashlib.md5(pout).hexdigest()
-    #t=base64.b16encode(pout)
-    #t=t[0:30]
-    #t=str(random.randint(10000,90000))
-    tempt=os.path.split(pout)
-    path=tempt[0]
-    #tv2b25ts(pout+".b25",ch,time)
-    b252tsmix(pout+".b25",path+"/"+t+"."+temp[1])
-    tsmix2ts(path+"/"+t+"."+temp[1],pout,csch)
-    #os.remove(path+"/"+t+"."+temp[1])
-    if os.access(pout, os.F_OK):
-        try:
-            os.remove(path+"/"+t+"."+temp[1])
-        except:
-            ""
-
-def tv2b25ts(pout,ch,time):
-    exe=configreader.getpath('recpt1')
-    #print exe+' '+ch
-    doexe=exe+' '+ch+' '+time+' \''+pout+'\''
-    #print doexe
-    os.system(doexe)
-def tv2b25ts_b25(pout,ch,time):
-    exe=configreader.getpath('recpt1')
-    #print exe+' '+ch
-    doexe=exe+' --b25 '+ch+' '+time+' \''+pout+'\''
-    #print doexe
-    os.system(doexe)
-def b252tsmix(pin,pout):
-    #print "t1"
-    exe=configreader.getpath('b25')
-    doexe=exe.encode('utf-8')+u' \''+pin.encode('utf-8')+u'\' \''+pout.encode('utf-8')+u'\''
-    #print doexe
-    doexe="/usr/bin/nice -n 17 "+doexe
-    os.system(doexe)
-    #print "t2"
-def tsmix2ts(pin,pout,csch):#csch=0ならcsの処理をしない
-    wine=configreader.getpath('wine')
-    exe=configreader.getpath('splitt')
-    if csch == "0":
-        time.sleep(1)
-        #mvexe="mv \'"+outpath+"\' \'"+pout+"\'"
-        #print mvexe
-        #print outpath
-        #os.rename(outpath,pout)
-        #i=0
-        shutil.move(pin.encode('utf-8'),pout.encode('utf-8'))
-    else:
-        csopt='-CS'+str(csch)+" "
-        dirname=os.path.dirname(pin)
-        filename=os.path.basename(pin)
-        fn=os.path.splitext(filename)[0]               
-        fileext=os.path.splitext(filename)[1]
-        outpath=dirname+"/"+fn+'_CS1('+str(csch)+')'+fileext
-        #print dirname+" : "+filename+" : "+fn+" : "+fileext
-        path=dirname
-        outpath=os.path.join(dirname,fn+'_CS1('+str(csch)+')'+fileext)
-        time.sleep(1)
-        #doexe=wine+u' '+exe+u' -SD -1SEG -EIT '+csopt+u'-SEPA3 -OUT '+path+'/ '+pin
-        doexe=wine+u' '+exe+u' -SD -1SEG -EIT '+csopt+' -OUT '+path.encode('utf-8')+'/ '+pin.encode('utf-8')
-        doexe='xvfb-run -a -e xvfberror.txt '+doexe
-        doexe="/usr/bin/nice -n 18 "+doexe
-        os.system(doexe)
-        time.sleep(1)
-        for i in xrange(10):
-            try:
-                shutil.move(outpath.encode('utf-8'),pout.encode('utf-8'))
-                break
-            except:
-                time.sleep(1)
-        if os.access(pout, os.F_OK):
-            os.remove(pin.encode('utf-8'))
-        
diff --git a/rec10/branches/0.4/src/src/xml2db.py b/rec10/branches/0.4/src/src/xml2db.py
deleted file mode 100644 (file)
index b2d139d..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-#import sys
-#import os
-import xml.parsers.expat
-import sqlite3
-#import xml.sax as sax
-#from xml.sax.saxutils import DefaultHandler
-flags={}
-lastflag=""
-xmldate={}
-db=""
-bctype=""
-def xml2db(xmlpath,dbpath,bctypetemp):#bctypeは放送種別で'TE'(地デジ)BS,CSがある。地デジの場合は te数字 が入る
-    global db,bctype
-    bctype=bctypetemp
-    #print path
-    createDB(dbpath)
-    #db.execute('drop table tv')
-    #db.execute('drop table ch')
-
-    p=xml.parsers.expat.ParserCreate()
-    p.buffer_text=True
-    p.StartElementHandler=start_element
-    p.EndElementHandler=end_element
-    p.CharacterDataHandler=char_data
-    parseDocument(p,xmlpath)
-
-def createDB(path):
-    global db,bctype,fpath
-    fpath=path
-    db=sqlite3.connect(fpath)
-    print fpath
-    try:
-        db.execute("delete from tv where bctype = \'"+bctype+"\'")
-    except:
-        test=""
-    try:
-        db.execute("delete from ch where bctype = \'"+bctype+"\'")
-    except:
-        test=""
-    try:
-        db.execute('create table tv (bctype TEXT,channel TEXT NOT NULL,start TEXT,stop  TEXT,title TEXT,desc  TEXT)')
-    except:
-        test=""
-    try:
-        db.execute('create table ch (bctype TEXT,channel TEXT NOT NULL,display TEXT)')
-    except:
-        test=""
-    #db.commit()
-    #db.close()
-    #return db
-def writetvDB(datetv):#tvdateは(放送種別,チャンネル,start,stop,title,desc)の形式
-    global db
-    #db=sqlite3.connect(fpath)
-    #print datetv
-    db.execute('insert into tv values '+datetv)
-    #db.commit
-    #return db
-    #db.commit()
-    #db.close()
-def writechDB(datech):#tvdateは(チャンネル,display)の形式
-    global db
-    #db=sqlite3.connect(fpath)
-    #print datech
-    db.execute('insert into ch values '+datech)
-    #db.commit
-    #return db
-    #db.commit()
-    #db.close()
-def parseDocument(p,xmlfile):
-    f=open(xmlfile,'r')
-    p.ParseFile(f)
-    f.close()
-def start_element(name,attrs):
-    global flags,lastflag,xmldate
-    flags[name]=1
-    lastflag=name
-    for (key,val) in attrs.iteritems():
-        xmldate[name+":"+key]=val
-def end_element(name):
-    global flags,lastflag,xmldate,db
-    if flags[name]==1: 
-        if name=="channel":
-            xmld="(\'"+bctype+"\',\'"+xmldate['channel:id']+"\',\'"+xmldate['display-name']+"\')"
-            xmld=unicode(xmld)
-            writechDB(xmld)
-            xmldate['channel:id']=""
-            xmldate['display-name']=""
-            #xmldate={}
-            #print xmld
-        elif name=="programme":
-            
-            xmld="(\'"+bctype+"\',\'"+xmldate['programme:channel']+"\',\'"+xmldate['programme:start'].replace(" +0900","")+"\',\'"+xmldate['programme:stop'].replace(" +0900","")+"\',\'"+xmldate['title'].replace(",","-")+"\',\'"+xmldate['desc']+"\')"
-            xmld=unicode(xmld)
-            writetvDB(xmld)
-            #print xmld
-            xmldate['title']=""
-            xmldate['desc']=""
-            #xmldate[]
-        if name=="tv":
-            """
-            r=db.execute("SELECT * FROM tv")
-            for row in r:
-                print row
-            """
-            db.commit()
-            db.close()
-    flags[name]=0
-def char_data(date):
-    global flags,lastflag,xmldate
-    #string=str(date)
-    date=date.replace("\n","")
-    date=date.replace(" ","")
-    date=date.replace("(","[")
-    date=date.replace(")","]")
-    date=date.replace("(","[")
-    date=date.replace(")","]")
-    date=date.replace("\"","")
-    date=date.replace("\'","")
-    date=date.encode('utf-8')
-    #date=string
-    if xmldate.has_key(lastflag):
-        if xmldate[lastflag]!=date:
-            xmldate[lastflag]+=date
-    else:
-        xmldate[lastflag]=date
-    #if lastflag=='category':
-    #print date
-    #print xmldate
-
-
-
-
diff --git a/rec10/branches/0.4/src/status.py b/rec10/branches/0.4/src/status.py
deleted file mode 100755 (executable)
index 82edf31..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import re
-path=os.path.dirname(os.path.abspath(__file__))+"/"
-
-def getEncoding():
-    f = open(path+'status')
-    lines = f.readlines() # 1行毎にファイル終端まで全て読む(改行文字も含まれる)
-    f.close()
-    ts2avi=0
-    # lines2: リスト。要素は1行の文字列データ
-    for line in lines:
-        if re.search('ts2avi=',line):
-            line=line.replace("ts2avi=","")
-            line=line.replace(" ","")
-            ts2avi=int(line)
-            break
-    return ts2avi
-def setEncoding(tasknum):
-    s = "ts2avi="+str(tasknum)
-    f = open('status', 'w') # 書き込みモードで開く
-    f.write(s) # 引数の文字列をファイルに書き込む
-    f.close() # ファイルを閉じる
diff --git a/rec10/branches/0.4/src/tester.py b/rec10/branches/0.4/src/tester.py
deleted file mode 100644 (file)
index ad61ffb..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import epgdb
-#import ts2epg
-#import xml2db
-#import chdb
-#import tv2ts
-##import tv2avi
-import recdb
-import tv2avi
-import re
-import ts2x264
-#import datetime
-path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-recordingpath="/home/ftpusr/ftp3/Recording/"
-recordedpath="/home/ftpusr/ftp3/Recorded/"
diff --git a/rec10/branches/0.4/src/timerec.py b/rec10/branches/0.4/src/timerec.py
deleted file mode 100644 (file)
index 2e941f5..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import sys
-import time
-import os
-import datetime
-import epgdb
-import configreader
-#import japanesenkf
-import ts2x264
-import tv2avi
-import recdb
-import chdb
-import status
-import re
-#japanesenkf.overrideEncodings()
-recpath=configreader.getpath('recpath')
-path=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-def task():
-    """
-    数分毎に実行されるタスク処理
-    予定によって子プロセスを生成し処理する。
-    """
-    recdb.delete_old("6")
-    tasks=recdb.getnow("1")
-    if len(tasks)==0:
-        update=chdb.update()
-        print "番組表更新処理"
-        print update
-        if len(update)>0:
-            print "番組表を更新"
-            print update
-            pid=os.fork()
-            if pid>0:#親プロセスの場合
-                ""
-            else:#子プロセスの場合 アップデートを行って終了
-                for bctype in update:
-                    time.sleep(1)
-                    print bctype
-                    epgdb.updatebc(bctype)
-                sys.exit(0)
-
-    for task in tasks:
-        try:
-            chtxt=task['chtxt']
-        except:
-            chtxt=""
-        try:
-            title=task['title']
-        except:
-            title=""
-        try:
-            btime=task['btime']
-            bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
-        except:
-            btime=""
-            bt=datetime.datetime.strptime("2009-01-01 00:00:00","%Y-%m-%d %H:%M:%S")
-        try:
-            etime=task['etime']
-            et=datetime.datetime.strptime(etime,"%Y-%m-%d %H:%M:%S")
-        except:
-            etime=""
-            et=datetime.datetime.strptime("2009-01-01 00:00:00","%Y-%m-%d %H:%M:%S")
-        try:
-            opt=task['opt']
-        except:
-            opt=""
-        tnow=datetime.datetime.now()
-        dtt=bt-tnow#
-        dt=dtt.days*24*60*60+dtt.seconds
-        #value=line.split(",")
-        if task["type"]==recdb.REC_RESERVE:#"res,"+chtxt+","+title+","+btime+","+etime+","+opt
-            if dt<58*60:
-                recdb.del_reckey(recdb.REC_RESERVE, title, chtxt, btime)
-                #recdb.delrec(title,chtxt,btime)
-                recdb.rec_reckey(recdb.REC_FINAL_RESERVE, title, chtxt, btime, etime, opt)
-                #recdb.lastrecreserv(title,chtxt,btime,etime,opt)
-                """if dt >30*60:
-                    pid=os.fork()
-                    if pid>0:#親プロセスの場合
-                        ""
-                    else:#子プロセスの場合 アップデートを行って終了
-                        epgdb.update(chtxt)
-                        sys.exit(0)
-                """
-                
-        elif task["type"]==recdb.REC_KEYWORD:#"key,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt
-            deltatime=task['deltatime']
-
-            if dt<30*60:
-                recdatum=epgdb.searchtime(title,btime,deltatime)
-                if len(recdatum)>0:
-                    #recdb.delkey(title,chtxt,btime,deltatime)
-                    recdb.del_reckey(recdb.REC_KEYWORD, title, chtxt, btime)
-                    for recdata in recdatum:
-                        #recdata=recdata[0]
-                        #print recdata
-                        recds=recdata.split(",")
-                        chtxt=recds[0]
-                        title=recds[1]
-                        btime=recds[2]
-                        etime=recds[3]
-                        bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
-                        et=datetime.datetime.strptime(etime,"%Y-%m-%d %H:%M:%S")
-                        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, title, chtxt, btime, etime, opt)
-                else :
-                    print "nothing match"
-        elif task["type"]==recdb.REC_KEYWORD_EVERY_SOME_DAYS:#"keyevery,"+chtxt+","+keyword+","+btime+","+deltatime+","+opt+","+deltaday
-            deltatime=task['deltatime']
-            deltaday=task['deltaday']
-            dd=datetime.timedelta(days=int(deltaday))
-            if dtt.days<0:
-                recdb.del_reckey(recdb.REC_KEYWORD_EVERY_SOME_DAYS, title, chtxt, btime)
-                bt=bt+dd
-                et=et+dd
-                btxt=bt.strftime("%Y-%m-%d %H:%M:%S")
-                etxt=et.strftime("%Y-%m-%d %H:%M:%S")
-                recdb.everyreserv(title,chtxt,btxt,etxt,deltatime,opt,deltaday)
-            elif dt<30*60*60:
-                recdb.keyreserv(title,chtxt,btime,etime,deltatime,opt)
-                recdb.del_reckey(recdb.REC_KEYWORD_EVERY_SOME_DAYS, title, chtxt, btime)
-                #recdb.delevery(keyword,chtxt,btime,deltatime,deltaday)
-                bt=bt+dd
-                et=et+dd
-                btxt=bt.strftime("%Y-%m-%d %H:%M:%S")
-                etxt=et.strftime("%Y-%m-%d %H:%M:%S")
-                recdb.everyreserv(title,chtxt,btxt,etxt,deltatime,opt,deltaday)
-        elif task["type"]==recdb.REC_FINAL_RESERVE:#"rec,"+chtxt+","+title+","+btime+","+etime+","+opt
-            print dt
-            if dt<6*60:
-                #recdb.dellastrec(title,chtxt,btime)
-                recdb.del_reckey(recdb.REC_FINAL_RESERVE, title, chtxt, btime)
-                #recdb.recend(title,chtxt,btime,etime,opt)
-                recdb.rec_reckey(recdb.REC_TS_DECODING, title, chtxt, btime, etime, opt)
-                print "録画開始"
-                pid=os.fork()
-                if pid>0:#親プロセスの場合
-                    ""
-                else:
-                    #print title
-                    tv2avi.timetv2avi(recpath+"/"+title+".avi",chtxt,btime,etime,opt)
-                    if not os.access(recpath+"/"+title+".ts", os.F_OK):
-                        #recdb.del_reckey("tsfin", title, chtxt, btime)
-                        recdb.del_reckey(recdb.REC_TS_DECODING, title, chtxt, btime)
-                        recdb.rec_reckey(recdb.REC_MISS_DECODE, title, chtxt, btime, etime, opt)
-                    else:
-                        recdb.del_reckey(recdb.REC_TS_DECODING, title, chtxt, btime)
-                        tnow=datetime.datetime.now()
-                        bt=datetime.datetime.strptime(btime,"%Y-%m-%d %H:%M:%S")
-                        et=datetime.datetime.strptime(etime,"%Y-%m-%d %H:%M:%S")
-                        dt=tnow-bt
-                        bt=tnow+datetime.timedelta(seconds=600)
-                        et=et+dt+datetime.timedelta(seconds=600)
-                        btime=bt.strftime("%Y-%m-%d %H:%M:%S")
-                        etime=et.strftime("%Y-%m-%d %H:%M:%S")
-                        recdb.rec_reckey(recdb.REC_ENCODE_QUE,title,chtxt,btime,etime,opt)
-                        recdb.rec_reckey(recdb.REC_FIN_DECODE,title,chtxt,btime,etime,opt)
-                    sys.exit(0)
-        elif task["type"]==recdb.REC_ENCODE_QUE:
-            if dt<10*60:
-                if status.getEncoding()<2:
-                    pid=os.fork()
-                    if pid>0:#親プロセスの場合
-                            ""
-                    else:
-                        #print title
-                        #tv2avi.b252avi(recpath+"/"+title+".avi", chtxt,opt)
-                        pin=recpath+"/"+title+".ts"
-                        if re.search("d",opt):
-                            pin=recpath+"/"+title+"sa.avi"
-                        if re.search("5",opt):
-                            pin=recpath+"/"+title+"sa.avi"
-                        pout=recpath+"/"+title+".avi"
-                        print pin+":"+pout+":"+opt
-                        recdb.del_reckey(recdb.REC_ENCODE_QUE,title,chtxt,btime)
-                        recdb.rec_reckey("local", title, chtxt, btime, etime, opt)
-                        ts2x264.ts2x264(pin, pout, opt)
-                        
-                        #tv2avi.timetv2avi(recpath+"/"+title+".avi",chtxt,btime,etime,opt)
-                        sys.exit(0)
-                else:
-                    recdb.del_reckey(recdb.REC_ENCODE_QUE,title,chtxt,btime)
-                    bt=bt+datetime.timedelta(seconds=600)
-                    et=et+datetime.timedelta(seconds=600)
-                    btime=bt.strftime("%Y-%m-%d %H:%M:%S")
-                    etime=et.strftime("%Y-%m-%d %H:%M:%S")
-                    recdb.rec_reckey(recdb.REC_ENCODE_QUE,title,chtxt,btime,etime,opt)
diff --git a/rec10/branches/0.4/src/ts2epg.py b/rec10/branches/0.4/src/ts2epg.py
deleted file mode 100644 (file)
index 82b11d1..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-#import sys # モジュール属性 argv を取得するため
-import os
-import configreader
-import tv2ts
-import re
-import chdb
-
-
-def write(pout,ch):
-    """
-    tsを取得してepgの入ったxmlとして書き出す
-    """
-    print "ts2epg処理"
-    bctype=chdb.chsearch(ch)['bctype']
-    print ch+":"+bctype
-    time="120"
-    if re.search('cs',bctype):
-        mode="/CS"
-        time="300"
-    elif re.search('bs',bctype):
-        mode="/BS"
-        time="300"
-    else :
-        mode=chdb.bctypesearch('te'+ch)['ontv']
-    tsepg2xml=configreader.getpath("tsepg2xml")
-    tv2ts.tv2tsmix(pout+".ts",ch,"180")
-    exe="export LANG=ja_JP.UTF-8 && /usr/bin/nice -n 19 wine "+tsepg2xml+" "+mode+" "+pout+".ts >"+pout
-    print exe
-    os.system(exe)
-
-        
-
diff --git a/rec10/branches/0.4/src/ts2x264.py b/rec10/branches/0.4/src/ts2x264.py
deleted file mode 100644 (file)
index 5908d27..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import tv2avi
-import status
-import os
-import time
-import re
-
-def ts2x264(pin,pout,opts):#sizeは"HD"か"SD"
-    pout = pout.encode('utf-8')
-    pin = pin.encode('utf-8')
-    """
-    pinで指定されたファイルをpoutにx264でエンコードして書き出す
-    """
-    
-    status.setEncoding(status.getEncoding()+1)
-    isAnime=0
-    size="SD"
-
-    makemini=0
-    if re.search("a",opts):
-        isAnime=1
-        #print "isAnime"
-    dualpass=0
-    if re.search("2",opts):
-        dualpass=1
-    if re.search("Q",opts):
-        size="WQVGA"
-    if re.search("F",opts):
-        size="FHD"
-    if re.search("H",opts):
-        size="HD"
-    if re.search("S",opts):
-        size="SD"
-    if isAnime==1:
-        encvf="-vf pullup,softskip,pp=l5,"
-    else:
-        encvf="-vf pp=l5,"
-    if size=="SD":
-        encvf=encvf+"scale=720:480,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_SD
-    elif size=="HD":
-        encvf=encvf+"scale=1280:720,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_HD
-    elif size=="FHD":
-        encvf=encvf+"scale=1920:1080,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_FHD
-    elif size=="WQVGA":
-        encvf=encvf+"scale=400:240,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_WQVGA
-    else:
-        encvf=encvf+"scale=1280:720,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_HD
-
-    if dualpass==1:
-        pas1exe="mencoder \'"+pin+"\' -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=1:turbo=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
-        pas2exe="mencoder \'"+pin+"\' -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
-        pas1exe="/usr/bin/nice -n 19 "+pas1exe
-        pas2exe="/usr/bin/nice -n 19 "+pas2exe
-        print pas2exe
-        os.system(pas1exe)
-        print "1pass終了"
-        time.sleep(5)
-        os.system(pas2exe)
-    else:
-        pas1exe="mencoder \'"+pin+"\' -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto -oac mp3lame -lameopts cbr:br=128  -o \'"+pout+"\'"
-        os.system(pas1exe)
-    status.setEncoding(status.getEncoding()-1)
\ No newline at end of file
diff --git a/rec10/branches/0.4/src/ts2xvid.py b/rec10/branches/0.4/src/ts2xvid.py
deleted file mode 100644 (file)
index 4371678..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import os
-import time
-import re
-import status
-import tv2avi
-def ts2xvid(pin,pout,opts):#sizeは"HD"か"SD"
-    """
-    pinで指定されたファイルをpoutにx264でエンコードして書き出す
-    """
-    pout = pout.encode('utf-8')
-    pin = pin.encode('utf-8')
-    isAnime=0
-    size="SD"
-    status.setEncoding(status.getEncoding()+1)
-    makemini=0
-    if re.search("a",opts):
-        isAnime=1
-        #print "isAnime"
-    dualpass=0
-    if re.search("2",opts):
-        dualpass=1
-    if re.search("Q",opts):
-        size="WQVGA"
-    if re.search("F",opts):
-        size="FHD"
-    if re.search("H",opts):
-        size="HD"
-    if re.search("S",opts):
-        size="SD"
-    if isAnime==1:
-        encvf="-vf pullup,softskip,pp=l5,"
-    else:
-        encvf="-vf pp=l5,"
-    if size=="SD":
-        encvf=encvf+"scale=720:480,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_SD
-    elif size=="HD":
-        encvf=encvf+"scale=1280:720,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_HD
-    elif size=="FHD":
-        encvf=encvf+"scale=1920:1080,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_FHD
-    elif size=="WQVGA":
-        encvf=encvf+"scale=400:240,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_WQVGA
-    else:
-        encvf=encvf+"scale=1280:720,harddup"
-        bitrate="bitrate="+tv2avi.Bitrate_HD
-
-    if dualpass==1:
-        pas1exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=1:turbo -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
-        pas2exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
-        pas1exe="/usr/bin/nice -n 19 "+pas1exe
-        pas2exe="/usr/bin/nice -n 19 "+pas2exe
-        print pas2exe
-        os.system(pas1exe)
-        print "1pass終了"
-        time.sleep(5)
-        os.system(pas2exe)
-    else:
-        pas1exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2 -oac mp3lame -lameopts cbr:br=128  -o \'"+pout+"\'"
-        os.system(pas1exe)
-    status.setEncoding(status.getEncoding()-1)
\ No newline at end of file
diff --git a/rec10/branches/0.4/src/tv2avi.py b/rec10/branches/0.4/src/tv2avi.py
deleted file mode 100644 (file)
index b4e682d..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-import time
-import chdb
-import configreader
-import datetime
-import os
-import re
-import ts2x264
-import ts2xvid
-import tv2ts
-import recdb
-
-global Bitrate_HD
-global Bitrate_FHD
-global Bitrate_SD
-global Bitrate_WQVGA
-Bitrate_HD="2000"
-Bitrate_FHD="2500"
-Bitrate_SD="1250"
-Bitrate_WQVGA="200"
-
-def timetv2avi(pout, chtxt, btime, etime,opt):
-    bt = datetime.datetime.strptime(btime, "%Y-%m-%d %H:%M:%S")
-    et = datetime.datetime.strptime(etime, "%Y-%m-%d %H:%M:%S")
-    extt = os.path.splitext(pout)
-    tsout = extt[0]
-    #tsout=pout####
-    #print "4"+tsout
-    tnow = datetime.datetime.now()
-    wt = bt-tnow
-    waitt = wt.seconds-5
-    time.sleep(waitt)
-    tnow = datetime.datetime.now()
-    dt = et-tnow
-    rectime = dt.seconds-10
-    rectime = str(rectime)
-    #print tsout+".ts,"+chdb.chtxtsearch(chtxt)['ch']+","+chdb.chtxtsearch(chtxt)['csch']+","+rectime
-    tv2ts.tv2ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'], rectime)
-    aviin = tsout + ".ts"
-    dualaudio = 0
-    pentaaudio = 0
-    if re.search("5",opt):
-        pentaaudio = 1
-    if re.search("d",opt):
-        dualaudio = 1
-    if re.search("\[二\]", pout):
-        dualaudio = 1
-    elif re.search('(二)', pout):
-        dualaudio = 1
-    elif re.search('\(二\)', pout):
-        dualaudio = 1
-    if opt=="":
-        opts=""
-        if chdb.chtxtsearch(chtxt)['bctype'] == 'cs':
-            opts=opts+"S2"
-            if chtxt == "disch":
-                ""
-            elif chtxt == "hisch":
-                ""
-            else:
-                opts=opts+"a"
-        else:
-            opts=opts+"Ha2"
-    else:
-        opts=opt
-    if re.search("x",opt):
-        makexvid = 0
-    else:
-        makexvid = 1
-    if dualaudio == 1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    if pentaaudio ==1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    """
-    if makexvid==1:
-        ts2xvid.ts2xvid(aviin, pout,opts)
-    else:
-        ts2x264.ts2x264(aviin, pout,opts)
-        """
-    bt=datetime.datetime.now()+datetime.timedelta(seconds=600)
-    btime=bt.strftime("%Y-%m-%d %H:%M:%S")
-    et=datetime.datetime.now()+datetime.timedelta(seconds=600)
-    etime=et.strftime("%Y-%m-%d %H:%M:%S")
-    title=os.path.split(tsout)[1]
-    #try:
-    #    os.remove(aviin)
-    #except:
-    #    ""
-def tv2avi(pout, chtxt, btime, etime,opt):
-    bt = datetime.datetime.strptime(btime, "%Y-%m-%d %H:%M:%S")
-    et = datetime.datetime.strptime(etime, "%Y-%m-%d %H:%M:%S")
-    dt = et-bt
-    time = dt.seconds-10
-    time = str(time)
-    extt = os.path.splitext(pout)
-    tsout = extt[0]
-    #tsout=pout####
-    #print "4"+tsout
-    #print tsout+".ts,"+chdb.chtxtsearch(chtxt)['ch']+","+chdb.chtxtsearch(chtxt)['csch']+","+time
-    tv2ts.tv2ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'], time)
-    aviin = tsout + ".ts"
-    dualaudio = 0
-    pentaaudio = 0 
-    if re.search("5",opt):
-        pentaaudio = 1
-    if re.search("d",opt):
-        dualaudio = 1
-    if re.search('\[二\]', pout):
-        dualaudio = 1
-    elif re.search('(二)', pout):
-        dualaudio = 1
-    elif re.search('\(二\)', pout):
-        dualaudio = 1
-    opts=""
-    if chdb.chtxtsearch(chtxt)['bctype'] == 'cs':
-        opts=opts+"S2"
-        if chtxt == "disch":
-            ""
-        elif chtxt == "hisch":
-            ""
-        else:
-            opts=opts+"a"
-    else:
-        opts=opts+"Ha2"
-    if dualaudio == 1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    if pentaaudio ==1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    ts2x264.ts2x264(aviin, pout,opts)
-    #os.remove(aviin)
-def b252avi(pout, chtxt,opt):
-    #bt = datetime.datetime.strptime(btime, "%Y-%m-%d %H:%M:%S")
-    #et = datetime.datetime.strptime(etime, "%Y-%m-%d %H:%M:%S")
-    extt = os.path.splitext(pout)
-    tsout = extt[0]
-    #tsout=pout####
-    #print "4"+tsout
-    #tnow = datetime.datetime.now()
-    #wt = bt-tnow
-    #waitt = wt.seconds-5
-    #time.sleep(waitt)
-    #tnow = datetime.datetime.now()
-    #dt = et-tnow
-    #rectime = dt.seconds-10
-    #rectime = str(rectime)
-    tv2ts.b252ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'])
-    #tv2ts.tv2ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'], rectime)
-    aviin = tsout + ".ts"
-    dualaudio = 0
-    pentaaudio = 0
-    if re.search("5",opt):
-        pentaaudio = 1
-    if re.search("d",opt):
-        dualaudio = 1
-    if re.search('\[二\]', pout):
-        dualaudio = 1
-    elif re.search('(二)', pout):
-        dualaudio = 1
-    elif re.search('\(二\)', pout):
-        dualaudio = 1
-    if opt=="":
-        opts=""
-        if chdb.chtxtsearch(chtxt)['bctype'] == 'cs':
-            opts=opts+"S2"
-            if chtxt == "disch":
-                ""
-            elif chtxt == "hisch":
-                ""
-            else:
-                opts=opts+"a"
-        else:
-            opts=opts+"Ha2"
-    else:
-        opts=opt
-    if re.search("x",opt):
-        makexvid = 0
-    else:
-        makexvid = 1
-    if dualaudio == 1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    if pentaaudio ==1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    if makexvid==1:
-        ts2xvid.ts2xvid(aviin, pout,opts)
-    else:
-        ts2x264.ts2x264(aviin, pout,opts)
-    #try:
-    #    os.remove(aviin)
-    #except:
-    #    ""
-
-    """
-    pout = pout.encode('utf-8')
-    extt = os.path.splitext(pout)
-    tsout = extt[0]
-    #print tsout+".ts,"+chdb.chtxtsearch(chtxt)['ch']+","+chdb.chtxtsearch(chtxt)['csch']+","+time
-    tv2ts.b252ts(tsout + ".ts", chdb.chtxtsearch(chtxt)['ch'], chdb.chtxtsearch(chtxt)['csch'])
-    aviin = tsout + ".ts"
-    dualaudio = 0
-    if re.search("d",opt):
-        dualaudio = 1
-    if re.search('\[二\]', pout):
-        dualaudio = 1
-    elif re.search('(二)', pout):
-        dualaudio = 1
-    elif re.search('\(二\)', pout):
-        dualaudio = 1
-    opts=""
-    if chdb.chtxtsearch(chtxt)['bctype'] == 'cs':
-        opts=opts+"S2"
-        if chtxt == "disch":
-            ""
-        elif chtxt == "hisch":
-            ""
-        else:
-            opts=opts+"a"
-    else:
-        opts=opts+"Ha2"
-    if dualaudio == 1:
-        dualaudiots2avi(aviin, tsout + "sa.avi")
-        aviin = tsout + "sa.avi"
-    ts2x264.ts2x264(aviin, pout,opts)
-    #os.remove(aviin)
-
-    """
-
-def dualaudiots2avi(pin, pout):
-    bontsdemux = configreader.getpath('bontsdemux')
-    wine = configreader.getpath('wine')
-    cmdwine = configreader.getpath('cmdwine')
-    bonpin = "Z:\\" + pin[1:]
-    outf = os.path.splitext(pin)[0]
-    bonpout = "Z:\\" + outf[1:]
-    exe = 'wine ' + bontsdemux + " -i \"" + bonpin + "\" -delay 167 -nd -sound 0 -o \"" + bonpout + "\" -start -quit"
-    #print exe
-    exe = 'xvfb-run -a ' + exe
-    #exe='export Display=:2&&'+exe
-    print exe
-    os.system(exe)
-    ffpin1 = pin.replace("ts", "wav")
-    ffpin2 = pin.replace("ts", "m2v")
-    exe = "ffmpeg -y  -i \'" + ffpin1 + "\' -i \'" + ffpin2 + "\' -r 29.97 -vsync 200 -vcodec copy -acodec libmp3lame -async 200 -ab 128k -f avi  \'" + pout + "\'"
-    #print exe
-    os.system(exe)
-    os.remove(ffpin1)
-    os.remove(ffpin2)
-
-def pentaaudiots2avi(pin, pout):
-    bontsdemux = configreader.getpath('bontsdemux')
-    wine = configreader.getpath('wine')
-    cmdwine = configreader.getpath('cmdwine')
-    bonpin = "Z:\\" + pin[1:]
-    outf = os.path.splitext(pin)[0]
-    bonpout = "Z:\\" + outf[1:]
-    exe = 'wine ' + bontsdemux + " -i \"" + bonpin + "\" -delay 167 -nd -sound 3 -o \"" + bonpout + "\" -start -quit"
-    #print exe
-    exe = 'xvfb-run -a ' + exe
-    #exe='export Display=:2&&'+exe
-    print exe
-    os.system(exe)
-    ffpin1 = pin.replace("ts", "wav")
-    ffpin2 = pin.replace("ts", "m2v")
-    exe = "ffmpeg -y  -i \'" + ffpin1 + "\' -i \'" + ffpin2 + "\' -r 29.97 -vsync 200 -vcodec copy -acodec libmp3lame -async 200 -ab 128k -f avi  \'" + pout + "\'"
-    #print exe
-    os.system(exe)
-    os.remove(ffpin1)
-    os.remove(ffpin2)
-
diff --git a/rec10/branches/0.4/src/tv2ts.py b/rec10/branches/0.4/src/tv2ts.py
deleted file mode 100644 (file)
index 1fce8df..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-#import sys # モジュール属性 argv を取得するため
-import os
-import shutil
-import configreader
-#import japanesenkf
-import random
-import base64
-#import re
-#import glob
-import time
-import hashlib
-#japanesenkf.overrideEncodings()
-
-mypath=str(os.path.dirname(os.path.abspath(__file__)))+"/"
-def tv2tsmix(pout,ch,time):
-    tv2b25ts(pout+".b25",ch,time)
-    b252tsmix(pout+".b25",pout)
-    #os.remove(pout+".b25")
-    if os.access(pout, os.F_OK):
-        try:
-            os.remove(pout+".b25")
-        except:
-            ""
-def tv2ts(pout,ch,csch,time):
-    #print "1"+pout
-    #print "2"+temp[0]
-    #print "3"+temp[1]
-    #tv2tsmix(temp[0]+"mix."+temp[1],ch,time)
-    #tsmix2ts(temp[0]+"mix."+temp[1],pout,csch)
-    #os.remove(temp[0]+"mix."+temp[1])
-    temp=pout.split(".")
-    #t=base64.b16encode(pout)
-    #t=t[0:30]
-    t=hashlib.md5(pout).hexdigest()
-    #m.update(pout)
-    #t=m.hexdigest()
-    #t=str(random.randint(10000,90000))
-    tempt=os.path.split(pout)
-    path=tempt[0]
-    tv2b25ts(pout+".b25",ch,time)
-    b252tsmix(pout+".b25",path+"/"+t+"."+temp[1])
-    tsmix2ts(path+"/"+t+"."+temp[1],pout,csch)
-    #os.remove(path+"/"+t+"."+temp[1])
-    if os.access(pout, os.F_OK):
-        try:
-            os.remove(path+"/"+t+"."+temp[1])
-        except:
-            ""
-
-def b252ts(pout,ch,csch):
-    temp=pout.split(".")
-    #m=hashlib.md5
-    #m.update(pout)
-    #t=m.hexdigest()
-    t=hashlib.md5(pout).hexdigest()
-    #t=base64.b16encode(pout)
-    #t=t[0:30]
-    #t=str(random.randint(10000,90000))
-    tempt=os.path.split(pout)
-    path=tempt[0]
-    #tv2b25ts(pout+".b25",ch,time)
-    b252tsmix(pout+".b25",path+"/"+t+"."+temp[1])
-    tsmix2ts(path+"/"+t+"."+temp[1],pout,csch)
-    #os.remove(path+"/"+t+"."+temp[1])
-    if os.access(pout, os.F_OK):
-        try:
-            os.remove(path+"/"+t+"."+temp[1])
-        except:
-            ""
-
-def tv2b25ts(pout,ch,time):
-    exe=configreader.getpath('recpt1')
-    #print exe+' '+ch
-    doexe=exe+' '+ch+' '+time+' \''+pout+'\''
-    #print doexe
-    os.system(doexe)
-def tv2b25ts_b25(pout,ch,time):
-    exe=configreader.getpath('recpt1')
-    #print exe+' '+ch
-    doexe=exe+' --b25 '+ch+' '+time+' \''+pout+'\''
-    #print doexe
-    os.system(doexe)
-def b252tsmix(pin,pout):
-    #print "t1"
-    exe=configreader.getpath('b25')
-    doexe=exe.encode('utf-8')+u' \''+pin.encode('utf-8')+u'\' \''+pout.encode('utf-8')+u'\''
-    #print doexe
-    doexe="/usr/bin/nice -n 17 "+doexe
-    os.system(doexe)
-    #print "t2"
-def tsmix2ts(pin,pout,csch):#csch=0ならcsの処理をしない
-    wine=configreader.getpath('wine')
-    exe=configreader.getpath('splitt')
-    if csch == "0":
-        time.sleep(1)
-        #mvexe="mv \'"+outpath+"\' \'"+pout+"\'"
-        #print mvexe
-        #print outpath
-        #os.rename(outpath,pout)
-        #i=0
-        shutil.move(pin.encode('utf-8'),pout.encode('utf-8'))
-    else:
-        csopt='-CS'+str(csch)+" "
-        dirname=os.path.dirname(pin)
-        filename=os.path.basename(pin)
-        fn=os.path.splitext(filename)[0]               
-        fileext=os.path.splitext(filename)[1]
-        outpath=dirname+"/"+fn+'_CS1('+str(csch)+')'+fileext
-        #print dirname+" : "+filename+" : "+fn+" : "+fileext
-        path=dirname
-        outpath=os.path.join(dirname,fn+'_CS1('+str(csch)+')'+fileext)
-        time.sleep(1)
-        #doexe=wine+u' '+exe+u' -SD -1SEG -EIT '+csopt+u'-SEPA3 -OUT '+path+'/ '+pin
-        doexe=wine+u' '+exe+u' -SD -1SEG -EIT '+csopt+' -OUT '+path.encode('utf-8')+'/ '+pin.encode('utf-8')
-        doexe='xvfb-run -a -e xvfberror.txt '+doexe
-        doexe="/usr/bin/nice -n 18 "+doexe
-        os.system(doexe)
-        time.sleep(1)
-        for i in xrange(10):
-            try:
-                shutil.move(outpath.encode('utf-8'),pout.encode('utf-8'))
-                break
-            except:
-                time.sleep(1)
-        if os.access(pout, os.F_OK):
-            os.remove(pin.encode('utf-8'))
-        
diff --git a/rec10/branches/0.4/src/xml2db.py b/rec10/branches/0.4/src/xml2db.py
deleted file mode 100644 (file)
index b2d139d..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/python
-# coding: UTF-8
-# Rec10 TS Recording Tools
-# Copyright (C) 2009 Yukikaze
-#import sys
-#import os
-import xml.parsers.expat
-import sqlite3
-#import xml.sax as sax
-#from xml.sax.saxutils import DefaultHandler
-flags={}
-lastflag=""
-xmldate={}
-db=""
-bctype=""
-def xml2db(xmlpath,dbpath,bctypetemp):#bctypeは放送種別で'TE'(地デジ)BS,CSがある。地デジの場合は te数字 が入る
-    global db,bctype
-    bctype=bctypetemp
-    #print path
-    createDB(dbpath)
-    #db.execute('drop table tv')
-    #db.execute('drop table ch')
-
-    p=xml.parsers.expat.ParserCreate()
-    p.buffer_text=True
-    p.StartElementHandler=start_element
-    p.EndElementHandler=end_element
-    p.CharacterDataHandler=char_data
-    parseDocument(p,xmlpath)
-
-def createDB(path):
-    global db,bctype,fpath
-    fpath=path
-    db=sqlite3.connect(fpath)
-    print fpath
-    try:
-        db.execute("delete from tv where bctype = \'"+bctype+"\'")
-    except:
-        test=""
-    try:
-        db.execute("delete from ch where bctype = \'"+bctype+"\'")
-    except:
-        test=""
-    try:
-        db.execute('create table tv (bctype TEXT,channel TEXT NOT NULL,start TEXT,stop  TEXT,title TEXT,desc  TEXT)')
-    except:
-        test=""
-    try:
-        db.execute('create table ch (bctype TEXT,channel TEXT NOT NULL,display TEXT)')
-    except:
-        test=""
-    #db.commit()
-    #db.close()
-    #return db
-def writetvDB(datetv):#tvdateは(放送種別,チャンネル,start,stop,title,desc)の形式
-    global db
-    #db=sqlite3.connect(fpath)
-    #print datetv
-    db.execute('insert into tv values '+datetv)
-    #db.commit
-    #return db
-    #db.commit()
-    #db.close()
-def writechDB(datech):#tvdateは(チャンネル,display)の形式
-    global db
-    #db=sqlite3.connect(fpath)
-    #print datech
-    db.execute('insert into ch values '+datech)
-    #db.commit
-    #return db
-    #db.commit()
-    #db.close()
-def parseDocument(p,xmlfile):
-    f=open(xmlfile,'r')
-    p.ParseFile(f)
-    f.close()
-def start_element(name,attrs):
-    global flags,lastflag,xmldate
-    flags[name]=1
-    lastflag=name
-    for (key,val) in attrs.iteritems():
-        xmldate[name+":"+key]=val
-def end_element(name):
-    global flags,lastflag,xmldate,db
-    if flags[name]==1: 
-        if name=="channel":
-            xmld="(\'"+bctype+"\',\'"+xmldate['channel:id']+"\',\'"+xmldate['display-name']+"\')"
-            xmld=unicode(xmld)
-            writechDB(xmld)
-            xmldate['channel:id']=""
-            xmldate['display-name']=""
-            #xmldate={}
-            #print xmld
-        elif name=="programme":
-            
-            xmld="(\'"+bctype+"\',\'"+xmldate['programme:channel']+"\',\'"+xmldate['programme:start'].replace(" +0900","")+"\',\'"+xmldate['programme:stop'].replace(" +0900","")+"\',\'"+xmldate['title'].replace(",","-")+"\',\'"+xmldate['desc']+"\')"
-            xmld=unicode(xmld)
-            writetvDB(xmld)
-            #print xmld
-            xmldate['title']=""
-            xmldate['desc']=""
-            #xmldate[]
-        if name=="tv":
-            """
-            r=db.execute("SELECT * FROM tv")
-            for row in r:
-                print row
-            """
-            db.commit()
-            db.close()
-    flags[name]=0
-def char_data(date):
-    global flags,lastflag,xmldate
-    #string=str(date)
-    date=date.replace("\n","")
-    date=date.replace(" ","")
-    date=date.replace("(","[")
-    date=date.replace(")","]")
-    date=date.replace("(","[")
-    date=date.replace(")","]")
-    date=date.replace("\"","")
-    date=date.replace("\'","")
-    date=date.encode('utf-8')
-    #date=string
-    if xmldate.has_key(lastflag):
-        if xmldate[lastflag]!=date:
-            xmldate[lastflag]+=date
-    else:
-        xmldate[lastflag]=date
-    #if lastflag=='category':
-    #print date
-    #print xmldate
-
-
-
-