Commit bd31b59d authored by litaolemo's avatar litaolemo

update

parent ad62913c
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
# @Author : litao # @Author : litao
from PIL import Image from PIL import Image
import pytesseract,os,re import pytesseract,re
import cv2 # import cv2
import argparse import argparse
import cv2
import os import os
# construct the argument parse and parse the arguments # construct the argument parse and parse the arguments
ap = argparse.ArgumentParser() ap = argparse.ArgumentParser()
......
...@@ -131,7 +131,7 @@ def send_file_email(file_path, data_str, email_group=[], ...@@ -131,7 +131,7 @@ def send_file_email(file_path, data_str, email_group=[],
if __name__ == '__main__': if __name__ == '__main__':
send_file_email("",'',sender="litao@igengmei.com",email_group=["litao@igengmei.com"],email_msg_body_str="test",title_str="test",cc_group=["litao@igengmei.com"],file="/srv/apps/readelf/shield.text") send_file_email("",'',sender="litao@igengmei.com",email_group=["litao@igengmei.com"],email_msg_body_str="test",title_str="test",cc_group=["litao@igengmei.com"],file="data.csv")
......
...@@ -23,10 +23,10 @@ es7 = e7.Elasticsearch(hosts="172.16.52.27", port=9200,http_auth=("elastic","gen ...@@ -23,10 +23,10 @@ es7 = e7.Elasticsearch(hosts="172.16.52.27", port=9200,http_auth=("elastic","gen
# es7 = e7.Elasticsearch(hosts="172.16.31.17", port=9000) # es7 = e7.Elasticsearch(hosts="172.16.31.17", port=9000)
target_index = 'gm-dbmw-lbs' target_index = 'gm-dbmw-suggest-read'
target_type = 'lbs' target_type = '_doc'
from_index = 'gm-dbmw-lbs-read' from_index = 'gm-dbmw-suggest-old'
from_type = '_doc' from_type = '_doc'
...@@ -60,13 +60,13 @@ for one_scan in write_into_scan: ...@@ -60,13 +60,13 @@ for one_scan in write_into_scan:
count = count + 1 count = count + 1
line = one_scan['_source'] line = one_scan['_source']
doc_id = one_scan['_id'] doc_id = one_scan['_id']
try: # try:
if line['is_online'] == 1: # if line['is_online'] == 1:
line['is_online'] = True # line['is_online'] = True
else: # else:
line['is_online'] = False # line['is_online'] = False
except: # except:
pass # pass
bulk_head = '{"index": {"_id":"%s"}}' % doc_id bulk_head = '{"index": {"_id":"%s"}}' % doc_id
data_str = json.dumps(line, ensure_ascii=False) data_str = json.dumps(line, ensure_ascii=False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment