[Zope] HTML EDITORS
Phil Harris
phil.harris@zope.co.uk
Fri, 26 May 2000 23:24:15 +0100
Yeah,
I made one in Python a while back, but it's not quite the same as having it
built into the editor itself.
Something like the Emacs Ange-FTP in GVIM and I'd be a total convert.
----- Original Message -----
From: "John A Chaves" <chaves@acm.org>
To: "Phil Harris" <phil.harris@zope.co.uk>
Cc: "Wright, Geoff" <Geoff.Wright@asci4materials.com>; <zope@zope.org>
Sent: 26 May 2000 23:19
Subject: Re: [Zope] HTML EDITORS
> Phil Harris wrote:
> >
> > I'd like to third that but Can't because GVIM doesn't have a FTP client.
>
> You can simulate one fairly easily. The attached script (which would need
> to be tweaked for your environment) ftp-gets the zope object into a temp
> directory. It also creates a Makefile in the temp directory which
ftp-puts
> the object back into zope. You can then use the GVIM "make" button (looks
> like a hammer) to save your changes and push them back to zope.
>
> ==== zope-ftpedit ====
> #!/bin/sh
>
> . $HOME/zope/setenv
> TOOL=gvim
>
> usage="$0 [hostname] filepath"
>
> case $# in
> 1) MACHINE=`uname -n`
> TARGET=$1
> ;;
> 2) MACHINE=$1
> TARGET=$2
> ;;
> *) echo "$usage"; exit 1;;
> esac
>
> # account name and password kept in separate file
> OPTS="-f $HOME/zope/etc/ncftp.$MACHINE -P $ZOPE_FTP"
> TDIR="`dirname $TARGET`"
> TFILE="`basename $TARGET`"
>
>
> # make tmp dir
>
> TMPBASE=/tmp/`basename $0`
> NUM=$$
> while [ -e $TMPBASE.$NUM ]
> do
> NUM=`expr $NUM + 1`
> done
> TMPDIR=$TMPBASE.$NUM
>
> mkdir $TMPDIR || exit 1
> cd $TMPDIR || exit 1
>
> # load requested file
>
> GETCMD="ncftpget $OPTS . $TARGET"
> PUTCMD="ncftpput $OPTS $TDIR $TFILE"
>
> cat <<!! >Makefile || exit 1
> # tmpdir is $TMPDIR
>
> timestamp: $TFILE
> $PUTCMD
> touch timestamp
>
> put:
> $PUTCMD
>
> get:
> $GETCMD
>
> edit:
> $TOOL $TFILE
> !!
>
> echo "$0 tmpdir is $TMPDIR"
> make get edit
>
> # vim:sw=2:sts=2