X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=Wiki.page;h=9e135ad1ae1bee697e693724458aa593f667aa2e;hb=7799a762ca2dfbd022f7f8425fc207c8211e3ef7;hp=5effa39776e13d0c6c3e8ef2564ecebc523b760f;hpb=62c3d9c54dec22772956bea9f2ec482c891e511e;p=busy diff --git a/Wiki.page b/Wiki.page index 5effa39..9e135ad 100755 --- a/Wiki.page +++ b/Wiki.page @@ -21,24 +21,31 @@ else lock="$(cut -d: -f1 "$lock")" fi -if [ -n "$edit" -a -r "Wiki/$edit" ]; then +if [ -n "$edit" -a -r "Wiki/${edit}${rev}" ]; then title="$(egrep -x 'title=.+' "Wiki/$edit.meta" |cut -d= -f2- || echo '(Untitled)')" cat < - +
Editing $title
- +

$title

- +
+ WikiEND elif [ -n "$info" -a -r "Wiki/${info}${rev}" ]; then @@ -60,8 +67,9 @@ elif [ -n "$info" -a -r "Wiki/${info}${rev}" ]; then rno=$(($rno+1)) done) Latest

- $($LOGIN && [ -z "$rev" ] && if [ -z "$lock" ]; then - echo "edit this page" + $($LOGIN && if [ -z "$lock" ]; then + [ -z "$rev" ] && echo "edit this page" + [ -n "$rev" ] && echo "Click edit to derive a new page revision from this one." else echo "This page is currently being edited by $lockedit anyway" fi @@ -81,10 +89,10 @@ elif [ -n "$info" -a -r "Wiki/${info}${rev}" ]; then
-
+

$title

$(_wiki Wiki/"${info}${rev}") -
+
WikiEND @@ -95,16 +103,16 @@ $LOGIN && cat < Comment:

- + Cancel WikiEND stat -c '' Wiki/${info}.comment.<0000000000-9999999999>_<000-999> && for each in $(ls -c Wiki/${info}.comment.<0000000000-9999999999>_<000-999>); do author=$(grep -m1 '^author=' "$each" |cut -d= -f2-) - echo "

$author wrote:

" - tail -n-1 $each - echo '
' + echo "

$author wrote:

" + tail -n+2 $each |_wiki + echo '
' done echo '' @@ -119,7 +127,7 @@ elif [ -z "$info" ]; then
WikiEND if [ -n "$search" ]; then - echo "

Search results for: $search

" + echo "

Wiki search results for: $search

" for each in $(grep -ile "$search" Wiki/<0000000000-9999999999>_<000-999>); do echo " @@ -155,7 +163,7 @@ WikiEND

$title

$description

View - $($LOGIN && echo "Change Title") + $($LOGIN && echo "Change Info") WikiEND $LOGIN && cat <Title:
Description:

- + Cancel