From 182f3980ab45f449a596cefdd23c628f693bb854 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 13 Aug 2024 16:23:20 +0200 Subject: [PATCH] Refine fix --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a056d63c7..78b12c5d2 100644 --- a/README.md +++ b/README.md @@ -46,5 +46,9 @@ Left to the image you have a hamburger with a "replace" option. In case GitBook was fixed, with some command line magic, this could be solved: -1. Create a script renaming all images: `fd -e png -x bash -c "echo '{}' | sed 's/\([^(]*\)\(.*\).png/mv \"\\1\\2.png\" \"\\1.png\"/' | sed 's/ \.png/.png/'" | sort > fix-filenames.sh`. Execute in `en/.gitbook`. Otherwise, `fd` does not find any file. -2. Create a script doing the renaming in all `.md` files: `fd -e md -x bash -c "echo sed -i '\"s/assets\/\([^%]*\)\(.*\).png/assets\/\\1.png/\"' {}" > fix-mds.sh`. +1. Create a script renaming all images: `fd -e png -x bash -c "echo '{}' | sed 's/\([^(]*\)\(.*\).png/mv \"\\1\\2.png\" \"\\1.png\"/' | sed 's/ \.png/.png/'" | sort > fix-filenames.sh`. +2. Execute in `en/.gitbook`. Otherwise, `fd` does not find any file. +3. Repeat for `gif` instead of `png`. +4. Create a script doing the renaming in all `.md` files: `fd -e md -x bash -c "echo sed -i '\"s/assets\/\([^%]*\)\(.*\).png/assets\/\\1.png/\"' {}" > fix-mds.sh`. +5. Execute in the root repository folder. +6. Repeat for `gif` instead of `png`.