better
parent
f54dbfbeec
commit
c22168c565
19
main.py
19
main.py
|
|
@ -20,16 +20,15 @@ def de_column_ify():
|
||||||
for i in range(len(pdf.pages)):
|
for i in range(len(pdf.pages)):
|
||||||
log("getting", i, "of", len(pdf.pages))
|
log("getting", i, "of", len(pdf.pages))
|
||||||
got = q.get()
|
got = q.get()
|
||||||
debug.draw_boxes(got[0] , [
|
for got_i in got[1]:
|
||||||
{
|
if got_i.chars:
|
||||||
"x0": i.chars[0]["x0"],
|
debug.draw_boxes(got_i.page, [{
|
||||||
"x1": i.chars[0]["x1"],
|
"x0": got_i.chars[0]["x0"],
|
||||||
"y0": i.chars[0]["y0"],
|
"x1": got_i.chars[0]["x1"],
|
||||||
"y1": i.chars[0]["y1"],
|
"y0": got_i.chars[0]["y0"],
|
||||||
"debug_label": i.n,
|
"y1": got_i.chars[0]["y1"],
|
||||||
}
|
"debug_label": got_i.n,
|
||||||
for i in got[1] if i.chars
|
}])
|
||||||
])
|
|
||||||
|
|
||||||
def de_columnify_page(q, page):
|
def de_columnify_page(q, page):
|
||||||
result = cluster.Chars(page.chars, page).divide_into_columns()
|
result = cluster.Chars(page.chars, page).divide_into_columns()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue