diff options
author | dvs1 | 2025-01-02 11:39:49 +1000 |
---|---|---|
committer | dvs1 | 2025-01-02 11:39:49 +1000 |
commit | 0a06a6e16f66dafa44e38e1ea58a288fb44faf72 (patch) | |
tree | 109a15139ca968eb69f96ea6eb32ed01f003a8ff /SuckItFos | |
parent | TODO-- (diff) | |
download | notYetAnotherWiki-0a06a6e16f66dafa44e38e1ea58a288fb44faf72.zip notYetAnotherWiki-0a06a6e16f66dafa44e38e1ea58a288fb44faf72.tar.gz notYetAnotherWiki-0a06a6e16f66dafa44e38e1ea58a288fb44faf72.tar.bz2 notYetAnotherWiki-0a06a6e16f66dafa44e38e1ea58a288fb44faf72.tar.xz |
Create a symlink forest in merged/combined.
Crude attempt at actually combining the content pages into one place.
Diffstat (limited to 'SuckItFos')
-rwxr-xr-x | SuckItFos | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -16,12 +16,14 @@ do | |||
16 | base=`echo "${line}" | cut -d '/' -f 1` | 16 | base=`echo "${line}" | cut -d '/' -f 1` |
17 | file=`echo "${line}" | cut -d '/' -f 2- | rev | cut -b 5- | rev` | 17 | file=`echo "${line}" | cut -d '/' -f 2- | rev | cut -b 5- | rev` |
18 | mkdir -p Foswiki/$base | 18 | mkdir -p Foswiki/$base |
19 | mkdir -p combined/$base | ||
19 | echo "Converting ${URL}/${base}/${file} -> Foswiki/${base}/${file}.md" | 20 | echo "Converting ${URL}/${base}/${file} -> Foswiki/${base}/${file}.md" |
20 | # pandoc -f html -t markdown --self-contained ${URL}/${base}/${file} >Foswiki/${base}/${file}.md | 21 | # pandoc -f html -t markdown --self-contained ${URL}/${base}/${file} >Foswiki/${base}/${file}.md |
21 | # TODO - try curl, to see what is actually downloaded, and maybe not download unchanged pages. curl to .HTM | 22 | # TODO - try curl, to see what is actually downloaded, and maybe not download unchanged pages. curl to .HTM |
22 | # 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. | 23 | # 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. |
23 | curl --silent --no-progress-meter ${URL}/${base}/${file} -o Foswiki/${base}/${file}.HTM | 24 | curl --silent --no-progress-meter ${URL}/${base}/${file} -o Foswiki/${base}/${file}.HTM |
24 | pandoc -f html -t commonmark_x --self-contained Foswiki//${base}/${file}.HTM >Foswiki/${base}/${file}.md | 25 | pandoc -f html -t commonmark_x --self-contained Foswiki//${base}/${file}.HTM >Foswiki/${base}/${file}.md |
26 | ln -frs Foswiki/${base}/${file}.md combined/${base}/${file}.md | ||
25 | cp Foswiki/${base}/${file}.md Foswiki/${base}/${file}.md_ORIGINAL | 27 | cp Foswiki/${base}/${file}.md Foswiki/${base}/${file}.md_ORIGINAL |
26 | 28 | ||
27 | # csplit -ks Foswiki/${base}/${file}.md '%::: foswikiTopic%' '/::: foswikiContentFooter/' | 29 | # csplit -ks Foswiki/${base}/${file}.md '%::: foswikiTopic%' '/::: foswikiContentFooter/' |