cpg資料庫處理_找到未提取的pdf,存放於資料夾chinese_undeal_pdfs
move_unextracted_pdfs.py
# -*- coding: utf-8 -*-
"""created on sun sep 18 17:06:15 2016
@author: administrator
"""# -*- coding: utf-8 -*-
"""spyder editor
this is a temporary script file.
"""import shutil,xlrd
excelfilename="unextracted.xlsx"
sheetname="sheet1"
data = xlrd.open_workbook(excelfilename)
table = data.sheets()[0]
#總pdf列表
totalpdfs_list=table.col_values(0)[1:]
extractedpdfs_list=table.col_values(1)[1:]
#已經提取的pdf檔案列表
extractedpdfs_list1=[i for i in extractedpdfs_list if i!=""]
#未被提取的pdf檔案列表
unextractedpdfs_list=[i for i in totalpdfs_list if i not in extractedpdfs_list1]
#移動失敗的檔案列表
failed_files=
#移動函式,目錄裡不匹配檔案移入unmatching_file資料夾
def removefile():
dir="chinese_undeal_pdfs"
for file in unextractedpdfs_list:
try:
shutil.move(file,dir)
except:
continue
removefile()
移動英語pdf檔案
remove_englishfile.py
# -*- coding: utf-8 -*-
"""spyder editor
remove_englishfile.py
this is a temporary script file.
"""import shutil,xlrd
excelfilename="be_cpg_english.xlsx"
sheetname="sheet1"
data = xlrd.open_workbook(excelfilename)
table = data.sheets()[0]
englishfile_list=table.col_values(0)[1:]
#移動函式,目錄裡不匹配檔案移入unmatching_file資料夾
oracle資料庫未開啟解決的方法
microsoft windows 版本號 6.1.7601 c users administrator c users administrator sqlplus as sysdba sql plus release 11.2.0.1.0 production on 星期三 10月 29 09 5...
資料庫壞塊的處理
當 oracle 資料庫出現壞塊時,oracle 會在警告日誌檔案 alert sid.log 中記錄壞塊的資訊 ora 01578 oracle data block corrupted file 7,block ora 01110 data file oracle1 oradata v920 o...
簡單的資料庫處理
1.對資料庫表查詢處理 string id 1 connection con getconnection getconnection 是連線資料庫 1 string sql selcet from wenxian where id preparedstatement prepstmt con.pre...