From: Vincent Vanwaelscappel Date: Fri, 8 Mar 2024 15:24:52 +0000 (+0100) Subject: wip #6781 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=efb4935efca80258183615ddd4f34a895b2632bd;p=fluidbook-toolbox.git wip #6781 @0.5 --- diff --git a/app/Console/Commands/FluidbookFluidbookPageProcess.php b/app/Console/Commands/FluidbookFluidbookPageProcess.php new file mode 100644 index 000000000..9ca1231d1 --- /dev/null +++ b/app/Console/Commands/FluidbookFluidbookPageProcess.php @@ -0,0 +1,41 @@ +argument('id'); + /** @var FluidbookPublication $fluidbook */ + $fluidbook = FluidbookPublication::withoutGlobalScopes()->find($id); + $files = [ + // Thumbnail + ['jpg', 'thumb', true, true, ''], + // Images + ['jpg', 150, false, true, 'html'], + // Texts + ['svg', 150, true, false, 'html'], + ]; + + foreach ($files as $file) { + $fluidbook->getFile($this->argument('page'), $file[0], $file[1], $file[2], $file[3], $file[4], true); + } + } +}