Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts on wiki.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/wiki.e>
#           or at <http://angg.twu.net/e/wiki.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.wikit_2001»			(to "wikit_2001")
# «.wikit_cgi»			(to "wikit_cgi")
# «.wikit_scripts»		(to "wikit_scripts")
# «.extracting_pages»		(to "extracting_pages")
# «.wikit»			(to "wikit")
# «.wiki_extracting_pages»	(to "wiki_extracting_pages")
# «.metakit_wiki»		(to "metakit_wiki")
# «.scripdoc»			(to "scripdoc")
# «.wiki_scripts»		(to "wiki_scripts")
# «.boa_wiki»			(to "boa_wiki")
# «.httpwiki»			(to "httpwiki")
# «.metakit_source»		(to "metakit_source")
# «.tclkit_source»		(to "tclkit_source")
# «.ewiki»			(to "ewiki")
# «.ewiki_do0»			(to "ewiki_do0")
# «.ewiki_do1»			(to "ewiki_do1")
# «.format.tcl»			(to "format.tcl")
# «.pywiki»			(to "pywiki")
# «.moinmoin_test»		(to "moinmoin_test")
# «.travelling_moin_1»		(to "travelling_moin_1")
# «.travelling_moin__home»	(to "travelling_moin__home")
# «.travelling_moin__twu»	(to "travelling_moin__twu")
# «.mediawiki»			(to "mediawiki")





#####
#
# wikit (2001)
# 2001sep21
#
#####

# «wikit_2001»  (to ".wikit_2001")
# (find-shttpw3 "mini.net/cgi-bin/wikit/51.html")
# (find-shttpw3 "mini.net/cgi-bin/wikit/1.html")
# (find-shttpw3 "mini.net/cgi-bin/wikit/48.html")
# (find-shttpw3 "mini.net/cgi-bin/wikit/48.html")
# (find-shttpw3 "www.equi4.com/pub/tk/")
# (find-shttpw3 "www.equi4.com/pub/tk/tclkit-8.4-25-linux/")

#*
rm -Rv /tmp/wikit/
mkdir  /tmp/wikit/
cd     /tmp/wikit/
zcat $S/http/mini.net/cgi-bin/wikit.gz > wikit.tkd
cp   $S/http/www.equi4.com/pub/tk/tclkit-8.4-25-linux/tclkit.bin tclkit
chmod 755 tclkit
chmod 755 wikit.tkd
./tclkit wikit.tkd

#*
# The error:
# tclkit wikit.tkd
# view index is out of range
#     while executing
# "mk::get doc.scripts!0 text"
#     (file "wikit.tkd" line 6)

#*
# (find-shttpfile "www.equi4.com/pub/tk/examples/")
cd $S/http/www.equi4.com/pub/tk/examples/
cp -av {sdx,wikit}.{bin,README} /tmp/wikit/
cd /tmp/wikit/


