MOO-Cows

moo-coders Topic: Re: [MOO-coders] tf/vi as MOO client/editor

Article #1154
Subject: Re: [MOO-coders] tf/vi as MOO client/editor
Author: rv
Posted: 8/15/2003 04:11:08 AM


If anyone interested, here is what I managed to copy/paste from the below
example of .tfrc to achieve the subject matter.
For some reasons I couldn't close the /log successively after exporting :(
if anyone has a fix, it will be very welcome (I tried all possible
combination of /log that I could use from /help /log, so I guess I must
be missing some syntax).

The following .tfrc extract is for the situation where:
screen is used.
tf is on screen 1
/exp -> export a verb and saves it on the shell
vi is open on screen 2 to edit the verb
/imp (on screen 1 (tf)) is used to import it back.

example:
--screen 1--
/exp #6:tell
/log off

-screen 2--
vi to edit/write the codes

--screen 1--
/imp #6:tell

----2b inserted in .tfrc--------
;; Export a verb and saves it as a file
;; cf /exp #6:tell
;; the file on the shell will be #6:tell
;; The first and last line have to be stripped off
;; and any existing file with the same name will be overwritten
;; Make sure you modify the path below (%HOME/moo_codes) to
;; your convenience.
;; Don't forget to type:
;; /log off
;; after /exp anything...

/def exp =\
        /sh rm -f %HOME/moo_codes/"%1" %;\
        /log -w %HOME/moo_codes/%1 %;\
        /more off %;\
        @list %1 without numbers %;\
        eval player:tell(".")

;; Import a text file (verb) and attempt to compile it.
;; cf /imp #6:tell
;; #6:tell has to be present in the below path, which again
;; has to be customized to your liking (see /exp).

/def imp =\
        @program %1 %;\
        /qecho on %;\
        /more off %;\
        /quote -dsend '%HOME/moo_codes/%1 %;\
        /qecho off

---------

Again, thank you very much for pointing me in the right direction.
Aloha,
-rv,

> Done that before with tf. Take a look at this GPL'd script:
> it should contain the script you're looking for :)
> ftp://ftp.luon.net/pub/internet/moo/tfrc
>
> CIpri
> _______________________________________________
> Moo-coders mailing list
> Moo-coders@nospam
> http://www.moo-cows.com/mailman/listinfo/moo-coders
>

_______________________________________________
Moo-coders mailing list
Moo-coders@nospam
http://www.moo-cows.com/mailman/listinfo/moo-coders





MOO-Cows Home