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

Re: [Clip] Convert Outline to text file

Expand Messages
  • Jim Hall
    Dick, ... Unfortunately, you can t open an outline file as a FLAT file in NT. You need to use another editor to open the outline file and remove the file
    Message 1 of 6 , Aug 1, 2004
    • 0 Attachment
      Dick,

      At 05:56 PM 7/31/2004, you 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". ;-)


      Unfortunately, you can't open an outline file as a "FLAT" file in NT.

      You need to use another editor to open the outline file and remove the file header:

      = V4 OutlineMultiLine NoSorting TabWidth=30

      Then you can open the resulting file as a Flat file in NT and remove the H= headers with a clip or a search and replace.

      The only application that I am aware of that will allow you to work with .OTL files as Flat files and as Outline files both is
      RS's excellent complement to NoteTab called InSight.

      You can learn more about InSight here:

      http://www.dataomega.com/insight

      Regards,

      Jim
    • melchior prisi
      Hi, ... You can: - Open a new document - Menu: Document / Insert File... - Choose the desired otl file There s your flat file. Remove the first line and save
      Message 2 of 6 , Aug 1, 2004
      • 0 Attachment
        Hi,
        ----- on 01.08.2004 18:15 Jim Hall wrote:
        > Unfortunately, you can't open an outline file as a "FLAT" file in NT.

        You can:

        - Open a new document
        - Menu: Document / Insert File...
        - Choose the desired otl file

        There's your flat file.

        Remove the first line and save as .txt


        Regards,

        Melchior



        --
        http://loc.alphazwirbel.net
        http://orp.alphazwirbel.net
      • 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 3 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 4 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 5 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.