#*

   1. Grab a compressed copy of [[the Tcl'ers Wiki]] at
     [[http://mini.net/cgi-bin/wikit.gz]] (or an empty Wiki at [[[1]]])
   2. Uncompress it to wikit.tkd
   3. Grab the appropriate runtime of [[TclKit]] for your system at
     [[http://www.equi4.com/tclkit/]]
   4. Uncompress and rename it to tclkit (leave as is on Windows)
   5. Make both files executable: chmod a+rx wikit.tkd tclkit
   6. Type tclkit wikit.tkd ... and you should be up and running



http://www.equi4.com/tclkit/
http://www.equi4.com/pub/tk/README
http://www.equi4.com/pub/tk/tclkit-8.4-25-linux/tclkit.bin
http://www.equi4.com/pub/tk/examples/README
http://www.equi4.com/pub/tk/examples/wikit.bin
http://www.equi4.com/pub/tk/examples/wikit.README
http://www.equi4.com/pub/tk/examples/sdx.README
http://www.equi4.com/pub/tk/examples/sdx.bin








#####
#
# wikit as a cgi
# 2000apr16
#
#####

# «wikit_cgi»  (to ".wikit_cgi")
# (find-es "wiki" "boa_wiki")
# (find-es "tcl" "metakit_wiki")

#*
# psne http://www.equi4.com/tclkit/tclkit-linux.gz

# Unpack tclkit.

cd ~/bin/
gzip -cd < $S/http/www.equi4.com/tclkit/tclkit-linux.gz > tclkit
chmod 755 tclkit


# psne http://mini.net/cgi-bin/wikit.gz
# wget http://mini.net/cgi-bin/wikit.gz
# cd $S/http/mini.net/cgi-bin/ && scp edrx@sucuri:wikit.gz .
# mv -v wikit.gz.1 wikit.gz


# Create the dir with the scripdocs (the files with the Tcl code and
# the pages). This dir must writeable by "nobody" (the user who runs
# the cgis) because lockfiles will be created and the scripdocs will
# be rewritten by the cgis.

rm -Rv ~/WIKIS
mkdir ~/WIKIS
chmod 777 ~/WIKIS
cd ~/WIKIS/
gzip -cd < $S/http/mini.net/cgi-bin/wikit.gz > wikit
chmod 666 wikit
#*

# Create the two cgis, wikit and wikit.gz.
# The hard part went to a shell function.
# (find-angg ".zshrc" "wikis")
#
cd /usr/lib/cgi-bin/
create_wiki_cgis wikit

# (find-fline "/usr/lib/cgi-bin/")
#*


# The three tests:

# Run with the Tk interface:
/usr/lib/cgi-bin/wikit
#*
# Run with the cgi interface:
lynx http://127.0.0.1/cgi-bin/wikit

#*
cd /tmp/
wget http://127.0.0.1/cgi-bin/wikit.gz
gzip -dv wikit.gz
cmp wikit ~/WIKIS/wikit

#*

# (find-fline "/var/log/apache/")

# (find-node "(fileutils)chgrp invocation")
# (find-node "(fileutils)chown invocation")
# (find-node "(sh-utils)groups invocation")




#####
#
# Extracting the scripts from a wiki
# 2000apr16
#
#####

# «wikit_scripts»  (to ".wikit_scripts")
lynx -dump $S/http/www.equi4.com/jcw/wiki.cgi/18.html > /tmp/18
# (find-fline "/tmp/18" "--scripts")
# (find-angg ".zshrc" "wikis")

rm -Rv /tmp/wikit/
mkdir  /tmp/wikit/
cd     /tmp/wikit/

$TCLKIT $WIKIDIR/wikit --scripts: | tee .scripts
for i in $(awk '{print $3}' .scripts); do
  echo $i
  $TCLKIT $WIKIDIR/wikit --scripts/${i}:text > $i
done

# (find-fline "/tmp/wikit/")
# (find-fline "/tmp/wikit/cli.tcl")
# (find-fline "/tmp/wikit/cli.tcl" "ProcessOneArg")
# (find-fline "/tmp/wikit/wikit.tcl")
# (find-fline "/tmp/wikit/wikit.tcl" "The main code")




#####
#
# Extracting pages from a wiki
#
#####

# «extracting_pages»  (to ".extracting_pages")
# (find-es "tcl" "wiki_extracting_pages")

cd ~/wiki
./tclkit wiki0_ -scripts
./tclkit wiki0_ -scripts:
./tclkit wiki0_ -scripts/0
./tclkit wiki0_ -scripts/0:
./tclkit wiki0_ -scripts/0:text
./tclkit wiki0_ -scripts/dump.tcl
./tclkit wiki0_ -scripts/dump.tcl:
./tclkit wiki0_ -scripts/dump.tcl:text
./tclkit wiki0_ dump
./tclkit wiki0_ dump metakit_

./tclkit wiki0_ -pages
./tclkit wiki0_ -pages:
./tclkit wiki0_ -pages:name
./tclkit wiki0_ -pages/10:
./tclkit wiki0_ -pages/10:name
./tclkit wiki0_ -pages/10:page

./tclkit wiki0_ -pages:date
./tclkit wiki0_ -pages:who
./tclkit wiki0_ -pages:format
./tclkit wiki0_ -pages:refs

./tclkit wiki0_ -pages/0:
./tclkit wiki0_ -pages/1:
./tclkit wiki0_ -pages/2:
./tclkit wiki0_ -pages/3:
./tclkit wiki0_ -pages/4:
./tclkit wiki0_ -pages/5:
./tclkit wiki0_ -pages/6:

./tclkit wiki0_ -pages/0: -pages/0:



lynx $WIKI/metakit

lynx $WIKI/wikit'?'wikit+command+line
lynx $WIKI/wikit'?'wikit+command+line+for+windows95

# (find-es "tcl")



cd $ES
agrep « tcl.e

# (find-es "tcl" "wikit")
# (find-es "tcl" "wikit_cgi")
# (find-es "tcl" "wiki_extracting_pages")
# (find-es "tcl" "metakit_wiki")
# (find-es "tcl" "scripdoc")
# (find-es "tcl" "wiki_scripts")
# (find-es "http")
# (find-es "http" "boa_wiki")



# (find-fline "~/EXPECT/")




# (find-fline "~/TCL/httpwiki")
# (find-fline "~/TCL/httpwiki")

httpwiki get $WIKI/wiki0 10 | tee /tmp/10
httpwiki eget $WIKI/wiki0 10 | tee /tmp/10

# (find-fline "/tmp/10")

httpwiki send $WIKI/wiki0 10 < /tmp/10






#####
#
# wikit, running locally (with tclkit)
#
#####

# «wikit»  (to ".wikit")

# Yes, I'm having to run the binaries
# without having the source. Urgh.

# To get the newest version, with all the current pages:
psne http://mini.net/cgi-bin/wikit.gz
#*
cd $S/http/mini.net/cgi-bin/

cd /usr/local/bin/
gzip -cd < $S/http/www.equi4.com/tclkit/tclkit-linux.gz > tclkit
chmod 755 tclkit
gzip -cd < $S/http/mini.net/cgi-bin/wikit.gz > wikit
chmod 755 wikit
cp wikit wikit2
#*
wikit

mkdir /tmp/pages
wikit2 -pages:		| tee /tmp/pages.titles
wikit2 -pages/485:	| tee /tmp/pages/485.txt
# (find-fline "/tmp/pages/485.txt")
# (find-fline "/tmp/pages.titles")

wikit2 -pages:page	| tee /tmp/pages.bigmess
# (find-fline "/tmp/pages.bigmess")

#*
# (find-node "(zsh)Complex Commands")

mkdir /tmp/pages/
i=0
while [[ $i -le 532 ]] do
  echo $i
  wikit2 -pages/$i: > /tmp/pages/$i.txt
  i=$[$i+1]
done





#####
#
# Using Tcl to retrieve pages from a wikit
#
#####

# «wiki_extracting_pages»  (to ".wiki_extracting_pages")

# (find-fline "/usr/lib/tcl8.0/")
# (find-fline "/usr/lib/tcl8.0/http1.0/http.tcl")
# (find-fline "/usr/lib/tcl8.0/http1.0/http.tcl" "proc http_get")
# (find-fline "/var/log/apache/error.log")

source /usr/lib/tcl8.0/http1.0/http.tcl
puts [http_data [http_get http://localhost/wikit/wikit.cgi]]

source /usr/lib/tcl8.0/http1.0/http.tcl
puts [http_data [http_get http://localhost/wikit/wikit.cgi/532.html]]

source /usr/lib/tcl8.0/http1.0/http.tcl
puts [http_data [http_get http://localhost/wikit/wikit.cgi/532.html -query \
{C=Hello, my name is Edrx.

I live on dog food.

My home page is http://www.mat.puc-rio.br/~edrx/ .

'one'
''two''

'''three'''
''''four''''}]]

# (find-fline "/tmp/usecgi.tcl")
# (find-fline "/tmp/pages/14.txt")

# cp /usr/local/bin/wikit wikit_cgi



cd /var/www/wikit/
tclkit wikit_cgi wikit

cd /var/www/wikit/
tclkit wikit_cgi -pages:
tclkit wikit_cgi -pages/532:page





tclkit wikit2 wikit

cp /usr/local/bin/wikit /var/www/wikit.cgi
cp /usr/local/bin/wikit /usr/lib/cgi-bin/wikit.cgi

lynx $LH/wikit.cgi
lynx $LH/cgi-bin/wikit.cgi
~/EXPECT/httpc1 80 /wikit.cgi
# (find-fline "/var/log/apache/")
# (find-fline "/var/log/apache/error.log")
ln -s /usr/local/bin/tclkit /usr/bin/tclkit

# (find-fline "/var/www/wikit.cgi")


# A nice way to find out what code does what is to cause an error:
wikit2 -pages/:
# (find-fline "/tmp/cli.tcl")



lynx -force_html $S/http/www.equi4.com/jcw/wiki/ScriptedDocument

cd /usr/local/bin/
wikit dump

# (find-fline "$S/http/mini.net/cgi-bin/wikit.gz" "tclkit wikit.tkd dump")
# (find-fline "$S/http/mini.net/cgi-bin/wikit.gz" "sdx fs2sd")

laf $S/http/www.equi4.com/tclkit/wikit.tkd

cd $S/http/www.equi4.com/tclkit/
tclkit wikit.tkd dump				|& l
tclkit wikit.tkd --pages:			|& l
tclkit wikit.tkd --pages/24:page		|& l
tclkit wikit.tkd --scripts/wikit.tcl:text	|& l

wikit --pages:		|& l
wikit --pages:/24:page	|& l

rm -Rv /tmp/wikit/
mkdir /tmp/wikit/
cd $S/http/www.equi4.com/tclkit/
for i in cgi2.tcl cli.tcl dump.tcl format.tcl Html_library.tcl \
  http2.tcl lock.tcl modify.tcl usecgi.tcl usetk.tcl wikit.tcl \
  wipeout.tcl; do 
tclkit wikit.tkd --scripts/${i}:text > /tmp/wikit/$i
done



# (eeman "3tk text" "^BINDINGS")

# (find-vldifile "tkdiff.list")
# (find-fline "/usr/X11R6/bin/tkdiff")

# (eeman "3tk send")
# (find-fline "~/TK/diaglib.013" "proc coords_to_stdout")

send temp coords_to_stdout

xauth generate :0.0 .

lynx $S/http/psg.com/~joem/tcl/faq.html#XServerInsecure




######
#
# linwikit
#
######

# Blank linwikit:
#
cp -iv $S/http/www.equi4.com/tclkit/wikit.tkd /var/www/wikit/linwikit_cgi
cd /var/www/wikit/
chmod 777 linwikit_cgi
cat > linwikit.cgi <<'---'
#!/bin/sh
exec /usr/local/bin/tclkit /var/www/wikit/linwikit_cgi wikit
---
chmod 755 linwikit.cgi





######
#
# metakit wikit
# 99oct12
#
######

# «metakit_wiki»  (to ".metakit_wiki")
# (find-es "tcl" "wikit_cgi")

# (find-fline "$S/http/www.equi4.com/")
# (find-fline "$S/http/www.equi4.com/metakit/mk4tcl/")
# (find-fline "$S/http/www.equi4.com/metakit/mk4tcl/demo.tcl")
# (find-fline "$S/http/www.equi4.com/metakit/mk4tcl/mk4tcl.cpp")
# (find-fline "$S/http/www.equi4.com/tclkit/")

http://www.equi4.com/metakit/wiki/
edrxnetscape http://www.equi4.com/metakit/wiki/ &

psne http://www.equi4.com/metakit/wiki.gz


cd /var/www/wikit/
gzip -cd < $S/http/www.equi4.com/metakit/wiki.gz > mkwikit_cgi
chmod 666 mkwikit_cgi
cat > mkwikit.cgi <<'---'
#!/bin/sh
exec /usr/local/bin/tclkit /var/www/wikit/mkwikit_cgi
---
chmod 755 mkwikit.cgi

lynx $LH/wikit/mkwikit.cgi





######
#
# Scripted documents (wikit, for example)
# 99oct30
#
######

# «scripdoc»  (to ".scripdoc")

rm -Rv /usr/src/scripdoc/
cd /usr/src/
tar -xvzf $S/http/www.equi4.com/tclkit/scripdoc.tar.gz
cd /usr/src/scripdoc/ 
tr -d \\r < README.txt > README
#
# (eeman "etags" "tcl")
etags --lang=none --regex='/proc[ \t]+\([^ \t]+\)/\1/' wikit/*.tcl *.tcl

# (find-sdfile "")
# (find-sdfile "README")
# (find-sdfile "wikit/")

# Recreate empty.tkd and compare it with the old one.
# Create wikit0.tkd from wikit/*.tcl,
# create wikit1.tkd from cli.tcl+wikit/*.tcl,
# ereate wikit2.tkd with all that and dotmp.tcl,
#   which is almost only a "source /tmp/ee".
#
cd /usr/src/scripdoc/ 
mv -v empty.tkd empty0.tkd
tclkit mkempty.tcl
cmp empty.tkd empty0.tkd
#
cp empty.tkd wikit0.tkd
tclkit wikit0.tkd -scripts=wikit/
#
cp -v cli.tcl wikit/
cp empty.tkd wikit1.tkd
tclkit wikit1.tkd -scripts=wikit/
#
cat > wikit/do.tcl <<'---'
proc writefile {fname bigstr} {
  set f [open $fname w]; puts -nonewline $f $bigstr; close $f
}
if {$argc==1} {source /tmp/ee} else {eval [lindex $argv 1]}
---
cp empty.tkd wikit2.tkd
tclkit wikit2.tkd -scripts=wikit/


# Demo:
#
cat > /tmp/ee <<'---'
puts "Hello oo oo oorld"
---
tclkit /usr/src/scripdoc/wikit2.tkd do
tclkit /usr/src/scripdoc/wikit2.tkd do 'puts "aaa aaah"'

tclkit /usr/src/scripdoc/wikit2.tkd do '
  writefile /tmp/ocoms "[join [lsort [info commands]] "\n"]\n"
  writefile /tmp/oprocs "[join [lsort [info procs]] "\n"]\n"
'

lynx -dump $S/http/www.equi4.com/metakit/mk4tcl/index.html > mk4tcl.txt
# (find-sdfile "mk4tcl.txt")

tclkit /usr/src/scripdoc/wikit2.tkd do '
  puts "A [mk::file open]"
  puts "B [mk::file views doc]"
    foreach v [mk::file views doc] {
        puts [mk::view layout doc.$v]
    }
  puts "D [mk::view layout doc]"
  puts "E [mk::view layout doc.scripts]"
  puts "E [mk::view layout doc.admin]"

'

  puts "C [mk::file views doc.scripts]"


# (find-fline "/tmp/")
# (find-fline "/tmp/ocoms")
# (find-fline "/tmp/oprocs")
# (find-sdfile "wikit/")
# (find-sdfile "wikit/dump.tcl")
# (find-fline "$S/http/www.equi4.com/metakit/mk4tcl/")
# (find-fline "$S/http/www.equi4.com/metakit/mk4tcl/demo.tcl")
# (find-fline "$S/http/www.equi4.com/metakit/mk4tcl/mk4tcl.cpp")

lynx $S/http/www.equi4.com/metakit/mk4tcl/index.html
lynx $S/http/www.equi4.com/metakit/mk4tcl/index.html#Terminology




cd /usr/src/scripdoc/ 
cp empty.tkd wikit.tkd
tclkit wikit.tkd -scripts=wikit/

./wikit.tkd -config-script=wikit
./wikit.tkd dump





######
#
# more on changing wiki scripts
# 99nov02
#
######

# «wiki_scripts»  (to ".wiki_scripts")

cd ~/wiki/
tclkit metakit_ -scripts:
tclkit metakit_ -scripts: | awk '{print $3}'
tclkit metakit_ -scripts/wipeout.tcl:
tclkit metakit_ -scripts/wipeout.tcl:text

cd ~/wiki/
rm -Rv scripts
mkdir scripts
for i in $(tclkit metakit_ -scripts: | awk '{print $3}'); do
  echo $i
  tclkit metakit_ -scripts/$i'':text > scripts/$i
done
laf scripts

cd ~/wiki/scripts/
etags --lang=none --regex='/proc[ \t]+\([^ \t]+\)/\1/' *.tcl

# (code-c-d "wiscri" "~/wiki/scripts/")
# (find-wiscrifile "")
# (find-wiscrifile "usecgi.tcl")
# (find-wiscrifile "usecgi.tcl" "generate an edit page")
# (find-wiscrifile "wikit.tcl" "GetPage")
# (find-wiscritag "cgi_textarea")
# (find-wiscritag "cgi_quote_html")

# How does wikit encode pages for editing? I want to download the raw
# text of a page (via cgi, without altering the wiki's scripts) and
# edit it on emacs...

cd /tmp
wget $WIKI/wikit/0@
# (find-fline "/tmp/0@")

expect -c '
  set s [exec cat /tmp/0@]
  if [regexp "\n<textarea \[^\n>\]*>\n(.*)\n</textarea>" $s -> text] {
    # Undo the work of this function: (find-wiscritag "cgi_quote_html")
    regsub -all {\&quot;} $text {"} text
    regsub -all {\&lt;}   $text {<} text
    regsub -all {\&gt;}   $text {>} text
    regsub -all {\&amp;}  $text {&} text
    puts -nonewline $text
  }
' | tee /tmp/0@.txt


# «wiki_extracting_pages»






######
#
# Editing wikit pages with emacs
#
######

# (find-node "(elisp)Modes")
# (find-fline "~/.emacs" "auto-mode-alist")
# (find-node "(elisp)Auto Major Mode")

cd /tmp
~/TCL/wikipage -r 532






#####
#
# Using boa to create user-owned wikis
# 99oct30
#
#####

# «boa_wiki»  (to ".boa_wiki")

# Unpack and compile boa
#
rm -Rv ~/boa-0.92/
cd ~
tar -xvzf $S/http/www.boa.org/boa-0.92q.tar.gz
cd ~/boa-0.92/src/
make	|& tee om


# Create ~/wiki/ ,
#        ~/wiki/tclkit .
#
rm -Rv ~/wiki/
mkdir  ~/wiki/
cd     ~/wiki/
gzip -cd < $S/http/www.equi4.com/tclkit/tclkit-linux.gz > tclkit
chmod 755 tclkit


# Create ~/wiki/wikit_ ,
#        ~/wiki/wikit ,
#        ~/wiki/wikit.gz .
# wikit_ (the Tcler's wiki) is a tclkit script, i.e., something that
#   contains lots of wiki pages and some support scripts in Tcl; it
#   will rewrite itself (but changing only the pages' text!) every
#   time that a user modifies a page.
# wikit is the cgi that calls tclkit to execute wikit_, and
# wikit.gz is a cgi that sends a gzipped copy of wikit_.
#
gzip -cd < $S/http/mini.net/cgi-bin/wikit.gz > wikit_
cat > wikit <<'---'
#!/bin/sh
exec ~/wiki/tclkit ~/wiki/wikit_ wikit
---
cat > wikit.gz <<'---'
#!/bin/sh
echo -e "Content-type: text/plain\n"
exec gzip -c6 < ~/wiki/wikit_
---
chmod 755 wikit
chmod 755 wikit.gz


# Create ~/wiki/metakit_ ,
#        ~/wiki/metakit ,
#        ~/wiki/metakit.gz ;
# the same as above but for the metakit wiki.
#
gzip -cd < $S/http/www.equi4.com/metakit/wiki.gz > metakit_
cat > metakit <<'---'
#!/bin/sh
exec ~/wiki/tclkit ~/wiki/metakit_ wikit
---
cat > metakit.gz <<'---'
#!/bin/sh
echo -e "Content-type: text/plain\n"
exec gzip -c6 < ~/wiki/metakit_
---
chmod 755 metakit
chmod 755 metakit.gz


# Create ~/wiki/wiki0_ ,
#        ~/wiki/wiki0 ,
#        ~/wiki/wiki0.gz ;
# the same as above but for a clean wiki.
#
cat < $S/http/www.equi4.com/tclkit/wikit.tkd > wiki0_
cat > wiki0 <<'---'
#!/bin/sh
exec ~/wiki/tclkit ~/wiki/wiki0_ wikit
---
cat > wiki0.gz <<'---'
#!/bin/sh
echo -e "Content-type: text/plain\n"
exec gzip -c6 < ~/wiki/wiki0_
---
chmod 755 wiki0
chmod 755 wiki0.gz


# Create ~/wiki/conf/boa.conf ,
#        ~/wiki/conf/mime.types .
#
mkdir -p ~/wiki/conf/
cp /etc/mime.types ~/wiki/conf/
cat > ~/wiki/conf/boa.conf <<xxxxxxxx
Port 8080
ServerAdmin edrx@mat.puc-rio.br
ErrorLog $HOME/wiki/error_log
AccessLog $HOME/wiki/access_log
DocumentRoot $HOME/wiki
DirectoryIndex index.html
KeepAliveMax 100
KeepAliveTimeout 10
DefaultType text/plain
# AddType application/x-httpd-cgi cgi
ScriptAlias /wiki/ $HOME/wiki/
xxxxxxxx


# Kill a possible previous server...
killall -v boa
#
# ...and start a new one.
~/boa-0.92/src/boa -c ~/wiki/ &


# Do some tests: call each wiki...
# (But note that editing "<textarea ...>" fields
# is clumsy in lynx!)
#
lynx http://angg:8080/wiki/wikit
lynx http://angg:8080/wiki/metakit
lynx http://angg:8080/wiki/wiki0

lynx http://tardis.mat.puc-rio.br:8080/wiki/wikit
lynx http://tardis.mat.puc-rio.br:8080/wiki/metakit
lynx http://tardis.mat.puc-rio.br:8080/wiki/wiki0

rm -fv wiki*
rm -fv metakit*
cd /tmp
for i in wikit metakit wiki0; do
  wget http://angg:8080/wiki/$i.gz
  gzip -dv $i.gz
  cmp $i ~/wiki/$i''_
done
rm -fv wiki*
rm -fv metakit*





#####
#
# Some temporary notes on using the chunk above on my university account
# 99oct29
#
#####

# (find-fline "$MAIL" "wiki")
# (find-es "http" "boa_wiki")

psne http://www.boa.org/boa-0.92q.tar.gz
psne http://www.equi4.com/tclkit/tclkit-linux.gz
psne http://mini.net/cgi-bin/wikit.gz
psne http://www.equi4.com/metakit/wiki.gz
psne http://www.equi4.com/tclkit/wikit.tkd

#
# Testa pra ver se os arquivos chegaram bem.
#
laf $(find $S -type f)
ps ax | grep wget
for i in $(find $S -type f | grep gz); do
  echo $i; gzip -cd < $i > /dev/null
done


cd ~/boa-0.92/src/
make boa_grammar.c y.tab.c y.tab.h
anonftp $BOTO 'mput boa_grammar.c y.tab.c y.tab.h' 'quit'
# 'cd boa-0.92/src'

# (find-es "http" "boa_wiki")

# Na PUC:
cd ~/boa-0.92/src/
cp ~/boa_grammar.c ~/y.tab.c ~/y.tab.h .
touch boa_grammar.c y.tab.c y.tab.h .
make	|& tee om2

# (find-fline "~/boa-0.92/src/")


lynx http://tardis.mat.puc-rio.br:8080/wiki/wikit


cd $ES
anonftp $MATINTA 'cd public_html/a/e' 'put http.e' 'quit'
# (find-es "page")

# On tardis,
cd ~/public_html/
DOREMOTE=1 make THDIR=a/s -f a/s/Makefile makefile all	|& tee ~/o



#####
#
# httpwiki
# 2000may18
#
#####

# «httpwiki»  (to ".httpwiki")
# (find-fline "~/TCL/httpwiki")
# (find-angg ".emacs" "wiki")

~/TCL/httpwiki
~/TCL/httpwiki eget wikit-l 32 -
~/TCL/httpwiki send ewiki-l 999 - <<'---'
Hello.
---
~/TCL/httpwiki send ewiki-l 999 - - <<'---'
Hello.
---

(defun getwikipage (wikiname n)
  (let ((tmppage (format "~/tmp/wikipages/%s.%d" wikiname n)))
    (eev (format "~/TCL/httpwiki eget %s %d %s && \
gnuclient -q %s" wikiname n tmppage  tmppage) nil)))

; (getwikipage "ewiki-l" 0)

(defun sendwikipage (wikiname n)
  (write-ee (point)
	    (save-excursion (re-search-forward "\\\n%*\\|\\'")
			    (match-beginning 0))
	    "" "" "~/tmp/tmpwikipage")
  (eev (format "~/TCL/httpwiki send %s %d ~/tmp/tmpwikipage"
	       wikiname n) nil))

# (find-node "(elisp)Regexp Search")
# (find-node "(elisp)Simple Match Data" "match-beginning")
# (find-node "(emacs-e20)Regexps" "\\'")






#####
#
# httpwiki (OLD & OBSOLETE!!!)
# 99nov16
#
#####

# (find-fline "~/TCL/httpwiki")

cd /tmp/
~/TCL/httpwiki
~/TCL/httpwiki eget http://www.mini.net/cgi-bin/wikit 621 | tee 621
~/TCL/httpwiki eget http://www.mini.net/cgi-bin/wikit 621 | tee 627
~/TCL/httpwiki eget http://www.mini.net/cgi-bin/wikit 13 | tee 13
~/TCL/httpwiki eget http://www.mini.net/cgi-bin/wikit 0 | tee 0

# (find-fline "/tmp/13")
# (find-fline "/tmp/621")
# (find-fline "/tmp/0")
# (find-fline "/tmp/627")

# 0: top
# 13: tclers
# 621: eduardo ochs
# 627: How to edit Wikit pages with Emacs






#####
#
# metakit-2.01
# 2000apr07
#
#####

# «metakit_source»  (to ".metakit_source")

# (code-c-d "mkit" "/usr/src/metakit-2.01/")
# (find-mkitfile "")
# (find-mkitfile "README")
# (find-mkitfile "README" "unix/")

rm -Rv /usr/src/metakit-2.01/
cd /usr/src/
tar -xvzf $S/http/download.sourceforge.net/metakit/metakit-2.01.tar.gz
cd /usr/src/metakit-2.01/

cd /usr/src/metakit-2.01/builds
../unix/configure --with-tcl=/usr/lib	|& tee ../och
make					|& tee ../om
make test				|& tee ../omt

# (find-mkitfile "och" "--with-tcl=")
# (find-mkitfile "om")

# Tcl8.0 desn't have TCL_DECLARE_MUTEX and the build fails.
# With Tcl8.2 the build and the tests go ok.
#
# (find-mkitfile "om" "mkMutex")
# (find-mkitfile "tcl/mk4tcl.cpp" "mkMutex")
# (find-mkitfile "unix/metakit.spec" "TCL_DECLARE_MUTEX")
# (find-mkitfile "omt")
#
# (find-vldifile "glibc-doc.list")
# (find-fline "/usr/doc/glibc-doc/")
# (find-node "(libc)Mutexes")



# (find-mkitfile "unix/")

# (find-mkitfile "CHANGES" "tclkit")
# (find-mkitfile "README" "tclkit")
# (find-mkitfile "tcl/tequila/README" "tclkit")
# (find-mkitfile "tcl/tequila/tequical.tcl" "tclkit")


# (find-fline "/usr/doc/tcl8.2-dev/")
# (find-fline "/usr/doc/tcl8.2/")
# (find-vldifile "tcl8.2-dev.list")
# (find-vldifile "tcl8.2.list")

# (find-es "wiki" "scripdoc")




#####
#
# tclkit 8.3.6
# 2000apr07
#
#####

# «tclkit_source»  (to ".tclkit_source")

# (code-c-d "tkit" "/usr/src/tclkit-8.3/")
# (find-tkitfile "")
# (find-tkitfile "README")
# (find-tkitfile "README" "Tcl 8.3.0")
# (find-tkitfile "readme2.txt")
# (find-tkitfile "M-linux.sh")

rm -Rv /usr/src/tclkit-8.3/
cd /usr/src/
tar -xvzf $S/http/www.equi4.com/previews/tclkit-8.3-6.tar.gz
cd /usr/src/tclkit-8.3/




#####
#
# ewiki
# 2000may12
#
#####

# «ewiki»  (to ".ewiki")
# (find-es "wiki" "scripdoc")

# Create an empty ewiki:

rm -Rv /usr/src/scripdoc/
cd /usr/src/
tar -xvzf $S/http/www.equi4.com/tclkit/scripdoc.tar.gz
cd /usr/src/scripdoc/ 
# Remove all CRs:
for i in README.txt cli.tcl mkempty.tcl wikit/*; do
  echo $i
  tr -d \\r < $i > tmp_nocrs; mv tmp_nocrs $i
done

cp empty.tkd ewiki
tclkit ewiki -scripts=wikit/
#
cp ewiki ~/WIKIS/ewiki
chmod 666 ~/WIKIS/ewiki
#
cd /usr/lib/cgi-bin/
create_wiki_cgis ewiki


# Test using the Tk interface:
cd /usr/src/scripdoc/
ewiki

# Test using the CGI interface:
lynx http://127.0.0.1/cgi-bin/ewiki

# (find-fline "/var/log/apache/")



# Upload:
cd ~/WIKIS/
anonftp angg.twu.net 'cd ~/WIKIS/' 'put ewiki' 'chmod 666 ewiki'

# At twu:
cd ~/cgi-bin/
create_wiki_cgis ewiki

# From anywhere:
lynx http://angg.twu.net/cgi-bin/ewiki



# (find-fline "~/TCL/httpwiki")
rm -Rv /tmp/wikipages/
mkdir  /tmp/wikipages/
cd     /tmp/wikipages/
~/TCL/httpwiki eget http://127.0.0.1/cgi-bin/ewiki 0 | tee 0
gnuclient -q 0


~/TCL/httpwiki get http://127.0.0.1/cgi-bin/ewiki 0




#####
#
# Hacking ewiki's Tcl scripts
# 2000may13
#
#####

# «ewiki_do0»  (to ".ewiki_do0")
# (find-es "wiki" "ewiki")
# (find-es "wiki" "extracting_pages")

# (find-sdfile "")
# (find-sdfile "README")
# (find-sdfile "wikit/")
# (find-sdfile "wikit/dump.tcl")
# (find-sdfile "cli.tcl")

# We need braces in "scripts/${i}:text" for a very curious reason:
# (find-node "(zsh)Parameter Expansion" "Flags\n" "\nt\n")


cd ~/WIKIS/

# Extract all scripts from a wiki,
# (find-fline "~/WIKIS/tclscripts/")
#
rm -Rv ~/WIKIS/tclscripts/
mkdir  ~/WIKIS/tclscripts/
cd     ~/WIKIS/tclscripts/
for i in $(tclkit ../ewiki -scripts: | awk '{print $3}'); do
  echo $i
  tclkit ../ewiki -scripts/${i}:text > $i
done

# Add the do.tcl string.
#
cat > do.tcl <<'---'
proc writefile {fname bigstr} {
  set f [open $fname w]; puts -nonewline $f $bigstr; close $f
}
if {$argc==1} {source /home/root/bin/ee.generic} else {eval [lindex $argv 1]}
---

# Set the scripts in ewiki to everything in tclscripts/ .
#
cd ~/WIKIS/
tclkit ewiki -scripts=tclscripts/





#####
#
# First tests with ewiki's new "do" script
# 2000may15
#
#####

# «ewiki_do1»  (to ".ewiki_do1")

# Here we use the "do.tcl" script (that we've added to ewiki in the
# last section) to execute commands in ewiki's Tcl library directly;
# we end this section by executing triunfantly a zsh alias that
# convers stdin to HTML using exactly the same engine that wikit uses
# to render its pages in HTML.

# Test ewiki's new "do" script:
cd ~/WIKIS/
tclkit ewiki do 'puts foo'

# (find-wiscrifile "")
# (find-wiscrifile "usecgi.tcl")
# (find-wiscrifile "wikit.tcl")
# (find-wiscrifile "wikit.tcl" "# The main code")
# (find-wiscrifile "format.tcl" "# In this file:")
# (find-wiscrifile "format.tcl" "\nproc StreamToHTML")
# (find-angg ".zshrc" "ewiki_do")

ewiki_do 'puts foo'
ewiki_do 'puts [info procs]'
ewiki_do 'puts [package names]'
ewiki_do 'puts [info body package]'
ewiki_do 'parray auto_index'
#*
ewiki_do "
  package require format
  namespace import WiKit::Format::*
  puts [set s [TextToStream {Foo http://foo/ [http://baz/] ''2: it''
'''3: bold'''

  code
   more code

   * item
   * another
----}]]
  puts ---
  puts [StreamToHTML \$s]
"
#*

# seems that
# T str   means str is plain text
# u str   means str is an "unnumbered" link
# x str   means str is a link to be displayed as a number
# i str   means str is italic text
# b str   means str is bold text
# {} str  means str is just space
# Q str   means <pre></pre> stuff
# U str   means str is the text of an item
# H -     means hrule

# (find-angg ".zshrc" "ewiki_dof")
ewiki_dof 'puts [StreamToHTML [TextToStream [exec cat]]]' <<'---'
Nhoimm
---

# (find-angg ".zshrc" "ewiki_s2h")
ewiki_s2h > /tmp/w.html <<'---'
Hello

   Hello

  indent
  ed    ed  http://foo/bar
    ted

http://foo/bar [http://plic/ploc] [Febr]
---
lynx /tmp/w.html




#####
#
# wikit's format.tcl as a standalone script
# 2000jun30
#
#####

# «format.tcl»  (to ".format.tcl")
# (find-wiscrifile "format.tcl" "# In this file:")
# grep  namespace ~/WIKIS/tclscripts/format.tcl
#*
(echo '#!/usr/bin/expect'
grep -v namespace ~/WIKIS/tclscripts/format.tcl
echo 'eval eval $argv'
) > /tmp/wikiformat
chmod 755 /tmp/wikiformat

/tmp/wikiformat "
  puts [set s [TextToStream {Foo http://foo/ [http://baz/] ''2: it''
'''3: bold'''

  code
   more code

   * item
   * another
----}]]
  puts ===
  puts [StreamToHTML \$s]
"

#*

(<<'%%%'
Foo http://foo/ [http://baz/] ''2: it''
'''3: bold'''

  code
   more code

   * item
   * another
----
%%%
) | /tmp/wikiformat "
  puts [set s [TextToStream [read stdin]]]; puts ===; puts [StreamToHTML \$s]"

#*

# make some changes by hand:
# (find-fline "/tmp/wikiformat" "variable urlRE")
# -> ...(@e|https?|ftp|news|mailto)...
# (find-fline "/tmp/wikiformat" "\nproc TextToStream")
# # Edrx
# proc =u {a} { regsub "^@e://" $a http://angg.twu.net/e/ a; EmitText u $a}
# proc =x {a} { regsub "^@e://" $a http://angg.twu.net/e/ a; EmitText u $a}

#*

(<<'%%%'
http://foo/
[http://baz/]
@e://foo.html
[@e://foo.html#baz]
----
%%%
) | /tmp/wikiformat "
  puts [set s [TextToStream [read stdin]]]; puts ===; puts [StreamToHTML \$s]"

#*


# (find-fline "/tmp/wikiformat" "variable urlRE")
#
/tmp/wikiformat '
  EmitText u http://foo; puts $vec; puts $stream
'



variable urlRE [FixupRE {(.*[]['\-\*\s]|^)(https?|ftp|news|mailto):([^[\s]+[^[\s\.,!\?;:'>])(.*)}]

# (find-wiscrifile "")
# (find-wiscrifile "format.tcl" "urlRE")
# (find-wiscrifile "format.tcl" '* 3 "urlRE")
# (find-wiscrifile "format.tcl" '* 5 "urlRE")





#####
#
# pywiki
# 2000aug06
#
#####

# «pywiki»  (to ".pywiki")
# (code-c-d "pywiki" "/usr/src/pywiki-0.4.2/")
#*
rm -Rv /usr/src/pywiki-0.4.2/
cd /usr/src/
tar -xvzf $S/ftp/voght.com/pub/voght/pywiki-0.4.2.tar.gz
cd /usr/src/pywiki-0.4.2/

python Configure.py
mv wikiconfig.py wikiconfig.py.old

cat > wikiconfig.py <<'---'
#!/usr/bin/env python
CGI_DIR = "/usr/lib/cgi-bin/"
IMAGE_DIR = "unknown_directory"
CGI_SCRIPT = "pywiki"
LOGO_FILE = "pywiki.gif"
---

pywiki.install

#*

# (find-pywikifile "")
# (find-pywikifile "README" "python Configure.py")
# (find-fline "/usr/lib/cgi-bin/")
# (find-fline "/usr/lib/cgi-bin/pagemodel.py")
# (find-fline "/usr/lib/cgi-bin/pageview.py")
# (find-fline "/usr/lib/cgi-bin/picklarchive.py")
# (find-fline "/usr/lib/cgi-bin/picklarchive.py" "RCS_PATH + ' -u %s 2>%s'")
# (find-fline "/usr/lib/cgi-bin/portable.py")
# (find-fline "/usr/lib/cgi-bin/pywiki")
# (find-fline "/usr/lib/cgi-bin/pywikiDir/RCS/")

# Wow, this is really impressive - the code is very small and it works
# out of the box (modulo trivial configurations). I think that this
# more than compensates for its markup language being inferior to that
# of wikit.

lynx http://127.0.0.1/cgi-bin/pywiki
# (w3-fetch "http://127.0.0.1/cgi-bin/pywiki")

# But moinmoin is much better...




#####
#
# moinmoin - first tests
# 2000sep02
#
#####

# «moinmoin_test»  (to ".moinmoin_test")
# (code-c-d "moin" "/usr/src/MoinMoin-0.2/")
# (code-c-d "moinw" "/usr/src/MoinMoin-0.2/wiki-moinmoin/")
# (find-moinfile "")
# (find-moinfile "INSTALL" "python moin.cgi")
# (find-moinwfile "")
# (find-moinwfile "moin_config.py" "url_prefix")
#*

# Unpack the pristine source
rm -Rv /usr/src/MoinMoin-0.2/
cd /usr/src/
tar -xvzf $S/http/download.sourceforge.net/moin/MoinMoin-0.2.tgz
cd /usr/src/MoinMoin-0.2/
# This is because apache will run cgis as "nobody":
chmod 777 $(find wiki-moinmoin/data -type d)
chmod 666 $(find wiki-moinmoin/data -type f)

# Copy the css and the images that are used by every moinmoin page
rm -Rv /var/www/wiki-moinmoin/
mkdir  /var/www/wiki-moinmoin/
cd /usr/src/MoinMoin-0.2/wiki-moinmoin/
cp -pv *.gif *.css img/* /var/www/wiki-moinmoin/

# Make InterWiki urls like "AnggE:grub.e.html#grub" work
# (find-moinwfile "data/intermap.txt")
# (find-moinwfile "data/text/InterWiki")
cd /usr/src/MoinMoin-0.2/
cat >> wiki-moinmoin/data/intermap.txt <<'---'
Angg http://127.0.0.1/L/
AnggA http://127.0.0.1/L/a/
AnggE http://127.0.0.1/L/e/
TclWiki http://127.0.0.1/cgi-bin/wikit
---

# Make the two real cgis
cd /usr/lib/cgi-bin/
cat > moin.cgi <<'---'
#!/bin/sh
cd /usr/src/MoinMoin-0.2/wiki-moinmoin
python moin.cgi
---
cat > moin.tgz <<'---'
#!/bin/sh
echo Content-type: text/plain
echo
cd /usr/src/MoinMoin-0.2/
exec tar -cvzf - *
---
chmod 755 moin.cgi moin.tgz

# Make the url "http://127.0.0.1/L/" work:
rm /var/www/L
ln -s ~/TH/L /var/www/L

#*






#####
#
# MoinMoin - making the Hurd Wiki (1)
# 2000sep19
#
#####

# «travelling_moin_1»  (to ".travelling_moin_1")
# Make the first version of the modifiable tgz:
#*
rm -Rv /usr/src/MoinMoin-0.2/
cd /usr/src/
tar -xvzf $S/http/download.sourceforge.net/moin/MoinMoin-0.2.tgz
cd /usr/src/MoinMoin-0.2/
#
# Prepare intermap.txt.orig, as the real intermap.txt will be it plus
# some lines that depend on where it's installed
cd /usr/src/MoinMoin-0.2/wiki-moinmoin/data/
cp -iv intermap.txt intermap.txt.orig
#
# tar everything
cd /usr/src/MoinMoin-0.2/
tar -cvzf ~/tmp/moinmoin-0.2.tgz *

#*
# moinmoin-0.2.tgz becomes the first version of hurdwiki.tgz:
cp -iv ~/tmp/moinmoin-0.2.tgz ~/tmp/hurdwiki.tgz





#####
#
# Installing the Hurd Wiki at home
# 2000sep19
#
#####

# «travelling_moin__home»  (to ".travelling_moin__home")
#*
# Download the last version from twu if necessay:
cd ~/tmp/
wget http://angg.twu.net/cgi-bin/hurdwiki.tgz
mv -v hurdwiki.tgz.1 hurdwiki.tgz

#*
# Unpack it at home:
rm -Rv /usr/src/hurdwiki/
mkdir  /usr/src/hurdwiki/
cd     /usr/src/hurdwiki/
tar -xvzf ~/tmp/hurdwiki.tgz

# This is needed because apache will run cgis as "nobody":
chmod 777 $(find wiki-moinmoin/data -type d)
chmod 666 $(find wiki-moinmoin/data -type f)

# Copy the css and the images that are used by every moinmoin page:
rm -Rv /var/www/wiki-moinmoin/
mkdir  /var/www/wiki-moinmoin/
cd /usr/src/hurdwiki/wiki-moinmoin/
cp -pv *.gif *.css img/* /var/www/wiki-moinmoin/

# Make InterWiki urls like "AnggE:grub.e.html#grub" work, but
# pointing to local copies of my files and of the other wiki:
# (find-moinwfile "data/intermap.txt")
# (find-moinwfile "data/text/InterWiki")
cd /usr/src/hurdwiki/wiki-moinmoin/data/
cat intermap.txt.orig - > intermap.txt <<'---'
Angg http://127.0.0.1/L/
AnggA http://127.0.0.1/L/a/
AnggE http://127.0.0.1/L/e/
TclWiki http://127.0.0.1/cgi-bin/wikit/
---

# Make the two real cgis:
cd /usr/lib/cgi-bin/
cat > hurdwiki.cgi <<'---'
#!/bin/sh
cd /usr/src/hurdwiki/wiki-moinmoin
python moin.cgi
---
cat > hurdwiki.tgz <<'---'
#!/bin/sh
echo Content-type: text/plain
echo
cd /usr/src/hurdwiki/
exec tar -cvzf - *
---
chmod 755 hurdwiki.cgi hurdwiki.tgz

# Make the url "http://127.0.0.1/L/" work:
rm /var/www/L
ln -s ~/TH/L /var/www/L
#*

# Simple tests:
cd /tmp/
wget -O - http://127.0.0.1/cgi-bin/hurdwiki.cgi
wget      http://127.0.0.1/cgi-bin/hurdwiki.tgz
# (find-fline "/var/log/apache/")
# (find-fline "/var/log/apache/error.log")
#*

# This block is to be used when I have edited some pages at home and I
# want to pack everything and then upload the new version.
cd ~/tmp/
wget http://127.0.0.1/cgi-bin/hurdwiki.tgz
mv -v hurdwiki.tgz.1 hurdwiki.tgz
# ^ Note that this is equivalent to:
# cd /usr/src/hurdwiki/; tar -cvzf ~/tmp/hurd.tgz *

# Now I upload the new tgz blob:
# (find-fline "~/EXPECT/anonftp")
anonftp angg.twu.net 'lcd ~/tmp/' 'put hurdwiki.tgz' 'quit'
#*




#####
#
# Installing the Hurd Wiki at twu
# 2000sep19
#
#####

# «travelling_moin__twu»  (to ".travelling_moin__twu")
# This is the script that I execute at twu to install the Hurd Wiki
# there from a tgz, possibly overwriting the previous installation.
#*
# Unpack the tgz at twu (I don't have any special permissions there).
rm -Rv   ~/hurdwiki/
mkdir    ~/hurdwiki/
cd       ~/hurdwiki/
tar -xvzf ~/hurdwiki.tgz

# This is needed because apache will run cgis as "nobody":
chmod 777 $(find wiki-moinmoin/data -type d)
chmod 666 $(find wiki-moinmoin/data -type f)

# Copy the css and the images that are used by every moinmoin page.
# I'm using slow_html instead of public_html because the scripts that
# make my page will always copy slow_html to public_html...
# (find-angg ".zshrc" "makepage")
rm -Rv ~/slow_html/wiki-moinmoin/
mkdir  ~/slow_html/wiki-moinmoin/
cd     ~/hurdwiki/wiki-moinmoin/
cp -Pv *.gif *.css img/* ~/slow_html/wiki-moinmoin/

# Make InterWiki urls like "AnggE:grub.e.html#grub" work:
# (find-moinwfile "data/intermap.txt")
# (find-moinwfile "data/text/InterWiki")
cd ~/hurdwiki/wiki-moinmoin/data/
cat intermap.txt.orig - > intermap.txt <<'---'
Angg http://angg.twu.net/
AnggA http://angg.twu.net/a/
AnggE http://angg.twu.net/e/
TclWiki http://mini.net/cgi-bin/wikit/
---

# Make the two real cgis, again in slow_html:
cd ~/slow_html/cgi-bin/
cd ~/slow_html/cgi-bin/
cat > hurdwiki.cgi <<'---'
#!/bin/sh
cd ~edrx/hurdwiki/wiki-moinmoin
python moin.cgi
---
cat > hurdwiki.tgz <<'---'
#!/bin/sh
echo Content-type: text/plain
echo
cd ~edrx/hurdwiki/
exec tar -cvzf - *
---
chmod 755 hurdwiki.cgi hurdwiki.tgz

#*

# Simple tests:
cd /tmp/
wget -O - http://angg.twu.net/cgi-bin/hurdwiki.cgi
wget      http://angg.twu.net/cgi-bin/hurdwiki.tgz
# (find-fline "/var/log/apache/")
# (find-fline "/var/log/apache/error.log")
#*



# (w3-fetch "http://127.0.0.1/cgi-bin/moin.cgi")





#####
#
# twiki
# 2000oct18
#
#####

#*
rm -Rv /usr/src/twiki/
mkdir  /usr/src/twiki/
cd     /usr/src/twiki/
unzip $S/http/twiki.sourceforge.net/TWiki20000501.zip

#*

# (code-c-d "twiki" "/usr/src/twiki/")
# (find-twikifile "")
# (find-twikiw3 "TWikiDocumentation.html")
# (find-twikiw3 "TWikiDocumentation.html#installation")

# (find-twikifile "")





#####
#
# MediaWiki
# 2013may14
#
#####

# «mediawiki» (to ".mediawiki")
# (find-status   "mediawiki")
# (find-vldifile "mediawiki.list")
# (find-udfile   "mediawiki/")
# http://www.mediawiki.org/
# (find-fline      "/etc/mediawiki/apache.conf")
# (find-asrootfile "/etc/mediawiki/apache.conf")
# (find-fline "/etc/mediawiki/cherokee.conf")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo /etc/init.d/apache2 restart

# http://localhost/mediawiki/config/index.php

# http://localhost/mediawiki/

# (find-fline "/var/www/")

sudo rm -v                    /var/www/mediawiki
sudo ln -s /var/lib/mediawiki /var/www

# mv /var/www/mediawiki /var/www/wiki
$ firefox localhost/wiki/config/index.php

# http://localhost/mediawiki/config/index.php
#   MediaWiki 1.15.5-2squeeze5 Installation
#   Installation successful! Move
#   /var/lib/mediawiki/config/LocalSettings.php to /etc/mediawiki,
#   then follow this link to your wiki.
#   You should change file permissions for LocalSettings.php as required
#   to prevent other users on the server reading passwords and
#   altering configuration data.

# http://localhost/mediawiki/
#   MediaWiki 1.15.5-2squeeze5
#   To complete the installation, move config/LocalSettings.php to the
#   parent directory.

# (find-fline "/var/lib/mediawiki/")
# (find-fline "/var/lib/mediawiki/config/")
# (find-asrootfile "/var/lib/mediawiki/config/")

# (find-google-links "mediawiki quick install")
# http://www.google.com/search?q=mediawiki+quick+install
# http://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Debian_GNU/Linux
# http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Quick_Start_Guide
# http://en.wikipedia.org/wiki/Help:Displaying_a_formula

# (find-zsh "availabledebs | sort | grep cache")
# (find-zsh "availabledebs | sort | grep apc")
# (find-zsh "availabledebs | sort | grep intl")
# (find-zsh "availabledebs | sort | grep sqlite")
# (find-status   "php5-xcache")
# (find-vldifile "php5-xcache.list")
# (find-udfile   "php5-xcache/")
# (find-status   "php-apc")
# (find-vldifile "php-apc.list")
# (find-udfile   "php-apc/")
# (find-status   "php5-intl")
# (find-vldifile "php5-intl.list")
# (find-udfile   "php5-intl/")
# (find-status   "php5-sqlite")
# (find-vldifile "php5-sqlite.list")
# (find-udfile   "php5-sqlite/")

# (find-sh "locate mediawiki | grep index")
# (find-fline "/var/lib/mediawiki/")
# (find-fline "/etc/mediawiki/")
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo cp -v /tmp/LocalSettings.php /etc/mediawiki/

http://localhost/mediawiki/





#  Local Variables:
#  coding:               raw-text-unix
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: