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

14087Re: Clip program to edit a list according to certain criteria

Expand Messages
  • Alec Burgess
    Aug 1, 2005
    • 0 Attachment
      Frank:
      Its best to reply to the list most times. Others can contribute or learn or
      both as appropriate :-)

      Jody (see below re clipclass.zip):

      > In the code below that you wrote for replacing:
      >
      > ; 1-any run of paragraphs with more than 25 chars
      >
      > ^!replace "^(..........................+\s*\n)+" >> ""
      > rwsait
      >
      > I understand the wrapper... "(--something--\n)+"
      >
      > However what is the +\s parameter doing?

      I might have misunderstood your original specs - I thought you wanted spaces
      at the end of the line to not be counted. In fact looking at it now its
      completely superfluous :-( It matches zero or more spaces and whether
      present or not makes no difference - lines longer than 25 chars will still
      be deleted.

      >
      > Also in
      >
      > ^!replace "^(.*[0-9].*\n)+" >> "" rwsait
      >
      > ^!replace "^(.*^%anyPunct%.*\n)+" >> "" rwsait
      >
      > Are the two asterisks and ^ enclosing the variable so
      > that it can be acted on by another command (i.e. Replace)?

      No. the centre match is to any digit or any punction character, but we need
      to get the entire line (or lines if they occur one after each other) matched
      so they can be replaced by "" ie. nothing.

      So the leading and trailing .* match anything or nothing before and then
      after the key match. If they weren't present (and you still had the leading
      ^ which ties the match to the beginning of a line) we'd be trying to match a
      single digit or punctuation on a line by itself.

      >
      > Also please could you point to a resource suitable for
      > beginners like me

      Jody wrote a "clipclass" which contains about ten lessons which gently
      introduce you to clipwriting concepts and practices.

      He said this back in Dec 2001 - isn't google wonderful :-) :
      >> If you are speaking of Clips in general, the read Clip Basics and
      Clip Language - Introduction in Help. The are some short
      information in my Clip Class that goes over making a Library
      (which you should learn first, making a new Clip, and editing a
      Clip. Without you posting some of what you have already we can
      only give you help in a general way.

      You can download my Clip Class from the following link and it
      will walk you through, Getting Started (which is a web page with
      a number of images displaying different parts of NoteTab that
      deals with Clipbooks), making a Library, adding Clips, and
      editing Clips, on to more difficult Clips. Be sure to read the
      Introduction also. Open ClipClass.clb and then click on the
      ClipClass Outline Clip to open the Outline.

      All the contents of the zip files go in NoteTab's Libraries folder.
      http://www.notetab.net/clipclass/clipclass.zip

      The NoteTab ClipClass List
      mailto:ntb-ClipClass-Subscribe@yahoogroups.com
      <<

      I know that the clipclass list itself has been closed but the clipclass.zip
      should still be available somewhere (the URL above gives a 404). I was
      hoping he might have put a copy in
      http://groups.yahoo.com/group/ntb-clips/files/ (the files archive for this
      group) but perhaps it is too big to fit. Hopefully Jody will chime in with
      its current location but there are some other things there you might find
      worthy of study.

      > that gives me sample code on how each
      > command works and tells me the full paramaters on how a
      > command can act on variables that you set

      The best documentation is the cliphelp that you already have. Note that
      every clip command can be found in its index. eg. enter ^$str and you will
      be shown all the clip fuctions. I wind up going to it for almost every clip
      I write, and often just copy the syntax from it to my clip and substitute
      required parameters.

      Regards ... Alec
      --
      ; ( ) { } [ ] \ | 9 0 + = () {} []


      ---- Original Message ----
      From: "frankrazer" <frankrazer@...>
      To: "Alec Burgess" <buralex@...>
      Sent: Monday, August 01, 2005 08:26
      Subject: [gla: Re: Clip program to edit a list according to
      certain criteria

      > Hi Alec,
      >
      > Many Thanks for the clip code and for making my life
      > infinitely easier :-)
      >
      > I've just tested it out on my data and it works
      > perfectly:-)
      >
      > Below is my first effort code for replacing:
      > 1. punctuation
      > 2. Digits
      >
      >
      > 1.
      > //The program replaces each Punctuation mark with a
      > //"###"
      >
      >> repeat
      > ^!Replace "[!":;'@.,?/\~&%$£+]" >> "###" RW
      > ^!IfError End
      > ^!Goto repeat
      >
      > 2.
      > //The program replaces each Number mark with a //"***"
      >
      >> repeat
      > ^!Replace "[0-9]" >> "***" RW
      > ^!IfError End
      > ^!Goto repeat
      >
      > Very crude I think and not very good:-(
      >
      > Just a couple of questions
      >
      >
      > Again...
      > Many thanks...You don't know how much time you have saved
      > me:-)
      >
      > Regards,
    • Show all 3 messages in this topic