Loading ...
Sorry, an error occurred while loading the content.

5889Learning Exercise

Expand Messages
  • Ray Shapp
    Feb 25, 2001
    • 0 Attachment
      Hi Clippers

      Over on the NT Basic forum, I just became aware of the power inherent in
      using outlines and Modify |Document to HTML for creating well linked
      glossaries (like the glossary in NT itself). I just spent the last few
      hours trying to write a clip for this to help convert a text file to an
      outline but I'm making maddeningly little progress.

      The current file contains 600 entries, each of which consists of a word or
      phrase on a single line that ends with a delimiting code. The next line or
      lines contain sentences related to the entry. These lines are followed by
      one or more blank lines.

      I've been trying to write a clip that will modify only the headline of each
      entry. It should insert "H=" at the beginning of each headline, then copy
      all of the existing headline except for the delimiter. It should then copy
      the related lines intact and then find the next headline and repeat. The
      blank lines can be retained or dropped, whichever is easier.

      In the example below, I show an idea of what the file looks like using XXX
      as the delimiter:

      Apple XXX
      This is a fruit.

      Bacon XXX
      Bacon is a kind of cured pork which..... blah blah blah ....
      blah blah...

      Crayola Crayons XXX
      A paragraph describing crayons goes here....

      I want to end up with a file as follows:

      H=Apple
      This is a fruit.

      H=Bacon
      Bacon is a kind of cured pork which..... blah blah blah ....
      blah blah...

      H=Crayola Crayons
      A paragraph describing crayons goes here....

      For safety, I have a spare copy of the original file, therefore, the clip
      can make its modifications on the original file.

      If anyone is willing to write such a clip, please use straightforward
      procedures because, although this is doing useful work, I also want to learn
      a little clipping too.

      Thanks for the help.

      Ray Shapp
      Watchung, NJ
    • Show all 10 messages in this topic