update 2016-11-02 b1

1. created project
2. initialized ir encode and decode source files
This commit is contained in:
strawmanbobi
2016-11-02 22:29:13 +08:00
commit 2d43854e21
57 changed files with 11062 additions and 0 deletions

33
src/ir_encoder/merge.py Normal file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env python
# coding=utf-8
import sys
import os
for root, dirs, files in os.walk(sys.argv[1]):
for i in files:
fileType = i.split('.')
if cmp(fileType[1], 'bin') == 0:
print root + i
print "========================list==========================="
remotePath = sys.argv[2]
fileType2 = remotePath.split('.')
if cmp(fileType2[-1], 'bin') == 0:
prottype = fileType2[0].split('#')
print(prottype[0])
print(fileType[0])
if cmp(prottype[0].split('/')[-1], fileType[0]) == 0:
outname = remotePath.split('#')
binary = open(sys.argv[3] + "/ykir_"+outname[0].split('/')[-1]+"_"+outname[1], 'wb')
prot_file = open(root+i, "rb")
remote_file = open(remotePath, "rb")
binary.write(prot_file.read())
binary.write(remote_file.read())
binary.close()
prot_file.close()
remote_file.close()
print remotePath
print
print