Skip to content

Docsplit.extract_text auto orientation detection 'detect_orientation: true' param does not work. #143

@michaeltranlong

Description

@michaeltranlong

When I execute 'tesseract --list-langs' I do see 'osd' on my mac.

I see Docsplit::DEPENDENCIES[:tesseract] is true and Docsplit::DEPENDENCIES[:osd] is false

Tracked it down to these 33-37 lines in 'lib/docsplit.rb'

if DEPENDENCIES[:tesseract]
# osd will be listed in tesseract --listlangs
val = %x[ #{'tesseract --list-langs'} 2>&1 >/dev/null ]
DEPENDENCIES[:osd] = true if val =~ /\bosd\b/
end

Not sure why the '> /dev/null' is there but that would make 'val' assignment be empty and cause DEPENDENCIES[:osd] = false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions