diff options
| author | dvs1 | 2025-03-14 12:06:59 +1000 |
|---|---|---|
| committer | dvs1 | 2025-03-14 12:06:59 +1000 |
| commit | 23854d8283e200edebc8d9105e2bc4822daaff22 (patch) | |
| tree | ad9d6a9e43eff3594962d557a3a621bfda4cb118 /SuckIt | |
| parent | Tooltip TODO++ (diff) | |
| download | notYetAnotherWiki-23854d8283e200edebc8d9105e2bc4822daaff22.zip notYetAnotherWiki-23854d8283e200edebc8d9105e2bc4822daaff22.tar.gz notYetAnotherWiki-23854d8283e200edebc8d9105e2bc4822daaff22.tar.bz2 notYetAnotherWiki-23854d8283e200edebc8d9105e2bc4822daaff22.tar.xz | |
Include Foswiki/Sandbox in unsorted.
Diffstat (limited to '')
| -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 |
