aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xSuckItFos2
-rwxr-xr-xSuckItPm2
2 files changed, 4 insertions, 0 deletions
diff --git a/SuckItFos b/SuckItFos
index 4f824be..cda4077 100755
--- a/SuckItFos
+++ b/SuckItFos
@@ -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/'
diff --git a/SuckItPm b/SuckItPm
index 6232cdc..26503f5 100755
--- a/SuckItPm
+++ b/SuckItPm
@@ -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` 17 file=`echo "${line}" | cut -d '.' -f 2`
18 mkdir -p PmWiki/$base 18 mkdir -p PmWiki/$base
19 mkdir -p combined/$base
19 echo "Converting ${URL}/?n=${base}.${file} -> PmWiki/${base}/${file}.md" 20 echo "Converting ${URL}/?n=${base}.${file} -> PmWiki/${base}/${file}.md"
20# pandoc -f html -t markdown --self-contained ${URL}/?n=${base}.${file} >PmWiki/${base}/${file}.md 21# pandoc -f html -t markdown --self-contained ${URL}/?n=${base}.${file} >PmWiki/${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 --no-progress-meter ${URL}/?n=${base}.${file} -o PmWiki/${base}/${file}.HTM 24 curl --no-progress-meter ${URL}/?n=${base}.${file} -o PmWiki/${base}/${file}.HTM
24 pandoc -f html -t commonmark_x --self-contained PmWiki//${base}/${file}.HTM >PmWiki/${base}/${file}.md 25 pandoc -f html -t commonmark_x --self-contained PmWiki//${base}/${file}.HTM >PmWiki/${base}/${file}.md
26 ln -frs PmWiki/${base}/${file}.md combined/${base}/${file}.md
25 cp PmWiki/${base}/${file}.md PmWiki/${base}/${file}.md_ORIGINAL 27 cp PmWiki/${base}/${file}.md PmWiki/${base}/${file}.md_ORIGINAL
26 28
27# csplit -ks PmWiki/${base}/${file}.md '/trailstart/' '/trailend/' 29# csplit -ks PmWiki/${base}/${file}.md '/trailstart/' '/trailend/'