bat文件添加

dev_chengFeng
gaoxin 2020-07-06 11:58:59 +08:00
parent 1251f17d4d
commit 4508220751
6 changed files with 22 additions and 4 deletions

View File

@ -1,3 +1,2 @@
python main.py
python "t.Export()"
python main.py -e
pause

View File

@ -0,0 +1,2 @@
python main.py -r
pause

View File

@ -0,0 +1,2 @@
python main.py -t english
pause

View File

@ -0,0 +1,2 @@
python main.py -t korean
pause

View File

@ -0,0 +1,2 @@
python main.py -t tchinese
pause

View File

@ -5,7 +5,7 @@ from xlutils import copy
import xlwt
import xlrd
import openpyxl
import os
import os, sys
import shutil
#
@ -260,7 +260,7 @@ class Test():
_rSheet = _rBook.sheet_by_index(0)
_wBook = openpyxl.load_workbook(_filePath)#copy.copy(_rBook)
_wSheet = _wBook.worksheets[0]
print(fileName + " " + str(_colNum))
_cData = _rSheet.col_values(_colNum)
for _index in range(len(_cData)):
if _index >= self._col_offset:
@ -293,6 +293,17 @@ class Test():
t = Test()
t.init()
if sys.argv[1] == '-e':
t.Export()
elif sys.argv[1] == '-r':
t.ReplaceChanges()
elif sys.argv[1] == '-t':
t.Translate(sys.argv[2])
pass
# t.Export()
# t.ReplaceChanges()
# t.Translate("english")