From 854f314b53d7f37a4d7d66a754899209279f8de5 Mon Sep 17 00:00:00 2001 From: zaimon <> Date: Fri, 6 Dec 2024 18:47:18 +0530 Subject: [PATCH] fixed the same relative link issue for pics --- ..._union_of_countable_sets_is_countable.jpg} | Bin ...e_union_of_countable_sets_is_countable.org | 2 +- create.sh | 22 ++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) rename assets/pics/{Countable_union_of_Countable_sets.jpg => countable_union_of_countable_sets_is_countable.jpg} (100%) diff --git a/assets/pics/Countable_union_of_Countable_sets.jpg b/assets/pics/countable_union_of_countable_sets_is_countable.jpg similarity index 100% rename from assets/pics/Countable_union_of_Countable_sets.jpg rename to assets/pics/countable_union_of_countable_sets_is_countable.jpg diff --git a/content/countable_union_of_countable_sets_is_countable.org b/content/countable_union_of_countable_sets_is_countable.org index 9a1c31f..b04fc06 100644 --- a/content/countable_union_of_countable_sets_is_countable.org +++ b/content/countable_union_of_countable_sets_is_countable.org @@ -59,7 +59,7 @@ In the modulo $k$ argument we have a constant gap between each consecutive eleme The most simple way to increase the gap size in this way is to keep increasing it by one after each gap. -[[pics/Countable_union_of_Countable_sets.jpg][image]] +[[pics/countable_union_of_countable_sets_is_countable.jpg][image 1]] Look at the $0^{th}$ sequence we just get the [[https://en.wikipedia.org/wiki/Triangular_number][Triangular numbers]] and zero. diff --git a/create.sh b/create.sh index 86459b8..464dcbc 100755 --- a/create.sh +++ b/create.sh @@ -1,5 +1,6 @@ #!/usr/bin/env sh +rm -rf ./public/cosmicflow-html/ # generate the html and gemini versions of the site using org-publish emacs -Q --batch -l create-site.el @@ -25,4 +26,25 @@ for dir in "$src_dir"/*; do fi done +# Set the source and destination directories +src_dir="./public/cosmicflow-html" +src_pics_dir="./assets/pics/" + +# Loop through each subdirectory +for dir in "$src_dir"/*; do + if [ -d "$dir" ]; then + dir_name=$(basename "$dir") + dst_pics_dir="${src_dir}/${dir_name}/pics" + + # Create the destination subdirectory if it doesn't exist + if [ ! -d "$dst_pics_dir" ]; then + mkdir -p "$dst_pics_dir" + fi + + # Use rsync to copy files starting with the subdirectory name as prefix + rsync -av --include="$dir_name*" --exclude="*" "${src_pics_dir}/" "${dst_pics_dir}/" + fi +done + + # rm -rf ./content/ltximg/