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

[REBOL] Re: First attempt at Rebol - 16 hours later

From: greg::schofield::iinet::net::au at: 24-Sep-2007 7:26

Anto, that was more than I was expecting from anyone and very kind of you. I will need to study the changes this afternoon to get my REBOL much improved. I know the script aims are very simple, and only useful for a very restrictive need. 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 - chapters 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 structure the text with tags. They just don't work for large works - unless cutting and pasting hundreds of pages is seen as a good productive time (it isn't). Lines --> block series proved extremely useful (I have a huge amount to learn here), treating nested structures as flat ones and easy conversion to nested (I am just using a simple write to file, read from file mechanism to go between the two) looks like it could pull the thing together without special code (which is rather neat). Originally I was going to wait for R3, hopefully I will not have to unlearn much. The main reason I posted it, was to encourage REBOLers. The script was written literally with the manual in hand (the manual needs some reshaping - an index would have helped a great deal - maybe this is something I can help with in the future), and anyone can tell I am not a good programmer in any sense. The fact that I could get it working at all is a tribute to the ease and power of REBOL. Anton, I still canot believe you took so much trouble over my code piece. I am both grateful and in awe - thank you! Greg Schofield Perth Australia --- Message Received --- From: Anton Rolls <anton-wilddsl.net.au> To: rebolist-rebol.com Reply-To: rebolist-rebol.com Date: Mon, 24 Sep 2007 04:42:49 +1000 Subject: [REBOL] Re: First attempt at Rebol - 16 hours later Hi Greg, I have extensively (but not completely) optimized your Cleanerxx.r script. http://anton.wildit.net.au/Cleanerxx_anton.r (This link is temporary. I'll delete it after you get it.) It produces almost exactly the same map as yours, but a lot faster. (I tested only on 36.txt.) The script can be optimized much further, (I think a single parse can do it all.) but I wanted to show you the improvements in stages. I'm not sure exactly what the script should do and what modifications should be available to the user. Could you list those things ? eg: 1) Insert page break Replace selected <bnn> with <br/> 2) Make title Enclose selected text in <title> </title> Regards, Anton.