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

[Clip] Re: Sorting queries.

Expand Messages
  • Lawrence M Hamilton, Jr.
    Claes, On Fri, 03 Sep 1999 16:55:22 +0200 Claes Gauffin ... (Clipwriters ... Jody & I are charter members! ;) Larry Hamilton, Jr.
    Message 1 of 9 , Sep 3, 1999
    • 0 Attachment
      Claes,

      On Fri, 03 Sep 1999 16:55:22 +0200 Claes Gauffin <gauffin@...>
      writes:
      > (Anyone but me find this clip writing slightly addictive? Is there a CA
      (Clipwriters
      > Anonymous)?
      >
      > Regards /Claes

      Jody & I are charter members! ;)


      Larry Hamilton, Jr. lmhamilton@...
      Hamilton National Genealogical Society, Inc.
      http://www.HamiltonGenSociety.org/
      My Web Site: http://members.tripod.com/notlimaH/

      ___________________________________________________________________
      Get the Internet just the way you want it.
      Free software, free e-mail, and free Internet access for a month!
      Try Juno Web: http://dl.www.juno.com/dynoget/tagj.
    • Wayne VanWeerthuizen
      ... Most of your requests require clips. But I ve written a toolkit called NoteAwk, just for situations like this. You shouldn t have to do much clip
      Message 2 of 9 , Sep 3, 1999
      • 0 Attachment
        John Fitzsimons <johnf@...> wrote:

        >I am hoping that I can do the following WITHOUT using any clips BUT as
        >they might be needed I thought I would ask on this list.

        Most of your requests require clips. But I've written a toolkit
        called NoteAwk, just for situations like this. You shouldn't
        have to do much clip programming yourself.


        NoteAwk 4.25 is available from:
        http://landru.myhome.net/wayne/notetab.html

        >(1) In the following "list" of URLs I can "sort" on the first word of
        >each line. Is it possible to sort on the last word of each line ? If
        >so then what are the steps please ?

        In my NoteAwk clipbook: Sort Using GNU Sort

        >(2) Is it possible to search the list and show ONLY those lines that
        >have eg. "zdnet" in ? If so how ?

        In my NoteAwk clipbook: Find Line Matching Pattern

        >(3) Is it possible to show all lines EXCEPT those that contain
        >"zdnet" ? If so how ?

        In my NoteAwk clipbook: Find Line Matching Pattern
        Show non-matching lines

        >(4) Is there any way to block delete everything on every line EXCEPT
        >the file name ? If so how ?

        Possibly with NoteAwk. Either the "Remove fields matching pattern",
        or the "Rearrange fields" clips may help. This may take some
        strategic search and replaces to prepare the text first.

        >(5) To see the end of these lines one has to scroll. Is there any way
        >to "view" a NoteTab document a different size ? Like eg. Word,
        >WordPerfect etc. where one can shrink a page to eg. 50% to see
        >twice as wide a page ?

        NoteTab lets you add Font Size buttons to your toolbar.

        >(6) Rather than open two text files, and then "cut and paste" the
        >second one to insert it at the end of the first one, is there any
        >quicker way to "open" (import ?) the contents of a second text file
        >directly to the end of an already open first file ?

        First, look for "Insert File" in the Document menu.

        Also, the clip language has the command:
        ^!InsertFile FileName


        NoteAwk 4.25 is available from:
        http://landru.myhome.net/wayne/notetab.html

        There are some rough spots in it. Email me any questions
        you have about how to use it. If people would start sending
        me more feedback on where they have difficulty with it -
        what works well - and what features should be added, I may
        get back to work on an improved version. But I need
        feedback.




        --
        Wayne M. VanWeerthuizen
        ICQ: 15117288
        Homepage: http://landru.myhome.net/wayne
      • Kay Roath
        09/03/1999 7:14 AM John Fitzsimons wrote ... Does last word mean file name? If not, you could change / to . in the clip below. ... H=Sort urls by File ;
        Message 3 of 9 , Sep 3, 1999
        • 0 Attachment
          09/03/1999 7:14 AM John Fitzsimons wrote
          > (1) In the following "list" of URLs I can "sort" on the
          > first word of each line. Is it possible to sort on the
          > last word of each line ? If so then what are the steps
          > please ?

          Does last word mean file name? If not, you could change '/'
          to '.' in the clip below.

          ----Start Clip----
          H=Sort urls by File
          ; Grandma Kay 09-03-99
          ; sort urls by text following last /
          ; use on copy of original doc
          ^!SetWordWrap False
          ^!Set %list%=
          ^!Set %num%=1

          :Loop
          ^!Jump ^%num%
          ^!KeyBoard Shift+End
          ^!Set %temp%=^$GetSelection$
          ^!Set %chop%=^$StrPosRight("/";"^%temp%";No)$
          ^!Inc %chop%
          ^!Set %end%=^$StrSize("^%temp%")$
          ^!Set %name%=^$StrCopy("^%temp%";^%chop%;^%end%)$
          ^!KeyBoard Home #^%name% #

          ^!Inc %num%
          ^!If ^%num% > ^$GetLineCount$ Sort ELSE Loop

          :Sort
          ^!StatusClose
          ^!ToolBar Select All
          ^!ToolBar Sort Ascending
          ;---End Clip---
        • Claes Gauffin
          Hi John, ... I think the following clip does it. The speed of it can kindly be called modest, possibly dignified. Unless you have cows to milk or houses to
          Message 4 of 9 , Sep 6, 1999
          • 0 Attachment
            Hi John,

            At 00:14 1999-09-04 +1000, you wrote:

            >
            >(2) Is it possible to search the list and show ONLY those lines that
            >have eg. "zdnet" in ? If so how ?
            >
            >(3) Is it possible to show all lines EXCEPT those that contain
            >"zdnet" ? If so how ?

            I think the following clip does it.
            The speed of it can kindly be called modest, possibly dignified.
            Unless you have cows to milk or houses to paint during the wait, I wouldn't
            apply it to files with 10000+ lines.

            Regards /Claes

            H="Extended search"
            ^!SetWordWrap OFF
            ^!Jump TEXT_START
            ^!set %string%=^?[Search string]
            ^!set %case%=^?[Case sensitive==Yes^=""|_No^=I]
            ^!set %regexp%=^?[Reg exp==Yes^="R"|_No^=""]
            ^!set %lno%=^?[Add linenumbers?==_Yes|No]
            ^!set %pn%=^?[Collect lines...==_containing the search argument^=p|not
            containing the search argument^=n]
            ^!set %save%=""
            ^!If ^%pn%=n SearchNotArg
            :SearchArg
            ^!Find "^%string%" TS^%case%^%regexp%
            ^!IfError Done
            ^!set %linecont%= ^$GetLine$
            ^!set %n%=^$[^$StrSize(000^$GetRow$)$-3;0]
            ^!Set rownr=^$StrCopy("000^$GetRow$";^%n%;4)$
            ^!If ^%lno% = Yes Skip
            ^!Set rownr=""
            ^!Append %save%=^%rownr%^%linecont%^%NL%
            ^!If ^$GetRow$=^$GetLineCount$ Done
            ^!Jump +1
            ^!GoTo SearchArg
            :SearchNotArg
            ^!Select LINE
            ^!Find "^%string%" HTS^%case%^%regexp%
            ^!IfError NotThere
            ^!If ^$GetRow$=^$GetLineCount$ Done
            ^!Jump +1
            ^!Goto SearchNotArg
            :NotThere
            ^!set %linecont%= ^$GetLine$
            ^!set %n%=^$[^$StrSize(000^$GetRow$)$-3;0]
            ^!Set rownr=^$StrCopy("000^$GetRow$";^%n%;4)$
            ^!If ^%lno% = Yes Skip
            ^!Set rownr=""
            ^!Append %save%=^%rownr%^%linecont%^%NL%
            ^!If ^$GetRow$=^$GetLineCount$ Done
            ^!Jump LINE_START
            ^!Jump +1
            ^!GoTo SearchNotArg
            :Done
            ^!Toolbar New Document
            ^!InsertText ^%save%
          • Claes Gauffin
            Hi Kay, John, ... Perhaps a little cleaning up at the end? Regards /Claes ; Grandma Kay 09-03-99 ; sort urls by text following last / ; use on copy of
            Message 5 of 9 , Sep 6, 1999
            • 0 Attachment
              Hi Kay, John,

              At 13:35 1999-09-03 -0700, you wrote:

              >
              >----Start Clip----
              >H=Sort urls by File
              >; Grandma Kay 09-03-99
              >; sort urls by text following last /
              >; use on copy of original doc

              Perhaps a little cleaning up at the end?

              Regards /Claes

              ; Grandma Kay 09-03-99
              ; sort urls by text following last /
              ; use on copy of original doc
              ^!SetWordWrap False
              ^!Set %list%=
              ^!Set %num%=1

              :Loop
              ^!Jump ^%num%
              ^!KeyBoard Shift+End
              ^!Set %temp%=^$GetSelection$
              ^!Set %chop%=^$StrPosRight("/";"^%temp%";No)$
              ^!Inc %chop%
              ^!Set %end%=^$StrSize("^%temp%")$
              ^!Set %name%=^$StrCopy("^%temp%";^%chop%;^%end%)$
              ^!KeyBoard Home #^%name% xyzzy#

              ^!Inc %num%
              ^!If ^%num% > ^$GetLineCount$ Sort ELSE Loop

              :Sort
              ^!StatusClose
              ^!ToolBar Select All
              ^!ToolBar Sort Ascending

              ^!Jump DOC_START
              :CleanUp
              ^!Replace ".* xyzzy" >> "" TSR
              ^!IfError Exit
              ^!GoTo CleanUp
            Your message has been successfully submitted and would be delivered to recipients shortly.