diff options
Diffstat (limited to 'SuckItPm')
| -rwxr-xr-x | SuckItPm | 12 | 
1 files changed, 5 insertions, 7 deletions
| @@ -20,6 +20,7 @@ do | |||
| 20 | mkdir -p PmWiki/$base | 20 | mkdir -p PmWiki/$base | 
| 21 | mkdir -p combined/$base | 21 | mkdir -p combined/$base | 
| 22 | echo "Converting ${URL}/?n=${base}.${file}?action=print -> PmWiki/${base}/${file}.md" | 22 | echo "Converting ${URL}/?n=${base}.${file}?action=print -> PmWiki/${base}/${file}.md" | 
| 23 | echo -e "ogWiki=PmWiki\nogURL=${URL}/?n=${base}.${file}\n" > PmWiki/${base}/${file}.md.md | ||
| 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. | 24 | # 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. | 
| 24 | # curl --no-progress-meter ${URL}/?n=${base}.${file}?action=markdown -o PmWiki/${base}/${file}.MD | 25 | # curl --no-progress-meter ${URL}/?n=${base}.${file}?action=markdown -o PmWiki/${base}/${file}.MD | 
| 25 | curl --no-progress-meter ${URL}/?n=${base}.${file}?action=print -o PmWiki/${base}/${file}.HTM | 26 | curl --no-progress-meter ${URL}/?n=${base}.${file}?action=print -o PmWiki/${base}/${file}.HTM | 
| @@ -29,6 +30,9 @@ do | |||
| 29 | rm PmWiki/${base}/${file}.HTM | 30 | rm PmWiki/${base}/${file}.HTM | 
| 30 | mv xx00 PmWiki/${base}/${file}.HTM | 31 | mv xx00 PmWiki/${base}/${file}.HTM | 
| 31 | fi | 32 | fi | 
| 33 | if [ -f xx01 ]; then | ||
| 34 | rm xx01 | ||
| 35 | fi | ||
| 32 | sed -i -E PmWiki/${base}/${file}.HTM \ | 36 | sed -i -E PmWiki/${base}/${file}.HTM \ | 
| 33 | -e "s/rel='nofollow'//g" \ | 37 | -e "s/rel='nofollow'//g" \ | 
| 34 | -e "s/target='_blank'//g" \ | 38 | -e "s/target='_blank'//g" \ | 
| @@ -53,7 +57,6 @@ do | |||
| 53 | -e 's/\{#.*\}//g' \ | 57 | -e 's/\{#.*\}//g' \ | 
| 54 | -e '/^:::/d' \ | 58 | -e '/^:::/d' \ | 
| 55 | # -e '/\[Site$/d' \ | 59 | # -e '/\[Site$/d' \ | 
| 56 | # -e '/^Page last modified on /d' \ | ||
| 57 | # -e '/^\[\]/d' \ | 60 | # -e '/^\[\]/d' \ | 
| 58 | # -e "s/\`<a id='trailstart'>\`\{=html\}\`<\/a>\`\{=html\}//g" \ | 61 | # -e "s/\`<a id='trailstart'>\`\{=html\}\`<\/a>\`\{=html\}//g" \ | 
| 59 | # -e "s/^\`<img /<img /g" \ | 62 | # -e "s/^\`<img /<img /g" \ | 
| @@ -61,13 +64,8 @@ do | |||
| 61 | # -e "s/^\`\`\`//g" \ | 64 | # -e "s/^\`\`\`//g" \ | 
| 62 | # -e "s/\`\{=html\}//g" | 65 | # -e "s/\`\{=html\}//g" | 
| 63 | 66 | ||
| 64 | # Don't need this, the parts we are grabbing already include that link at the bottom. | ||
| 65 | # echo -e "****\n[Original page](${URL}/${base}/${page}) where maybe you can edit it." >> PmWiki/${base}/${file}.md | ||
| 66 | ln -frs PmWiki/${base}/${file}.md combined/${base}/${file}.md | 67 | ln -frs PmWiki/${base}/${file}.md combined/${base}/${file}.md | 
| 67 | 68 | ln -frs PmWiki/${base}/${file}.md.md combined/${base}/${file}.md.md | |
| 68 | if [ -f xx01 ]; then | ||
| 69 | rm xx01 | ||
| 70 | fi | ||
| 71 | done | 69 | done | 
| 72 | 70 | ||
| 73 | popd | 71 | popd | 
