]> _ Git - odl.git/commitdiff
wip #4666 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 10 Sep 2021 08:12:41 +0000 (10:12 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 10 Sep 2021 08:12:41 +0000 (10:12 +0200)
app/Jobs/ProcessFluidbook.php

index c0dc92eec58e33c0f97ec98e7c8e81de0a07e2c9..8890c83b2a1dd94199130047bb26759dbc328bdb 100644 (file)
@@ -71,24 +71,32 @@ class ProcessFluidbook implements ShouldQueue, ShouldBeUnique
     public function processPages($sync = false)
     {
         start_measure('Process Pages');
-        $out = storage_path('fluidbook/convert/' . $this->in->getHash() . '/');
+        $out = $this->getOutputPath();
         Files::mkdir($out);
         $this->in->processPages($out, [new ProcessFile('jpg', 'thumb'),
             new ProcessFile('jpg', 150, false, true),
             new ProcessFile('svg', 300, true, false),
         ], $sync);
         stop_measure('Process Pages');
+    }
 
+    public function getOutputPath()
+    {
+        return storage_path('fluidbook/convert/' . $this->in->getHash() . '/');
     }
 
     public function getTexts()
     {
-
+        start_measure('Process texts');
+        $this->in->processTexts($this->getOutputPath());
+        start_measure('Process texts');
     }
 
     public function getLinks()
     {
-
+        start_measure('Process links');
+        $this->in->processLinks($this->getOutputPath());
+        start_measure('Process links');
     }
 
     public function writeConfig()