Skip to content

Commit

Permalink
Exclude folders from pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmbland committed Oct 24, 2024
1 parent b33485d commit f8ede21
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 117 deletions.
1 change: 0 additions & 1 deletion .codespell_ignore.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
tabl
heterogenous
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ repos:
hooks:
- id: check-merge-conflict
- id: debug-statements
# - id: trailing-whitespace
- id: trailing-whitespace
exclude: ^src/IAO_dicts/
- id: end-of-file-fixer
- id: pretty-format-json
args: [--autofix, --indent, '4', --no-sort]
Expand Down Expand Up @@ -33,3 +34,4 @@ repos:
hooks:
- id: codespell
args: [-I, .codespell_ignore.txt]
exclude: ^tests/data/
12 changes: 6 additions & 6 deletions src/table_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,16 @@ def cell2table(self, cells, added, thresh, target_dir, pmc):

"""
# The block (have not fully developed) is used to recognize section names in the left-most column
for row in table_row:
new_row = []
row.sort(key=lambda x: x[0])
# start = row[0]
# # row(i)[0][x]+[w] < row(i+1)[0][x] means the below cell is blank
# if prev[0] + prev[2] < start[0]:
# append to the above line
for (j, (x, y, w, h)) in enumerate(row):
# print(row)
# # if cells in the first column have all white pixels below, marked as section name
Expand All @@ -190,13 +190,13 @@ def cell2table(self, cells, added, thresh, target_dir, pmc):
# new_table.append(new_row)
# new_row=[]
# continue
new_row.append(img2text(thresh, x, y, w, h))
# comment to write OCR results directly in the image
# font = cv2.FONT_HERSHEY_SIMPLEX
# cv2.putText(added, text, (x, y - 10), font, 1, color, 1);
table_row.append(new_row)
"""

Expand Down
Loading

0 comments on commit f8ede21

Please sign in to comment.