• Login
Community
  • Login

copy multiple urls text to lines

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
15 Posts 2 Posters 8.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    Kippie Woop
    last edited by Feb 16, 2016, 9:20 AM

    Line 1
    Line 2
    Line 3
    URL GOTO=
    Line 4
    Line 5
    Line 6
    URL GOTO=
    Line 4
    Line 5
    Line 6
    Line 4
    Line 5
    Line 6
    Line 4
    Line 5
    Line 6
    Line 4
    Line 5
    Line 6
    Line 4
    Line 5
    Line 6
    URL GOTO=

    paste these 3 links to the 3 above URL GOTO= in same order

    URL GOTO= http://test/=26022016
    URL GOTO= http://test/=27022016
    URL GOTO= http://test/=28022016

    C 1 Reply Last reply Feb 16, 2016, 4:09 PM Reply Quote 0
    • C
      Claudia Frank @Kippie Woop
      last edited by Feb 16, 2016, 4:09 PM

      Hello @Kippie-Woop,

      I would do it with a simple python script.

      def do_replace(contents, lineNumber, totalLines):
          editor1.rereplace('(URL GOTO=)$', contents.strip(), 0, 0, 0, 1);
      
      editor2.forEachLine(do_replace)
      

      editor2 has the content with URL GOTO= http://test/=26022016 …
      and editor1 with the line4 …

      If you need more information how this works let me know.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • K
        Kippie Woop
        last edited by Feb 16, 2016, 6:08 PM

        thx for your reply Claudia

        I gonna test this out, I am complete newbie to python. So first I gonna learn how to run this :)

        C 1 Reply Last reply Feb 16, 2016, 6:17 PM Reply Quote 1
        • C
          Claudia Frank @Kippie Woop
          last edited by Feb 16, 2016, 6:17 PM

          @Kippie-Woop

          ok, some tips install the msi instead of using the plugin manager.
          Once done, goto plugins menu->python script and chose new script, give it a meaningful name and
          copy the script into the document ->save it.
          Open your two documents and move the one with URL GOTO= http://test/=26022016 … to the other view (right click on tab).
          Both documents should be visible now.
          Goto to plugins->python-script->Scripts and click on the created script.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • K
            Kippie Woop
            last edited by Feb 16, 2016, 6:44 PM

            Thx again for your fast reply,

            But I dont know what u mean with : to the other view

            C 1 Reply Last reply Feb 16, 2016, 6:53 PM Reply Quote 0
            • C
              Claudia Frank @Kippie Woop
              last edited by Feb 16, 2016, 6:53 PM

              @Kippie-Woop

              right click on the tab, there is an option called Move to other view
              This opens the second editor.

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • K
                Kippie Woop
                last edited by Feb 16, 2016, 7:09 PM

                Thx again for your fast reply,

                When I go to my Document :

                Line 1
                Line 2
                Line 3
                URL GOTO=
                Line 4
                Line 5
                Line 6
                URL GOTO=
                Line 4
                …
                …
                …
                URL GOTO= http://test/=26022016
                URL GOTO= http://test/=27022016
                URL GOTO= http://test/=28022016

                and run script on this page the links line up on the same line and over the URL GOTO= Not next to =
                like this : URL GOTO=http://test/=26022016 but it goes like this http://test/=26022016

                C 1 Reply Last reply Feb 16, 2016, 7:31 PM Reply Quote 1
                • C
                  Claudia Frank @Kippie Woop
                  last edited by Feb 16, 2016, 7:31 PM

                  @Kippie-Woop

                  I don’t quite understand what you are saying.
                  My assumption is like this .
                  Is this the case?

                  If not, please make a screenshot from your files and upload it to http://imgur.com .
                  No registration required.

                  Cheers
                  Claudia

                  1 Reply Last reply Reply Quote 0
                  • K
                    Kippie Woop
                    last edited by Feb 17, 2016, 5:55 AM

                    from first how it is now to last how i want it

                    http://imgur.com/0iWC1eY

                    C 1 Reply Last reply Feb 17, 2016, 11:59 AM Reply Quote 0
                    • C
                      Claudia Frank @Kippie Woop
                      last edited by Feb 17, 2016, 11:59 AM

                      @Kippie-Woop

                      I don’t know how the list of links look like.
                      Do you have a list like

                      URL GOTO= http://test/=26022016
                      URL GOTO= http://test/=27022016
                      URL GOTO= http://test/=28022016

                      or is your list like

                      http://test/=26022016
                      http://test/=27022016
                      http://test/=28022016

                      This is important. Because if the latter is the case then we need to append text,
                      not to replace it.

                      Cheers
                      Claudia

                      1 Reply Last reply Reply Quote 0
                      • K
                        Kippie Woop
                        last edited by Feb 17, 2016, 1:09 PM

                        this is the real links

                        URL GOTO= http://www.tlc.nl/tv-gids/tlc/?type=day&channel_code=TLNL-H&filter=0600&date=16022016
                        URL GOTO= http://www.tlc.nl/tv-gids/tlc/?type=day&channel_code=TLNL-H&filter=0600&date=17022016
                        URL GOTO= http://www.tlc.nl/tv-gids/tlc/?type=day&channel_code=TLNL-H&filter=0600&date=18022016

                        thx for helping me

                        C 1 Reply Last reply Feb 17, 2016, 1:25 PM Reply Quote 0
                        • C
                          Claudia Frank @Kippie Woop
                          last edited by Claudia Frank Feb 17, 2016, 1:26 PM Feb 17, 2016, 1:25 PM

                          @Kippie-Woop

                          but then it should work.
                          See here , this is my start,
                          then I run the script and I get this .
                          You see - it is what you expect, or?

                          Cheers
                          Claudia

                          1 Reply Last reply Reply Quote 0
                          • K
                            Kippie Woop
                            last edited by Feb 17, 2016, 1:48 PM

                            yes that is it

                            C 1 Reply Last reply Feb 17, 2016, 1:49 PM Reply Quote 0
                            • C
                              Claudia Frank @Kippie Woop
                              last edited by Feb 17, 2016, 1:49 PM

                              @Kippie-Woop
                              so the script works?

                              Cheers
                              Claudia

                              1 Reply Last reply Reply Quote 0
                              • K
                                Kippie Woop
                                last edited by Feb 17, 2016, 1:55 PM

                                Yes the script is working now, I didnt know what i did wrong thx for your help

                                1 Reply Last reply Reply Quote 0
                                3 out of 15
                                • First post
                                  3/15
                                  Last post
                                The Community of users of the Notepad++ text editor.
                                Powered by NodeBB | Contributors