Changeset 1893
- Timestamp:
- 02/06/07 19:50:33 (1 year ago)
- Files:
-
- swish_website/README (modified) (4 diffs)
- swish_website/build.sh (modified) (3 diffs)
- swish_website/etc/crontab (added)
- swish_website/etc/procmailrc (added)
- swish_website/index_archive.sh (added)
- swish_website/src/search/index.html (modified) (2 diffs)
- swish_website/src/swish-e.2.4.3.docs.pdf (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
swish_website/README
r1891 r1893 235 235 -c hypermailrc \ 236 236 -d $ROOT/archive.new \ 237 && mv $ROOT/archive $ROOT/archive.old \ 237 238 && mv $ROOT/archive.new $ROOT/archive 238 239 … … 393 394 4) reindex when new archives messages have been added 394 395 395 396 8,15,37,45 * * * * . $HOME/.bashrc && rm time_to_index 2>/dev/null && cd swish/search && perl index_hypermail.pl ../archive | swish-e -c swish.conf -S prog -i stdin -v0 397 33 3-19 * * * . $HOME/.bashrc && cd $HOME/swish/swish_website && ./build.sh 398 55 1 * * * . $HOME/.bashrc && swish-daily.pl --tardir=$HOME/swish/swish-daily --topdir=$HOME/swish/swish_daily_build || echo "Check Swish Daily Build" 399 20 2 * * * . $HOME/.bashrc && cd $HOME/swish/swish_website && ./build.sh -all 400 396 See etc/crontab 401 397 402 398 … … 404 400 -------- 405 401 406 TODO407 402 408 403 Procmail is used to look for email messages from the swish-e list. … … 411 406 know that the archive needs to be re-indexed. 412 407 413 # ===== Debugging Settings ======== 414 415 # Set log file location 416 LOGFILE=$HOME/procmail.log 417 418 # Set on for debug -- Extended diags 419 # Options: VERBOSE=off|on 420 VERBOSE=off 421 422 423 # Writes From_ and Subject, deliver folder, and length if on 424 # Options: LOGABSTRACT=all|no 425 LOGABSTRACT=all 426 427 SHELL=/bin/sh 428 HYPERMAIL=/home/bmoseley/local/bin/hypermail 429 ARCHIVE_DIR=/home/bmoseley/swish 430 FILENUM=`/bin/date -u +%Y%m` 431 432 433 :0 434 * ^TOusers@lists.swish-e.org 435 { 436 # chdir to the archive directory 437 MAILDIR=$ARCHIVE_DIR 438 439 # Save the archived mbox message 440 :0wc: 441 | gzip -c >> mbox/swish_$FILENUM.gz 442 443 # update the hypermail archive 444 # This probably should be done with cron, not when the mail comes in. 445 :0wc 446 | $HYPERMAIL -i -u -c hypermailrc -d archive 447 448 # Set flag that it needs to be indexed 449 :0ih 450 | touch $HOME/time_to_index 451 } 452 453 :0 454 ! moseley@hank.org 455 456 408 See etc/procmailrc 409 410 ln -s $ROOT/etc/procmailrc .procmailrc 411 412 413 ============================= NOTE ==================================================== 457 414 458 415 Note: Sat Feb 3 20:36:10 PST 2007 swish_website/build.sh
r1886 r1893 3 3 # Rebuild the site, and if any files are written reindex 4 4 # This is expected to be run as a cron job 5 # cd to the swish_website dir then run this script 5 6 if test ! -n "$1"; then 7 echo "Must specify path to the root of the site (e.g. $HOME)" 8 exit 1 9 fi 10 11 # Directory where everything happens 12 ROOT="$1" 13 shift; 6 14 7 15 8 # Directory where everything happens 9 WEB_ROOT="$(pwd)/.." 10 11 12 # Path to the archive index file -- so search script can find the index. 13 ARCHIVE_INDEX="$WEB_ROOT/swish/search/index.swish-e" 14 15 # Path to swish-e source to find pods for building the docs 16 SWISH_SRC="$WEB_ROOT/swish_src" 17 18 # Path to the daily build soruce to build the dev docs 19 DEV_SRC="$WEB_ROOT/devel_src" 20 21 22 SWISH_SITE=http://swish-e.org 23 SPIDER_QUIET=1 24 export SWISH_SITE SPIDER_QUIET 16 SVN="$ROOT/swish_website" 25 17 26 18 27 19 # Where to store output from svn 28 TMP= tmp/swish_website.$$.tmp20 TMP=/tmp/swish_website.$$.tmp 29 21 30 22 31 23 # First try and do a svn update 24 25 cd $SVN 32 26 33 27 if ! svn update &>$TMP; then … … 57 51 58 52 53 54 SWISH_SITE=${SWISH_SITE:=http://swish-e.org} 55 SPIDER_QUIET=${SPIDER_QUIET:=1} 56 57 export SPIDER_QUIET 58 59 59 # Now build the website, if any -a passed or if "Updated to revision" is returned. 60 60 # Or perhaps could just check for (A|C|D|U|G) … … 62 62 if [ -n "$(echo $@ | grep -- '-a')" ] || egrep '^Updated to revision' $TMP >/dev/null; then 63 63 echo "updating site" 64 bin/build \ 65 -archive=$ARCHIVE_INDEX \ 66 -swishsrc=$SWISH_SRC \ 67 -develsrc=$DEV_SRC \ 68 $@ \ 69 && swish-e -c etc/swish.config -S prog -v 0 64 65 $SVN/bin/build --root $ROOT $@ \ 66 && swish-e \ 67 -c $SVN/etc/swish.config \ 68 -S prog \ 69 -f $ROOT/indexes/index.swihs-e \ 70 -v 0 70 71 fi 71 72 72 73 73 74 74 rm $TMP swish_website/src/search/index.html
r1889 r1893 213 213 ? { message => $request->{message } } 214 214 : run_query( $instance ); 215 216 warn sprintf("Query=[%s] Hits=[%d]\n", 217 $instance->{request}->{swish_query} || '', 218 $instance->{result}->{hits} || 0 ); 219 215 220 } 216 221 … … 225 230 print $cgi->header; 226 231 print $fill_in_object->fill( scalarref => $output, fobject => $cgi ); 227 228 warn sprintf("Query=[%s] Hits=[%d]\n",229 $instance->{request}->{swish_query} || '',230 $instance->{result}->{hits} || 0 );231 232 232 233 delete $instance->{request}; # clean up the request
