Community
    • Login

    Is there a place to post useful Python scripts for NPP?

    Scheduled Pinned Locked Moved General Discussion
    8 Posts 3 Posters 425 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.
    • vanowmV
      vanowm
      last edited by

      Just curious if there is a “repository” of some kind for Python scripts (aka cousins of plugins)?

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @vanowm
        last edited by

        @vanowm

        Well, the PythonScript developers sometimes accept scripts for their “Samples” folder that gets installed with PS.

        But otherwise there really isn’t a “place”. You could of course create your own place (e.g. make your own project on github) to store/share yours.

        1 Reply Last reply Reply Quote 2
        • vanowmV
          vanowm
          last edited by

          Well, I don’t really have much to offer, just made a script that I think some people might find useful (backup files on save, which keeps all previous versions, unlike built-in backup, which overwrites previous backup). Do people share scripts here on the forum?
          I guess it would be more appropriate post it at https://sourceforge.net/p/npppythonscript/discussion/1199074/

          PeterJonesP Alan KilbornA 2 Replies Last reply Reply Quote 1
          • PeterJonesP
            PeterJones @vanowm
            last edited by

            @vanowm said in Is there a place to post useful Python scripts for NPP?:

            Do people share scripts here on the forum?

            We often share scripts that are in answer to queries in the forum. But if you have a cool script for PythonScript, feel free to share the code here, and how to use it.

            1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn @vanowm
              last edited by

              @vanowm

              I imagine your script is similar to THIS one of mine, but with some sort of date/time stamp added to the filename?

              BTW, your avatar is about the most exotic I’ve ever seen.

              vanowmV 1 Reply Last reply Reply Quote 0
              • vanowmV
                vanowm @Alan Kilborn
                last edited by

                @Alan-Kilborn Yes, it’s similar, the main difference besides the date/time added to the filename is that the file backed up BEFORE it’s being saved not after, therefore original code is preserved.
                I’ve posted it here but might as well added to that topic.

                P.S.
                my avatar is an indicator of sense of humor, a lot of people hate it and a lot find it hilarious.

                Alan KilbornA 1 Reply Last reply Reply Quote 2
                • Alan KilbornA
                  Alan Kilborn @vanowm
                  last edited by

                  @vanowm said in Is there a place to post useful Python scripts for NPP?:

                  the file backed up BEFORE it’s being saved not after, therefore original code is preserved.

                  It seems to me that if the backup action is done upon every single save, it doesn’t matter.
                  But I like it “after” because then the timestamp applied to it is representative of the time the data in the saved snapshot backup was actually changed – the original data is potentially much older than the data I’m about to save (and would have its own snapshot (the previous one) that has a timestamp appropriate to its era.

                  I do have something like this running for myself, although I’ve never published it. I created it when the NUL NUL NUL problem was “rampant” and even hit me once. I had N++'s verbose backups turned on, but even the files created with that were corrupted. So I decided at that time to create my own backup method, semi-independent of N++ as to be immune from the NUL problem.

                  vanowmV 1 Reply Last reply Reply Quote 2
                  • vanowmV
                    vanowm @Alan Kilborn
                    last edited by vanowm

                    @Alan-Kilborn said in Is there a place to post useful Python scripts for NPP?:

                    It seems to me that if the backup action is done upon every single save, it doesn’t matter.

                    It does, if you want preserve the very original code upon first save.

                    But I like it “after” because then the timestamp applied to it is representative of the time the data in the saved snapshot backup was actually changed – the original data is potentially much older than the data I’m about to save (and would have its own snapshot (the previous one) that has a timestamp appropriate to its era.

                    The most recent data will be at the original file location, not at the backup, but I see why someone might want have 2 identical files be at different locations.

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