diff options
Diffstat (limited to 'SuckIt')
-rwxr-xr-x | SuckIt | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -41,6 +41,7 @@ do | |||
41 | # 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. | 41 | # 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. |
42 | curl --silent --no-progress-meter ${ogURL}/${base}/${file}?cover=print -o ${ogWiki}/${base}/${file}.HTM | 42 | curl --silent --no-progress-meter ${ogURL}/${base}/${file}?cover=print -o ${ogWiki}/${base}/${file}.HTM |
43 | # Attempt to separate user profiles from user content. Doesn't work when people turn their profiles into content. | 43 | # Attempt to separate user profiles from user content. Doesn't work when people turn their profiles into content. |
44 | dest="" | ||
44 | if [[ "${base}" == "Main" ]]; then | 45 | if [[ "${base}" == "Main" ]]; then |
45 | dest="unsorted" | 46 | dest="unsorted" |
46 | mkdir -p `dirname users/${file}` | 47 | mkdir -p `dirname users/${file}` |
@@ -48,8 +49,23 @@ do | |||
48 | if [ -s users/${file}_fos.SED ]; then | 49 | if [ -s users/${file}_fos.SED ]; then |
49 | dest="users" | 50 | dest="users" |
50 | fi | 51 | fi |
51 | rm users/${file}_fos.SED | 52 | rm users/${file}_fos.SED >/dev/null 2>&1 |
52 | rm -d `dirname users/${file}` >/dev/null 2>&1 | 53 | rm -d `dirname users/${file}` >/dev/null 2>&1 |
54 | fi | ||
55 | # "Devuan" is only two pages that get sorted. "Sandbox" is a mixture of standard examples, stuff that was copied to PmWiki, and other things that should get unsorted. | ||
56 | # Skipping anything with "<a href="/Main/UnknownUser">UnknownUser</a></span></div>". | ||
57 | if [[ "${base}" == "Sandbox" ]]; then | ||
58 | dest="unsorted" | ||
59 | mkdir -p `dirname users/${file}` | ||
60 | sed -i -E ${ogWiki}/${base}/${file}.HTM -e "s%<a href=\"/Main/UnknownUser\">UnknownUser</a></span></div>%%w users/${file}_fos.SED" | ||
61 | if [ -s users/${file}_fos.SED ]; then | ||
62 | dest="" | ||
63 | fi | ||
64 | rm users/${file}_fos.SED >/dev/null 2>&1 | ||
65 | rm -d `dirname users/${file}` >/dev/null 2>&1 | ||
66 | fi | ||
67 | |||
68 | if [[ "${dest}" != "" ]]; then | ||
53 | mkdir -p `dirname ${dest}/${file}` | 69 | mkdir -p `dirname ${dest}/${file}` |
54 | realURL=${dest}/${file} | 70 | realURL=${dest}/${file} |
55 | echo -e "ogWiki=${ogWiki}\nogURL=${ogURL}\nrealURL=${realURL}_fos\nogBase=${base}\nogFile=${file}\ntimestamp=${time}\n" > ${ogWiki}/${base}/${file}.md.md | 71 | echo -e "ogWiki=${ogWiki}\nogURL=${ogURL}\nrealURL=${realURL}_fos\nogBase=${base}\nogFile=${file}\ntimestamp=${time}\n" > ${ogWiki}/${base}/${file}.md.md |