From 0a06a6e16f66dafa44e38e1ea58a288fb44faf72 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Thu, 2 Jan 2025 11:39:49 +1000 Subject: Create a symlink forest in merged/combined. Crude attempt at actually combining the content pages into one place. --- SuckItFos | 2 ++ 1 file changed, 2 insertions(+) (limited to 'SuckItFos') diff --git a/SuckItFos b/SuckItFos index 4f824be..cda4077 100755 --- a/SuckItFos +++ b/SuckItFos @@ -16,12 +16,14 @@ do base=`echo "${line}" | cut -d '/' -f 1` file=`echo "${line}" | cut -d '/' -f 2- | rev | cut -b 5- | rev` mkdir -p Foswiki/$base + mkdir -p combined/$base echo "Converting ${URL}/${base}/${file} -> Foswiki/${base}/${file}.md" # pandoc -f html -t markdown --self-contained ${URL}/${base}/${file} >Foswiki/${base}/${file}.md # TODO - try curl, to see what is actually downloaded, and maybe not download unchanged pages. curl to .HTM # Doesn't help with redownloads, coz natch a dynamic site isn't cached. But I can at least comment out the curl command during testing to save time. curl --silent --no-progress-meter ${URL}/${base}/${file} -o Foswiki/${base}/${file}.HTM pandoc -f html -t commonmark_x --self-contained Foswiki//${base}/${file}.HTM >Foswiki/${base}/${file}.md + ln -frs Foswiki/${base}/${file}.md combined/${base}/${file}.md cp Foswiki/${base}/${file}.md Foswiki/${base}/${file}.md_ORIGINAL # csplit -ks Foswiki/${base}/${file}.md '%::: foswikiTopic%' '/::: foswikiContentFooter/' -- cgit v1.1