Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
9ef3c37d
authored
2020-08-17 13:56:35 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
c40124d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
src/apps/doc/management/commands/doc_ocr_process.py
src/apps/doc/ocr/wb.py
src/apps/doc/management/commands/doc_ocr_process.py
View file @
9ef3c37
...
...
@@ -74,7 +74,7 @@ class Command(BaseCommand, LoggerMixin):
def
pdf_download
(
self
,
doc
,
business_type
):
if
doc
is
None
:
return
None
,
None
,
None
return
None
,
None
,
None
,
None
# TODO EDMS下载pdf
doc_data_path
=
os
.
path
.
join
(
self
.
data_dir
,
business_type
,
str
(
doc
.
id
))
os
.
makedirs
(
doc_data_path
,
exist_ok
=
True
)
...
...
src/apps/doc/ocr/wb.py
View file @
9ef3c37
...
...
@@ -28,7 +28,8 @@ class BSWorkbook(Workbook):
self
.
border
=
Border
(
left
=
self
.
bd
,
top
=
self
.
bd
,
right
=
self
.
bd
,
bottom
=
self
.
bd
)
self
.
MAX_MEAN
=
31
def
sheet_prune
(
self
,
ws
):
@staticmethod
def
sheet_prune
(
ws
):
ws
.
insert_cols
(
1
,
amount
=
consts
.
FIXED_COL_AMOUNT
)
for
col
in
range
(
consts
.
FIXED_COL_AMOUNT
+
1
,
ws
.
max_column
+
1
):
header_value
=
ws
.
cell
(
1
,
col
)
.
value
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment