Community
    • Login

    copy multiple urls text to lines

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    15 Posts 2 Posters 8.1k 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.
    • Claudia FrankC
      Claudia Frank @Kippie Woop
      last edited by

      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
      • Kippie WoopK
        Kippie Woop
        last edited by

        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 :)

        Claudia FrankC 1 Reply Last reply Reply Quote 1
        • Claudia FrankC
          Claudia Frank @Kippie Woop
          last edited by

          @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
          • Kippie WoopK
            Kippie Woop
            last edited by

            Thx again for your fast reply,

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

            Claudia FrankC 1 Reply Last reply Reply Quote 0
            • Claudia FrankC
              Claudia Frank @Kippie Woop
              last edited by

              @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
              • Kippie WoopK
                Kippie Woop
                last edited by

                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

                Claudia FrankC 1 Reply Last reply Reply Quote 1
                • Claudia FrankC
                  Claudia Frank @Kippie Woop
                  last edited by

                  @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
                  • Kippie WoopK
                    Kippie Woop
                    last edited by

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

                    http://imgur.com/0iWC1eY

                    Claudia FrankC 1 Reply Last reply Reply Quote 0
                    • Claudia FrankC
                      Claudia Frank @Kippie Woop
                      last edited by

                      @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
                      • Kippie WoopK
                        Kippie Woop
                        last edited by

                        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

                        Claudia FrankC 1 Reply Last reply Reply Quote 0
                        • Claudia FrankC
                          Claudia Frank @Kippie Woop
                          last edited by Claudia Frank

                          @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
                          • Kippie WoopK
                            Kippie Woop
                            last edited by

                            yes that is it

                            Claudia FrankC 1 Reply Last reply Reply Quote 0
                            • Claudia FrankC
                              Claudia Frank @Kippie Woop
                              last edited by

                              @Kippie-Woop
                              so the script works?

                              Cheers
                              Claudia

                              1 Reply Last reply Reply Quote 0
                              • Kippie WoopK
                                Kippie Woop
                                last edited by

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

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