Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: uppercase two letters?

From: tofo:695online at: 26-Apr-2003 21:35

On Sun, Apr 27, 2003 at 08:57:06AM +1200, Andrew Martin wrote:
> Me, too! >
Me, three. I got the thing I was working on, well, working. I recently discovered emacs wiki mode, and was playing around with it. I over-used rejoin, and am sure that this is otherwise pretty ugly in general, but if anybody feels like commenting, I'd be happy... oh yeah, there has to be a file, project-name.txt, in base-dir with contents something like this that One thing another thing REBOL [ Title: "myewiki2" Date: 26-Apr-2003 File: %myewiki2.r Purpose: "another attempt at my own ewiki outline maker" RCS-id: "$Id: myewiki2.r,v 1.5 2003/04/27 01:25:56 tf Exp $" ] home-dir: to-file "~/" base-dir: %ewikis/ project-name: ask "project name: " project-dir: to-file rejoin [ home-dir base-dir project-name "/" ] if not exists? base-dir [make-dir base-dir] if not exists? project-dir [make-dir project-dir] file-top: trim/head { -*- emacs-wiki -*- PrOjectindex } squashit: func [line [string!]] [ ;wikiword-ize... trim/all lowercase line poke line 1 to-char uppercase to-string line/1 poke line 3 to-char uppercase to-string line/3 ] file: to-file rejoin [home-dir base-dir project-name ".txt"] ;call/wait rejoin ["xjed " file] blk: [] foreach line read/lines file [ line-untouched: copy line project-file: to-file rejoin [project-dir squashit line] ; if not exists? project-file [close open/new project-file] if not exists? project-file [write project-file rejoin [file-top "_" line-untouched "_" newline newline] ] repend blk rejoin [line-untouched " ==> " line newline] ] write to-file rejoin [project-dir "PrOjectindex"] rejoin [file-top blk] ; -- ; signature to baby: "doobywoobybooboo" ; -tom