[REBOL] Re: First attempt at Rebol - 16 hours later
From: anton::wilddsl::net::au at: 24-Sep-2007 13:43
Here is a mock GUI layout.
window: layout [
map-face: area 220x600 wrap font-name font-fixed ;(map)
main-face: area 400x600 ;(read %emma11.txt)
edit-book: func ["Opens a window to edit and markup text"
'text [file! string! word! paren! any-type!] ; any-type! to allow unset!
(ie. no arg specified in command line)
; handle 'text argument
text: either value? 'text [:text][copy ""] ; convert unset to empty string
if word? :text [text: any [all [string? get :text get :text] copy ""]] ; a
word which evaluates to a string
if file? text [text: read text]
if paren? text [text: do text]
if not string? text [text: copy ""] ; convert any other type to empty
; Open window
;view/new layout [across map-face: area 200x600 area 400x600 (text)]
;<- Process text here, generate map etc.
map-face/text: "-----------2-1---^/---- etc..." ; <-- mockup placeholder
map for now...
; Usage example
> Anto, that was more than I was expecting from anyone and very kind of you
No worries, mate.
> I will need to study the changes this afternoon to get my REBOL much impr
> I know the script aims are very simple, and only useful for a very restri
> ctive need.
The simpler the better.
> In the end I will make it publically available (if it is up to scratch),
> so at least teachers can convert HTML and plain text literature into more
> useful forms.
> "1) Insert page break
> Replace selected <bnn> with <br/>"
> "2) Make title
> Enclose selected text in <title> </title>"
> And yes this is primary objective, just give the text structural shape so
> that it can be more easily handled (<div> being most important - chapter
> s having beginings and ends etc).
> The problems with all XMLeditrors I have used is that they assume you are
> inputing the text into tags, when in fact for such things you need to st
> ructure the text with tags. They just don't work for large works - unles
> s cutting and pasting hundreds of pages is seen as a good productive time
> (it isn't).
I am the most important program in the world!
> Greg Schofield