Skip to content

Commit 5fe63b5

Browse files
committed
Add LAYOUTS to the CLI
1 parent a3cded2 commit 5fe63b5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

textractor/cli/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ def textractor_cli():
427427
print(out.signatures.pretty_print())
428428
if "ALL" in args.print or "IDS" in args.print:
429429
print(out.identity_documents.pretty_print())
430+
if "ALL" in args.print or "LAYOUTS" in args.print:
431+
print(out.layouts.pretty_print())
430432

431433
if args.linearize is not None:
432434
if args.linearize_config_path is not None:
@@ -450,6 +452,8 @@ def textractor_cli():
450452
entity_list += out.queries
451453
if "ALL" in args.overlay or "SIGNATURES" in args.overlay:
452454
entity_list += out.signatures
455+
if "ALL" in args.overlay or "LAYOUTS" in args.overlay:
456+
entity_list += out.layouts
453457
image = entity_list.visualize(
454458
with_text=True,
455459
font_size_ratio=args.font_size_ratio,

textractor/data/constants.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ class CLIPrint(Enum):
319319
EXPENSES = 5
320320
SIGNATURES = 6
321321
IDS = 7
322-
322+
LAYOUTS = 8
323323

324324
class CLIOverlay(Enum):
325325
ALL = 0
@@ -328,4 +328,5 @@ class CLIOverlay(Enum):
328328
TABLES = 3
329329
FORMS = 4
330330
QUERIES = 5
331-
SIGNATURE = 6
331+
SIGNATURES = 6
332+
LAYOUTS = 7

0 commit comments

Comments
 (0)