Takenotes plugin package hash mismatched



  • 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.



  • @Karlstens

    It seems to work for me.

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

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



  • 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.



  • @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).



  • 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



  • @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.


Log in to reply