diff options
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/' |
