diff options
Diffstat (limited to 'SuckItFos')
-rwxr-xr-x | SuckItFos | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -17,12 +17,13 @@ find /opt/Foswiki/data ${filter} \ | |||
17 | do | 17 | do |
18 | base=`echo "${line}" | cut -d '/' -f 1` | 18 | base=`echo "${line}" | cut -d '/' -f 1` |
19 | file=`echo "${line}" | cut -d '/' -f 2- | rev | cut -b 5- | rev` | 19 | file=`echo "${line}" | cut -d '/' -f 2- | rev | cut -b 5- | rev` |
20 | time=`date --rfc-3339=seconds -ur /opt/Foswiki/data/${base}/${file}.txt | cut -d '+' -f 1` | ||
20 | mkdir -p Foswiki/$base | 21 | mkdir -p Foswiki/$base |
21 | mkdir -p Foswiki/${base}/`dirname ${file}` | 22 | mkdir -p Foswiki/${base}/`dirname ${file}` |
22 | mkdir -p combined/$base | 23 | mkdir -p combined/$base |
23 | mkdir -p combined/${base}/`dirname ${file}` | 24 | mkdir -p combined/${base}/`dirname ${file}` |
24 | echo "Converting ${URL}/${base}/${file}?cover=print -> Foswiki/${base}/${file}.md" | 25 | 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 | 26 | echo -e "ogWiki=Foswiki\nogURL=${URL}\nogBase=${base}\nogFile=${file}\ntimestamp=${time}\n" > Foswiki/${base}/${file}.md.md |
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. | 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 | 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 |
28 | cp Foswiki/${base}/${file}.HTM Foswiki/${base}/${file}.HTM_ORIGINAL | 29 | cp Foswiki/${base}/${file}.HTM Foswiki/${base}/${file}.HTM_ORIGINAL |