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

Re: [Clip] Script help needed for processing a list of download links

Expand Messages
  • Axel Berger
    ... You don t go half measures, do you? From your image the data are exactly as per your precise description, so I might have gone by that. A solution along
    Message 1 of 10 , Jun 20, 2010
    • 0 Attachment
      netplayground wrote:
      > I've put the 'example' data in several places.

      You don't go half measures, do you? From your image the data are exactly
      as per your precise description, so I might have gone by that.
      A solution along Lotta's line using a variable and a loop is certainly
      possible.

      But now the sun's come up here in the Rhineland and like any good
      vampire I'm off to bed and shall look at it later.

      Axel
    • diodeom
      ... This should work: ^!Jump 1 ... ^!Find ^(.++)(?s).+?html(?= R{2,}| Z) RS ^!IfError Done ^!Set %t%=^$GetReSubStrings$ ^!Replace ^
      Message 2 of 10 , Jun 21, 2010
      • 0 Attachment
        "netplayground" <netplayground@...> wrote:
        >
        > I'm stumped trying to figure out how to create a script that will take a
        > page of raw text that contains several groupings of text formatted as
        > follows: ( line 1: movie title line 2+ download links for that movie
        > one link per line + blank lines between groupings ) and reformat it so
        > that each line contains the movie title -- five spaces -- and then a
        > download link.

        This should work:

        ^!Jump 1
        :Loop
        ^!Find "^(.++)(?s).+?html(?=\R{2,}|\Z)" RS
        ^!IfError Done
        ^!Set %t%=^$GetReSubStrings$
        ^!Replace "^" >> "^%t%\x20\x20\x20\x20\x20" HARS
        ^!Replace ".++\R" >> "" HRS
        ^!Find "^\R|\Z" RS
        ^!Goto Loop
        :Done
        ^!Replace "^\R" >> "" WARS
        ^!ClearVariable %t%
      • John Shotsky
        There is almost always more than one way to do things. I happen to dislike loops when they are not needed, because they take more time than simple replaces.
        Message 3 of 10 , Jun 21, 2010
        • 0 Attachment
          There is almost always more than one way to do things. I happen to dislike loops when they are not
          needed, because they take more time than simple replaces.

          So, the following does what has been requested, using only replaces.
          ;=====
          ;Add delimiters and spaces to URLs
          ^!Replace "^(http.+html)" >> "<\x20\x20\x20\x20\x20$1>" AIRSTW
          ;Set up the first line
          ^!Replace "^(\w.+)\R(<.+>)\R" >> "$1$2\r\n" ARSTW
          ;Set up the rest
          ^!Replace "^(\w[^<]+)(<[^>]+>)\R(<.+>)\R" >> "$1$2\r\n$1$3\r\n" ARSTW
          ^!IfError Next Else Skip_-1
          ;Remove delimiters and extra CR's
          ^!Replace "<(.+)>\R*" >> "$1\r\n" ARSTW
          ;=====

          Regards,
          John

          From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of netplayground
          Sent: Sunday, June 20, 2010 16:56
          To: ntb-clips@yahoogroups.com
          Subject: Re: [Clip] Script help needed for processing a list of download links



          --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , Axel Berger
          <Axel-Berger@...> wrote:
          >
          > netplayground wrote:
          > > So below is an example of what I am trying to do:
          >
          > Something nasty has happened to your data. Could you zip the two
          files,
          > put them somewhere, and post a link here?
          >
          > Danke
          > Axel
          >
          WOW. What a mess. I apologize. I was (and am) using the rich text
          editing system from the group page on Yahoo and what looked normal in
          the editor obviously went berserk somewhere after I hit send.

          To ensure that you can easily understand what has me stumped I've put
          the 'example' data in several places. Hopefully one of them will work
          for you.

          First, i'm going to try to embed a link to a screen capture of the file
          with notations. If you see nothing below this sentence, you know that
          went sour.

          [example]

          The direct link to the image that should be shown above is:
          http://lh6.ggpht.com/_jw6J159zDV8/TB6mvWpm1hI/AAAAAAAAC0E/nBeaOWy6Y5A/s8\
          <http://lh6.ggpht.com/_jw6J159zDV8/TB6mvWpm1hI/AAAAAAAAC0E/nBeaOWy6Y5A/s800/group%20data%20process%2
          0example.png>
          00/group%20data%20process%20example.png
          <http://lh6.ggpht.com/_jw6J159zDV8/TB6mvWpm1hI/AAAAAAAAC0E/nBeaOWy6Y5A/s\
          <http://lh6.ggpht.com/_jw6J159zDV8/TB6mvWpm1hI/AAAAAAAAC0E/nBeaOWy6Y5A/s800/group%20data%20process%2
          0example.png>
          800/group%20data%20process%20example.png>

          You can also download a copy of the overview image (both png and jpg)
          plus the original text file via rapidshare or sendspace using the
          appropriate link below:

          <%20http://rapidshare.com/files/401151761/group_data_process_example.zip\
          <http://rapidshare.com/files/401151761/group_data_process_example.zip>
          > Rapidshare Link:
          http://rapidshare.com/files/401151761/group_data_process_example.zip
          <%20http://rapidshare.com/files/401151761/group_data_process_example.zip\
          <http://rapidshare.com/files/401151761/group_data_process_example.zip>
          >

          Sendspace Link:
          group_data_process_example.zip
          http://www.sendspace.com/file/a8vbde
          <http://www.sendspace.com/file/a8vbde>

          Thanks in advance for your help and again, sorry for the previous post
          which looked like I sent it through a commercial grade blender!

          NETPLAYGROUND

          [Non-text portions of this message have been removed]



          [Non-text portions of this message have been removed]
        • diodeom
          ... Skip_-1 cycles as many times as the maximum number of links within the largest group. I d call it a loop. :)
          Message 4 of 10 , Jun 21, 2010
          • 0 Attachment
            "John Shotsky" <jshotsky@...> wrote:
            >
            > I happen to dislike loops when they are not
            > needed, because they take more time than simple
            > replaces.
            >

            "Skip_-1" cycles as many times as the maximum number of links within the largest group. I'd call it a loop. :)
          • John Shotsky
            I agree it is a loop strictly speaking, but that s not what I meant. Regards, John From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf
            Message 5 of 10 , Jun 21, 2010
            • 0 Attachment
              I agree it is a loop strictly speaking, but that's not what I meant.

              Regards,
              John

              From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of diodeom
              Sent: Monday, June 21, 2010 11:50
              To: ntb-clips@yahoogroups.com
              Subject: Re: [Clip] Script help needed for processing a list of download links


              "John Shotsky" <jshotsky@...> wrote:
              >
              > I happen to dislike loops when they are not
              > needed, because they take more time than simple
              > replaces.
              >

              "Skip_-1" cycles as many times as the maximum number of links within the largest group. I'd call it
              a loop. :)



              [Non-text portions of this message have been removed]
            • Net Playground
              Thank you .. everyone .. for the suggestions.   John ... your suggestion below worked like a charm.  I was able to process about 3500 lines of information
              Message 6 of 10 , Jun 22, 2010
              • 0 Attachment
                Thank you .. everyone .. for the suggestions.   John ... your suggestion below worked like a charm.  I was able to process about 3500 lines of information in the blink of an eye ... all perfect.  It sure beats doing it by hand.

                This was my first time ever asking for assistance with anything via a group.  Thank you everyone for responding so quickly and with such great information and ideas.  It is truly appreciated.

                NETPLAYGROUND


                --- On Mon, 6/21/10, John Shotsky <jshotsky@...> wrote:

                From: John Shotsky <jshotsky@...>
                Subject: RE: [Clip] Script help needed for processing a list of download links
                To: ntb-clips@yahoogroups.com
                Date: Monday, June 21, 2010, 1:47 PM







                 









                There is almost always more than one way to do things. I happen to dislike loops when they are not

                needed, because they take more time than simple replaces.



                So, the following does what has been requested, using only replaces.

                ;=====

                ;Add delimiters and spaces to URLs

                ^!Replace "^(http.+html)" >> "<\x20\x20\x20\x20\x20$1>" AIRSTW

                ;Set up the first line

                ^!Replace "^(\w.+)\R(<.+>)\R" >> "$1$2\r\n" ARSTW

                ;Set up the rest

                ^!Replace "^(\w[^<]+)(<[^>]+>)\R(<.+>)\R" >> "$1$2\r\n$1$3\r\n" ARSTW

                ^!IfError Next Else Skip_-1

                ;Remove delimiters and extra CR's

                ^!Replace "<(.+)>\R*" >> "$1\r\n" ARSTW

                ;=====



                Regards,

                John



                From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of netplayground

                Sent: Sunday, June 20, 2010 16:56

                To: ntb-clips@yahoogroups.com

                Subject: Re: [Clip] Script help needed for processing a list of download links







                --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , Axel Berger

                <Axel-Berger@...> wrote:

                >

                > netplayground wrote:

                > > So below is an example of what I am trying to do:

                >

                > Something nasty has happened to your data. Could you zip the two

                files,

                > put them somewhere, and post a link here?

                >

                > Danke

                > Axel

                >

                WOW. What a mess. I apologize. I was (and am) using the rich text

                editing system from the group page on Yahoo and what looked normal in

                the editor obviously went berserk somewhere after I hit send.



                To ensure that you can easily understand what has me stumped I've put

                the 'example' data in several places. Hopefully one of them will work

                for you.



                First, i'm going to try to embed a link to a screen capture of the file

                with notations. If you see nothing below this sentence, you know that

                went sour.



                [example]



                The direct link to the image that should be shown above is:

                http://lh6.ggpht.com/_jw6J159zDV8/TB6mvWpm1hI/AAAAAAAAC0E/nBeaOWy6Y5A/s8\

                <http://lh6.ggpht.com/_jw6J159zDV8/TB6mvWpm1hI/AAAAAAAAC0E/nBeaOWy6Y5A/s800/group%20data%20process%2

                0example.png>

                00/group%20data%20process%20example.png

                <http://lh6.ggpht.com/_jw6J159zDV8/TB6mvWpm1hI/AAAAAAAAC0E/nBeaOWy6Y5A/s\

                <http://lh6.ggpht.com/_jw6J159zDV8/TB6mvWpm1hI/AAAAAAAAC0E/nBeaOWy6Y5A/s800/group%20data%20process%2

                0example.png>

                800/group%20data%20process%20example.png>



                You can also download a copy of the overview image (both png and jpg)

                plus the original text file via rapidshare or sendspace using the

                appropriate link below:



                <%20http://rapidshare.com/files/401151761/group_data_process_example.zip\

                <http://rapidshare.com/files/401151761/group_data_process_example.zip>

                > Rapidshare Link:

                http://rapidshare.com/files/401151761/group_data_process_example.zip

                <%20http://rapidshare.com/files/401151761/group_data_process_example.zip\

                <http://rapidshare.com/files/401151761/group_data_process_example.zip>

                >



                Sendspace Link:

                group_data_process_example.zip

                http://www.sendspace.com/file/a8vbde

                <http://www.sendspace.com/file/a8vbde>



                Thanks in advance for your help and again, sorry for the previous post

                which looked like I sent it through a commercial grade blender!



                NETPLAYGROUND



                [Non-text portions of this message have been removed]



                [Non-text portions of this message have been removed]

























                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.