Skip to content

Commit

Permalink
Bug fix & Update: README
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandler-Lu committed Apr 24, 2020
1 parent 323210d commit b2919cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

## 版本

### 4.7

- 紧急修复批量文件识别报错的问题

### 4.6

- 更改 CNOCR 的触发方式,现与其余 OCR 一致;
Expand Down
13 changes: 7 additions & 6 deletions src_alfred/ocr.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'''
@Description: Capture than OCR - macOS - Online OCR
@version: 4.5
@version: 4.7
@Author: Chandler Lu
@Date: 2019-11-26 23:52:36
@LastEditTime: 2020-04-21 20:48:23
@LastEditTime: 2020-04-24 17:25:21
'''
# -*- coding: UTF-8 -*-
import sys
Expand Down Expand Up @@ -460,10 +460,11 @@ def remove_pic(pic_path):


if __name__ == "__main__":
try:
os.path.getsize(pic_path)
except FileNotFoundError:
declare_file_error()
if (0 <= ocr_select <= 6):
try:
os.path.getsize(pic_path)
except FileNotFoundError:
declare_file_error()
'''
0: CNOCR
1: baidu
Expand Down

0 comments on commit b2919cf

Please sign in to comment.