• Login
Community
  • Login

Takenotes plugin package hash mismatched

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
6 Posts 3 Posters 703 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
    Karlstens
    last edited by Jul 15, 2021, 7:10 AM

    I’m looking for a method so that new Notepad++ tabs are stamped with the date and time, avoiding myself losing track of unsaved files named “new 1”, “new 2” etc.

    In reading up on plugins, TakeNotes looked to do the trick, but alas I can’t get it to work as when I attempt to add the plugin via NotePad++ plugin manager, it returns a “Plugin package hash mismatched” error.

    Is this plugin still maintained, or is there an alternative method that will default all new Notepad++ tabs created (before saving) with the date and time stamped as the tab name? I did read a method of using a python plugin and a startup script, but couldn’t get this to work.

    E 1 Reply Last reply Jul 15, 2021, 10:09 AM Reply Quote 0
    • E
      Ekopalypse @Karlstens
      last edited by Jul 15, 2021, 10:09 AM

      @Karlstens

      It seems to work for me.

      a36cf2b5-6702-4709-b8d1-af512ef34c2b-image.png

      What Npp version are you using? (Debug-info from ? menu)

      A K 2 Replies Last reply Jul 15, 2021, 11:11 AM Reply Quote 2
      • A
        Alan Kilborn @Ekopalypse
        last edited by Jul 15, 2021, 11:11 AM

        I used to use TakeNotes but then I realized that a simple PythonScript script can do its functionality better. If there’s interest in that, I can publish the script here.

        A 1 Reply Last reply Jul 15, 2021, 1:29 PM Reply Quote 1
        • A
          Alan Kilborn @Alan Kilborn
          last edited by Jul 15, 2021, 1:29 PM

          @Alan-Kilborn said in Takenotes plugin package hash mismatched:

          If there’s interest in that, I can publish the script here.

          I actually had a script ready to go for this, that I found in my archive.
          What this usually means is that I’ve posted it before.
          But I found no link-as-comment to a previous posting, so maybe I didn’t.
          Anyway, here’s the PythonScript:

          # -*- coding: utf-8 -*-
          
          from Npp import editor, notepad
          import os
          import time
          
          directory = os.environ['TEMP']
          #directory = r'c:\data\myNppFiles'  # example of direct specification of save folder
          ymdhms = time.strftime("%Y%m%d-%H%M%S", time.localtime())
          new_file_fullpath = directory + os.sep + ymdhms + '.txt'
          notepad.new()
          editor.insertText(0, '?'); editor.deleteRange(0, 1)  # modify file so it can be saved
          notepad.saveAs(new_file_fullpath)
          

          This is set up to use a user’s %TEMP% folder.
          Change to a specified folder by removing the leading # from the line that starts #directory = and specify your drive path there (where I currently have the path to myNppFiles).

          1 Reply Last reply Reply Quote 2
          • A
            Alan Kilborn
            last edited by Jul 15, 2021, 6:54 PM

            I should have added a few more points about the script:

            • I put the running of mine into the context menu. That way it is handy but doesn’t override the default File > New functionality. So it appears something like this when you right click:

            7413250f-ca34-4e29-b1e0-00af6af3ee1b-image.png

            • After running the script, a new tab like the following (in yellow highlight) will appear:

            bbf9bf88-8f32-4cfa-b2a9-23da2bae9d2a-image.png

            1 Reply Last reply Reply Quote 2
            • K
              Karlstens @Ekopalypse
              last edited by Jul 15, 2021, 11:40 PM

              @Ekopalypse said in Takenotes plugin package hash mismatched:

              @Karlstens

              It seems to work for me.

              a36cf2b5-6702-4709-b8d1-af512ef34c2b-image.png

              What Npp version are you using? (Debug-info from ? menu)

              Ha! Legend, my bad. I was on an older Notepad++ version, and TakeNotes installed instantly on the latest NP++ build.

              And yeah, I did look into the python script too, but also had trouble getting this setup, a little time poor at the moment (I don’t even have time to date/save my text files, hence the need for help!)

              I’ll look into python scripting for notepad++ in future when I have a weekend to spare, cause I can imagine how useful it would be.

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