diff options
Diffstat (limited to 'SuckItFos')
-rwxr-xr-x | SuckItFos | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -10,7 +10,7 @@ filter=" | |||
10 | -name TWiki -prune -o \ | 10 | -name TWiki -prune -o \ |
11 | " | 11 | " |
12 | 12 | ||
13 | pushd /opt/merged | 13 | pushd /opt/mergedWork |
14 | 14 | ||
15 | find /opt/Foswiki/data ${filter} \ | 15 | find /opt/Foswiki/data ${filter} \ |
16 | -name "*.txt" -type f,l -printf "%P\n" | while read line | 16 | -name "*.txt" -type f,l -printf "%P\n" | while read line |
@@ -26,7 +26,6 @@ do | |||
26 | # TODO - try curl, to see what is actually downloaded, and maybe not download unchanged pages. curl to .HTM | 26 | # TODO - try curl, to see what is actually downloaded, and maybe not download unchanged pages. curl to .HTM |
27 | # 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. | 27 | # 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. |
28 | curl --silent --no-progress-meter ${URL}/${base}/${file}?cover=print -o Foswiki/${base}/${file}.HTM | 28 | curl --silent --no-progress-meter ${URL}/${base}/${file}?cover=print -o Foswiki/${base}/${file}.HTM |
29 | |||
30 | cp Foswiki/${base}/${file}.HTM Foswiki/${base}/${file}.HTM_ORIGINAL | 29 | cp Foswiki/${base}/${file}.HTM Foswiki/${base}/${file}.HTM_ORIGINAL |
31 | csplit -ks Foswiki/${base}/${file}.HTM '%<div id="patternMainContents">%' '/<div class="foswikiAttachments foswikiFormStep" style="overflow:auto">/' | 30 | csplit -ks Foswiki/${base}/${file}.HTM '%<div id="patternMainContents">%' '/<div class="foswikiAttachments foswikiFormStep" style="overflow:auto">/' |
32 | if [ -f xx00 ]; then | 31 | if [ -f xx00 ]; then |
@@ -58,18 +57,21 @@ do | |||
58 | sed -i -E Foswiki/${base}/${file}.md \ | 57 | sed -i -E Foswiki/${base}/${file}.md \ |
59 | -e 's/\$/\$dlr\$/g' \ | 58 | -e 's/\$/\$dlr\$/g' \ |
60 | -e 's/\{#.*\}//g' \ | 59 | -e 's/\{#.*\}//g' \ |
61 | -e 's/\{\.pattern.*\}//g' \ | 60 | -e '/^:::/d' \ |
62 | -e 's/\{\.pattern.*//g' \ | ||
63 | -e '/^<!-- -->/d' \ | 61 | -e '/^<!-- -->/d' \ |
64 | -e '/^:::/d' | 62 | # -e 's/\{\.pattern.*\}//g' \ |
63 | # -e 's/\{\.pattern.*//g' \ | ||
64 | |||
65 | echo -e "****\n[Original page](${URL}/${base}/${file}) where maybe you can edit it." >> Foswiki/${base}/${file}.md | 65 | echo -e "****\n[Original page](${URL}/${base}/${file}) where maybe you can edit it." >> Foswiki/${base}/${file}.md |
66 | 66 | ||
67 | # pandoc -t html -f commonmark_x --self-contained Foswiki/${base}/${file}.md > Foswiki/${base}/${file}.htm | 67 | # pandoc -t html -f commonmark_x --self-contained Foswiki/${base}/${file}.md > Foswiki/${base}/${file}.htm |
68 | # cmark-gfm -t html -e footnotes -e table -e strikethrough Foswiki/${base}/${file}.md > Foswiki/${base}/${file}.body | 68 | # cmark-gfm -t html -e footnotes -e table -e strikethrough Foswiki/${base}/${file}.md > Foswiki/${base}/${file}.body |
69 | # ln -frs Foswiki/${base}/${file}.body combined/${base}/${file}.body | 69 | # ln -frs Foswiki/${base}/${file}.body combined/${base}/${file}.body |
70 | ln -frs Foswiki/${base}/${file}.md combined/${base}/${file}.md | 70 | ln -frs Foswiki/${base}/${file}.md combined/${base}/${file}.md |
71 | done | ||
72 | 71 | ||
73 | notYetAnotherWiki.lua | 72 | if [ -f xx01 ]; then |
73 | rm xx01 | ||
74 | fi | ||
75 | done | ||
74 | 76 | ||
75 | popd | 77 | popd |