From efb4935efca80258183615ddd4f34a895b2632bd Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 8 Mar 2024 16:24:52 +0100 Subject: [PATCH] wip #6781 @0.5 --- .../FluidbookFluidbookPageProcess.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 app/Console/Commands/FluidbookFluidbookPageProcess.php 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); + } + } +} -- 2.39.5