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

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

Expand Messages
  • loro
    ... Get the title info into a variable somehow (I call it %info%). Then search for http:// and replace it with ^P^%info%^Phttp:// , that is, linebreak
    Message 1 of 10 , Jun 19, 2010
      netplayground wrote:
      >Title Info For Link Group
      >Threehttp://hotfile.com/dl/45559612/a76d94a/movie.three.part01.rar.htmlh\
      >ttp://hotfile.com/dl/45559660/ce384f4/movie.three.part02.rar.htmlhttp://\
      >hotfile.com/dl/45559738/fb559ae/movie.three.part03.rar.htmlhttp://hotfil\
      >e.com/dl/45559791/2a1bf07/movie.three.part04.rar.htmlhttp://hotfile.com/\
      >dl/45559834/10d95aa/movie.three.part05.rar.htmlhttp://hotfile.com/dl/455\
      >59926/856c862/movie.three.part06.rar.htmlhttp://hotfile.com/dl/45559995/\
      >5f77568/movie.three.part07.rar.htmlhttp://hotfile.com/dl/45560090/f4c01b\
      >4/movie.three.part08.rar.htmlhttp://hotfile.com/dl/45560163/048f589/movi\
      >e.three.part09.rar.htmlhttp://hotfile.com/dl/45560261/d559104/movie.thre\
      >e.part10.rar.htmlhttp://hotfile.com/dl/45560323/36c1d7a/movie.three.part\
      >11.rar.htmlhttp://hotfile.com/dl/45560399/a9d79fc/movie.three.part12.rar\
      >.html
      >
      >
      >PROCESSED DATA OUT: [TITLE][5 SPACES][LINK INFO][^P] (one per line)
      >Title Info For Link Group One
      >http://hotfile.com/dl/45558557/afe5503/movie.one.part01.rar.html
      >Title Info For Link Group One
      >http://hotfile.com/dl/45558689/1c8dafe/movie.one.part02.rar.html


      Get the title info into a variable somehow (I call it %info%). Then
      search for "http://" and replace it with "^P^%info%^Phttp://", that
      is, linebreak followed by the content of the variable followed by
      linebreak followed by "http://".

      Something like this as a starting point. (untested).
      ^!Replace "http://" >> "^P^%info%^Phttp://" WTA


      Lotta
    • netplayground
      ... files, ... 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
      Message 2 of 10 , Jun 20, 2010
        --- In ntb-clips@yahoogroups.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\
        00/group%20data%20process%20example.png
        <http://lh6.ggpht.com/_jw6J159zDV8/TB6mvWpm1hI/AAAAAAAAC0E/nBeaOWy6Y5A/s\
        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\
        > Rapidshare Link:
        http://rapidshare.com/files/401151761/group_data_process_example.zip
        <%20http://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]
      • 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 3 of 10 , Jun 20, 2010
          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 4 of 10 , Jun 21, 2010
            "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 5 of 10 , Jun 21, 2010
              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 6 of 10 , Jun 21, 2010
                "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 7 of 10 , Jun 21, 2010
                  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 8 of 10 , Jun 22, 2010
                    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.