aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/SuckItFos
diff options
context:
space:
mode:
Diffstat (limited to 'SuckItFos')
-rwxr-xr-xSuckItFos9
1 files changed, 4 insertions, 5 deletions
diff --git a/SuckItFos b/SuckItFos
index 1e6e48d..0f6f8a8 100755
--- a/SuckItFos
+++ b/SuckItFos
@@ -22,6 +22,7 @@ do
22 mkdir -p combined/$base 22 mkdir -p combined/$base
23 mkdir -p combined/${base}/`dirname ${file}` 23 mkdir -p combined/${base}/`dirname ${file}`
24 echo "Converting ${URL}/${base}/${file}?cover=print -> Foswiki/${base}/${file}.md" 24 echo "Converting ${URL}/${base}/${file}?cover=print -> Foswiki/${base}/${file}.md"
25 echo -e "ogWiki=Foswiki\nogURL=${URL}/${base}/${file}\n" > Foswiki/${base}/${file}.md.md
25 # 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. 26 # 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.
26 curl --silent --no-progress-meter ${URL}/${base}/${file}?cover=print -o Foswiki/${base}/${file}.HTM 27 curl --silent --no-progress-meter ${URL}/${base}/${file}?cover=print -o Foswiki/${base}/${file}.HTM
27 cp Foswiki/${base}/${file}.HTM Foswiki/${base}/${file}.HTM_ORIGINAL 28 cp Foswiki/${base}/${file}.HTM Foswiki/${base}/${file}.HTM_ORIGINAL
@@ -47,6 +48,9 @@ do
47 rm Foswiki/${base}/${file}.md 48 rm Foswiki/${base}/${file}.md
48 mv xx00 Foswiki/${base}/${file}.md 49 mv xx00 Foswiki/${base}/${file}.md
49 fi 50 fi
51 if [ -f xx01 ]; then
52 rm xx01
53 fi
50 54
51 # Attempt to clean things up, badly. 55 # Attempt to clean things up, badly.
52 sed -i -E Foswiki/${base}/${file}.md \ 56 sed -i -E Foswiki/${base}/${file}.md \
@@ -57,12 +61,7 @@ do
57# -e 's/\{\.pattern.*\}//g' \ 61# -e 's/\{\.pattern.*\}//g' \
58# -e 's/\{\.pattern.*//g' \ 62# -e 's/\{\.pattern.*//g' \
59 63
60 echo -e "****\n[Original page](${URL}/${base}/${file}) where maybe you can edit it." >> Foswiki/${base}/${file}.md
61 ln -frs Foswiki/${base}/${file}.md combined/${base}/${file}.md 64 ln -frs Foswiki/${base}/${file}.md combined/${base}/${file}.md
62
63 if [ -f xx01 ]; then
64 rm xx01
65 fi
66done 65done
67 66
68popd 67popd