Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Browsers with built in search

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Jason Flatt <jason AT flattfamily.com>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Browsers with built in search
  • Date: Tue, 17 Jun 2003 08:55:25 -0700

On Tuesday 17 June 2003 08:43 am, Martin Ruderer wrote:
> On Tue, 17 Jun 2003 15:47:20 +0200
>
> Martin Ruderer <martin AT lddd.org> wrote:
> > On Mon, 16 Jun 2003 23:51:13 -0500
> >
> > Zach Hobbs <zach-list AT firstwavedesign.com> wrote:
> > > If you use a browser with a built in search tool on the top I've put
> > > up a little PHP file that will redirect you to the website for a
> > > spell you pass to it. I use it so that you can type in a spell in
> > > the box and it will go to that spell's website. Figure some of you
> > > guys might find it usefull sometimes.
>
> OK, that one should work just as yours.
> Tested with opera and firebird.
>
> $ tcpserver 127.0.0.1 80 bash test
>
> #!/bin/bash
> source /etc/sorcery/config
> read request
> spell=$(echo $request | perl -ple'($_)=m|/\?([^\s]+)|')
> spelldir=$(codex_find_spell_by_name $spell)
> [ ! $spelldir ] && echo "no such spell \"$spell\"" && exit 1
> codex_set_current_spell $spelldir
> echo "HTTP/1.0 302 Moved Temporarily"
> echo "Location: $WEB_SITE"
> echo ""


I modified your previous one slightly to take input from command line and use
the input that w/o parsing, as it would always give me "no such spell ".


--
Jason Flatt (jason @ flattfamily . com)
Father of five (http://www.flattfamily.com/)
Linux user (http://www.sourcemage.org/)
PGP Key: E992213F - 0254 9DB7 BE0E 312D 8352 6E39 0700 FB95 E992 213F





Archive powered by MHonArc 2.6.24.

Top of Page