aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/SuckIt
diff options
context:
space:
mode:
authordvs12025-02-21 17:53:48 +1000
committerdvs12025-02-21 17:53:48 +1000
commit7d1d891d8fdec5f11d4f86ef7ff4bf8bf4ac0de0 (patch)
treeac88600dd6b24c98994a6ec3597852c563149e10 /SuckIt
parentWork around yet another colour corner case. (diff)
downloadnotYetAnotherWiki-7d1d891d8fdec5f11d4f86ef7ff4bf8bf4ac0de0.zip
notYetAnotherWiki-7d1d891d8fdec5f11d4f86ef7ff4bf8bf4ac0de0.tar.gz
notYetAnotherWiki-7d1d891d8fdec5f11d4f86ef7ff4bf8bf4ac0de0.tar.bz2
notYetAnotherWiki-7d1d891d8fdec5f11d4f86ef7ff4bf8bf4ac0de0.tar.xz
Try to sort out user profiles and user content. They don't make it easy, or possible.
Diffstat (limited to 'SuckIt')
-rwxr-xr-xSuckIt31
1 files changed, 30 insertions, 1 deletions
diff --git a/SuckIt b/SuckIt
index 57aa88b..0c45831 100755
--- a/SuckIt
+++ b/SuckIt
@@ -8,7 +8,10 @@ rm -fr Foswiki/*
8cp -r /opt/merged_EMPTY/Foswiki . 8cp -r /opt/merged_EMPTY/Foswiki .
9rm -fr PmWiki/* 9rm -fr PmWiki/*
10cp -r /opt/merged_EMPTY/PmWiki . 10cp -r /opt/merged_EMPTY/PmWiki .
11 11rm -fr unsorted
12mkdir -p unsorted
13rm -fr users
14mkdir -p users
12 15
13filter=" 16filter="
14 -name _default -prune -o \ 17 -name _default -prune -o \
@@ -31,6 +34,23 @@ do
31 echo "downloading ${URL}/${base}/${file}?cover=print" 34 echo "downloading ${URL}/${base}/${file}?cover=print"
32 # 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. 35 # 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.
33 curl --silent --no-progress-meter ${URL}/${base}/${file}?cover=print -o Foswiki/${base}/${file}.HTM 36 curl --silent --no-progress-meter ${URL}/${base}/${file}?cover=print -o Foswiki/${base}/${file}.HTM
37 # Attempt to separate user profiles from user content. Doesn't work when people turn their profiles into content.
38 if [[ "${base}" == "Main" ]]; then
39 dest="unsorted"
40 mkdir -p `dirname users/${file}`
41 sed -i -E Foswiki/${base}/${file}.HTM -e "s%<a href=\"/System/UserForm\">UserForm</a>%<p></p>%w users/${file}_fos.SED"
42 if [ -s users/${file}_fos.SED ]; then
43 dest="users"
44 else
45 rm users/${file}_fos.SED
46 rm -d `dirname users/${file}` 2>1 1>/dev/null
47 fi
48 mkdir -p `dirname ${dest}/${file}`
49 touch Foswiki/${base}/${file}.md
50 ln -sfr Foswiki/${base}/${file}.md ${dest}/${file}_fos.md
51 ln -sfr Foswiki/${base}/${file}.md.md ${dest}/${file}_fos.md.md
52 rm Foswiki/${base}/${file}.md
53 fi
34 fi 54 fi
35done 55done
36 56
@@ -56,6 +76,15 @@ do
56# curl --no-progress-meter ${URL}/?n=${base}.${file}?action=markdown -o PmWiki/${base}/${file}.MARKDOWN 76# curl --no-progress-meter ${URL}/?n=${base}.${file}?action=markdown -o PmWiki/${base}/${file}.MARKDOWN
57 echo "downloading ${URL}/?n=${base}.${file}?action=print" 77 echo "downloading ${URL}/?n=${base}.${file}?action=print"
58 curl --no-progress-meter ${URL}/?n=${base}.${file}?action=print -o PmWiki/${base}/${file}.HTM 78 curl --no-progress-meter ${URL}/?n=${base}.${file}?action=print -o PmWiki/${base}/${file}.HTM
79 # Seems there's no way to tell user profiles apart from user content. Unless I can find a list of users somewhere. Don't think there is one.
80 if [[ "${base}" == "Profiles" ]]; then
81 touch PmWiki/${base}/${file}.md
82 ln -sfr PmWiki/${base}/${file}.md unsorted/${file}_pm.md
83 ln -sfr PmWiki/${base}/${file}.md unsorted/${file}_pm.md.md
84 rm PmWiki/${base}/${file}.md
85 fi
86
87# TODO - groups are PmWiki/Onefang and PmWiki/Tiki
59 88
60# pandoc -f markdown -t commonmark_x --self-contained PmWiki//${base}/${file}.MD >PmWiki/${base}/${file}.md 89# pandoc -f markdown -t commonmark_x --self-contained PmWiki//${base}/${file}.MD >PmWiki/${base}/${file}.md
61# pandoc -f html -t commonmark_x --self-contained PmWiki//${base}/${file}.HTM >PmWiki/${base}/${file}.md 90# pandoc -f html -t commonmark_x --self-contained PmWiki//${base}/${file}.HTM >PmWiki/${base}/${file}.md