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

Re: [Clip] Convert Outline to text file

Expand Messages
  • Jody
    Hi Dick, Use File | Export... if you don t mind the headings with dashed lines under them. About Outline Stuff Outline Stuff requires NoteTab version 4.8
    Message 1 of 6 , Aug 1, 2004
    • 0 Attachment
      Hi Dick,

      Use File | Export... if you don't mind the headings with dashed
      lines under them.

      About Outline Stuff
      Outline Stuff requires NoteTab version 4.8
      http://www.notetab.net
      http://www.notetab.net/html/library.htm
      http://www.notetab.net/zip/outline.zip
      Last updated on 08-01-2004 by Jody Adair

      Click on the Clip called "Extract Outline Text..." about a dozen
      Clips from the top. Option to browse for Outline and the leave or
      strip headings.

      >How do I remove all of the =H lines in an outline document, to
      >convert back to a plain text file?
      >
      >I have a clip that adds headings to a multi-section document,
      >saves it as a.otl, and re-opens. The result is a very nicely
      >outlined document, so that I can find and edit different
      >sections.
      >
      >But now I want to remove all the headings, so as to get back to a
      >plain text file.
      >
      >While in the OTL document, I can't search on "H=" lines. If I use
      >Remove Header it also removes all the contents (of course). If I
      >save it as a .txt, and re-open, it still opens as an outline.
      >
      >I guess I could write a clip to go to each topic, and Append To
      >File the contents, but that isn't very "elegant". ;-)


      Happy Clip'n!
      Jody

      www.clean-funnies.com, http://www.fookes.us/maillist.htm

      Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
      UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
      Options: http://groups.yahoo.com/group/ntb-clips
    • hsavage
      ... Dick, This is a short clip to do what you want. It will load the file text from any outline you select into a new file, delete the first line, find all
      Message 2 of 6 , Aug 1, 2004
      • 0 Attachment
        > Dick Gascoigne wrote:

        > How do I remove all of the =H lines in an outline document,
        > to convert back to a plain text file?
        >
        > I have a clip that adds headings to a multi-section document,
        > saves it as a .otl, and re-opens. The result is a very nicely
        > outlined document, so that I can find and edit different sections.
        >
        > But now I want to remove all the headings, so as to get back
        > to a plain text file.
        >
        > While in the OTL document, I can't search on "H=" lines.
        > If I use Remove Header it also removes all the contents (of course).
        > If I save it as a .txt, and re-open, it still opens as an outline.
        >
        > I guess I could write a clip to go to each topic, and Append
        > To File the contents, but that isn't very "elegant". ;-)
        >
        > Dick Gascoigne
        > Singapore

        Dick,

        This is a short clip to do what you want.

        It will load the file text from any outline you select into a new file,
        delete the first line, find all lines that begin with H= and delete the
        H= leaving the rest of the title as a section label.

        It then saves the otl text as a text file, in the \outlines\ folder,
        using the same filename as the otl file, eg., 'test.otl' will be saved
        as 'test.txt' leaving the otl file intact for you to keep or dispose of
        later.

        When pasting it into a clip ensure the single long line is rejoined, it
        will probably be split by the email program. The long line is separated
        above and below with a blank comment line beginning with a lone semi-colon.

        In writing I assumed you outline files were in the NoteTab \outlines\
        folder.


        H="Otl2Text"
        ^!ClearVariables
        ^!SetDebug 1
        ^!SetScreenUpdate 0
        ;
        ^!Set %otl2edit%=^?{(T=O;F="OTL FILE|*.otl")Select Otl To Convert To
        Text=^$GetAppPath$Outlines\}
        ;
        ^!SetCode %otl%=^$GetFileText("^%otl2edit%")$
        ^!Menu File/New
        ^!InsertCode ^%otl%
        ^!Jump 1
        ^!Find ^\=\sV4 TIRS
        ^!IfError EXIT
        ^!DeleteLine
        ^!Replace "^h\=" >> "" TIRSA
        ^!Save AS ^$GetAppPath$Outlines\^$GetName(^%otl2edit%)$.txt
      • Dick Gascoigne
        Hi, everyone - Thanks Jim, Jody, Melchior and HSavage for all your good suggestions. The Insert File works best for me - I hadn t even thought of it until
        Message 3 of 6 , Aug 3, 2004
        • 0 Attachment
          Hi, everyone -
          Thanks Jim, Jody, Melchior and HSavage for all your good suggestions.

          The Insert File works best for me - I hadn't even thought of it until
          reading Melchior's message.

          Before I saw HSavage's clip I had written a quick and dirty one to do
          somewhat the same. But I like yours better :-)

          If anyone is interested, the document starts out as a computer program with
          many subroutines - all in one several-thousand line text file. I run a clip
          that finds each subroutine name, and pastes an "^PH=<name>" line above it,
          then saves the file as an .otl.

          That makes it easy to jump back and forth between the subroutines to follow
          the Call's. But, after making changes to the code, I needed to strip out the
          H= lines to get back to the original form. Now I can !

          Works slick now. Thanks again.

          Dick in Singapore


          ----- Original Message -----
          From: "hsavage" <hsavage@...>
          To: <ntb-clips@yahoogroups.com>
          Sent: Monday, 02 August, 2004 5:36 AM
          Subject: Re: [Clip] Convert Outline to text file


          > > Dick Gascoigne wrote:
          >
          > > How do I remove all of the =H lines in an outline document,
          > > to convert back to a plain text file?
          > >
          > > I have a clip that adds headings to a multi-section document,
          > > saves it as a .otl, and re-opens. The result is a very nicely
          > > outlined document, so that I can find and edit different sections.
          > >
          > > But now I want to remove all the headings, so as to get back
          > > to a plain text file.
          > >
          > > While in the OTL document, I can't search on "H=" lines.
          > > If I use Remove Header it also removes all the contents (of course).
          > > If I save it as a .txt, and re-open, it still opens as an outline.
          > >
          > > I guess I could write a clip to go to each topic, and Append
          > > To File the contents, but that isn't very "elegant". ;-)
          > >
          > > Dick Gascoigne
          > > Singapore
          >
          > Dick,
          >
          > This is a short clip to do what you want.
          >
          > It will load the file text from any outline you select into a new file,
          > delete the first line, find all lines that begin with H= and delete the
          > H= leaving the rest of the title as a section label.
          >
          > It then saves the otl text as a text file, in the \outlines\ folder,
          > using the same filename as the otl file, eg., 'test.otl' will be saved
          > as 'test.txt' leaving the otl file intact for you to keep or dispose of
          > later.
          >
          > When pasting it into a clip ensure the single long line is rejoined, it
          > will probably be split by the email program. The long line is separated
          > above and below with a blank comment line beginning with a lone
          semi-colon.
          >
          > In writing I assumed you outline files were in the NoteTab \outlines\
          > folder.
          >
          >
          > H="Otl2Text"
          > ^!ClearVariables
          > ^!SetDebug 1
          > ^!SetScreenUpdate 0
          > ;
          > ^!Set %otl2edit%=^?{(T=O;F="OTL FILE|*.otl")Select Otl To Convert To
          > Text=^$GetAppPath$Outlines\}
          > ;
          > ^!SetCode %otl%=^$GetFileText("^%otl2edit%")$
          > ^!Menu File/New
          > ^!InsertCode ^%otl%
          > ^!Jump 1
          > ^!Find ^\=\sV4 TIRS
          > ^!IfError EXIT
          > ^!DeleteLine
          > ^!Replace "^h\=" >> "" TIRSA
          > ^!Save AS ^$GetAppPath$Outlines\^$GetName(^%otl2edit%)$.txt
          >
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.