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

[NTS] Re: Sorting Numbers and No-Sort: Remove Dups/Trips...

Expand Messages
  • Sheri
    ... The sample I used had such short lines, word-wrap never occured to me :) ... temp.otl sounds like something I should have deleted at the end of the clip.
    Message 1 of 26 , Nov 20, 2002
    • 0 Attachment
      --- In ntb-scripts@y..., Jody <av1611@e...> wrote:

      > I peeked at it again. One problem was you did not turn word wrap
      > off in the copy you made. I have yet to figure out why you made
      > temp.otl, but the text used as headers is correct, so I just need
      > to, oh, look at it some more. <g> I think I know what you were
      > doing off the top of my head, pre-guessing "you."
      >

      The sample I used had such short lines, word-wrap never occured to
      me :)

      > What I do not understand is when the lines are numbered appending
      > the number to the end of the file how that can remove dups w/o
      > sorting. Each line ends differently. Oh, I think it is coming
      > back now, hold on, yes... StrSize out to the end of the line w/o
      > the number. :) Claes G., Michael G., or Wayne VW showed me how
      > to do that a number of years ago. I know I have the Clip
      > somewhere amongst my zillions of them. <g>

      temp.otl sounds like something I should have deleted at the end of
      the clip. It's coming back to me now. I saved the line numbers in an
      outline, sorted the original file to remove duplicates, then
      retrieved the line numbers from the outline so I could re-sort back
      to the order it had prior to duplicates-removing sort. I doubt I used
      any StrSize type tests.

      Regards,
      Sheri
    • Jody
      Hi Sheri, ... Oh, I got it. I understand the OTL now and why you made the full line the headers. That is an interesting method. I haven t seen it
      Message 2 of 26 , Nov 20, 2002
      • 0 Attachment
        Hi Sheri,

        >temp.otl sounds like something I should have deleted at the end
        >of the clip. It's coming back to me now. I saved the line
        >numbers in an outline, sorted the original file to remove
        >duplicates, then retrieved the line numbers from the outline so I
        >could re-sort back to the order it had prior to duplicates-
        >removing sort.

        Oh, I got it. I understand the OTL now and why you made the
        full line the headers. <g> That is an interesting method. I
        haven't seen it before.

        >I doubt I used any StrSize type tests.

        I had only glanced before. You did use it, but not for sorting;
        instead for StrFill of the zeros.

        ^!Select Line
        ^!Set %Row%=^$GetRow$
        ^!InsertSelect ^$StrFill(0;^$Calc(6-^$StrSize(^%Row%)$)$)$^%Row%#^$GetSelection$

        Thanks for your time... ;)

        See ya in the funnies!
        Jody

        ...he that is of a merry heart hath a continual feast...
        http://www.clean-funnies.com

        If you haven't laughed at yourself today,
        you missed a good joke!
      • Sheri
        ... #^$GetSelection$ ... Hahaha I meant to ask you if I was allowing for enough line numbers lol. Regards, Sheri
        Message 3 of 26 , Nov 20, 2002
        • 0 Attachment
          --- In ntb-scripts@y..., Jody <av1611@e...> wrote:

          > ^!Select Line
          > ^!Set %Row%=^$GetRow$
          > ^!InsertSelect ^$StrFill(0;^$Calc(6-^$StrSize(^%Row%)$)$)$^%Row%
          #^$GetSelection$
          >

          Hahaha

          I meant to ask you if I was allowing for enough line numbers lol.

          Regards,
          Sheri
        • Jody
          Hi Sheri, I found a minor bug in your RegExp, sorting script. I ll post it a bit later once I get the rest of it going - but it might be awhile till I can get
          Message 4 of 26 , Nov 22, 2002
          • 0 Attachment
            Hi Sheri,

            I found a minor bug in your RegExp, sorting script. I'll post it
            a bit later once I get the rest of it going - but it might be
            awhile till I can get to it. Getting about 100-150 support
            messages a day since the newsletters went out.

            Found it quick enough. ;) I think it was the line above
            the commented one needed to be split so that it did on the
            left side of the colon first and then the right side. The
            way it was it was not stripping the zeros from the right
            side in front of numbers: :001...009. As in say Psalms 150:002,
            Psalms 150:006 - should be 150:1[-6] Thanks again, Sheri. ;)
            I'll have to find some time latter to crank up the Perl scripts
            offered.

            FixedRegExp4Jody
            ;^!Replace "{\W+}\s{\d+:\d+}" >> "\2\s\1" AIRSW
            ^!Replace "{\d+}:{\d+}" >> "00\1:00\2\s" AIRSW
            ^!Replace "\d*{\d\d\d}:\d*{\d\d\d}\s" >> "\1:\2" AIRSW
            ^!Select All
            ^!InsertText ^$StrSort("^$GetText$";False;True;True)$
            ^!Replace "0*{[1-9]\d*}:0*{[1-9]\d*}" >> "\1:\2" AIRSW
            ;^!Replace "{\d+:\d+}\s{\W+}" >> "\2\s\1" AIRSW

            Reorder Chap:Verse
            ^!Replace "{\w+}\s{\d+:\d+}" >> "\2\s\1" AIRSW
            ^!Replace "{\d+}:{\d+}" >> "00\1:00\2\s" AIRSW
            ^!Replace "\d*{\d\d\d}:\d*{\d\d\d}\s" >> "\1:\2" AIRSW
            ^!Select All
            ^$StrSort("^$GetText$";0;1;1)$
            ^!Replace ":0+" >> ":" AIRSW
            ^!Replace "0+{[1-9]\d*}:" >> "\1:" AIRSW

            Happy Script'n!
            Jody Adair

            UnSubscribe, Options
            mailto:ntb-Scripts-UnSubscribe@yahoogroups.com
            http://groups.yahoo.com/group/ntb-scripts

            The NoteTabbers Assistant Page
            http://www.notetab.net
          Your message has been successfully submitted and would be delivered to recipients shortly.