From 88e14ed3266781b4eef376f18be1ea639adcdae7 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 14 Jan 2026 19:28:16 +0100 Subject: [PATCH] wip #7894 @0.5 --- src/CommandLine/Docling.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CommandLine/Docling.php b/src/CommandLine/Docling.php index b47b000..c642749 100644 --- a/src/CommandLine/Docling.php +++ b/src/CommandLine/Docling.php @@ -4,6 +4,7 @@ namespace Cubist\Util\CommandLine; use Cubist\Util\CommandLine; use Cubist\Util\Files\Files; +use Cubist\Util\Markdown; class Docling extends CommandLine { @@ -26,11 +27,16 @@ class Docling extends CommandLine if ($locale) { $cli->setArg('ocr-lang', $locale); } + $cli->setArg('ocr-engine', 'easyocr'); $cli->setArg('output', $tmp); $cli->setArg(null, $image); $cli->execute(); - $md = $tmp . '/' . $f->getBasename('.md'); + $md = file_get_contents($tmp . '/' . $f->getBasename('.' . $f->getExtension()) . '.md'); + + $html = Markdown::toHTML($md, false); + file_put_contents($out, $html); + return $html; } return file_get_contents($out); } -- 2.39.5