KeePass Notes Search Plugin (Innerhalb der Kommentare suchen / search within notes field)

Weil ich die Funktion zum Suchen innerhalb des KeePass Kommentar-Feldes dringend benötigte habe ich mich (zusammen mit ChatGPT 3.5) mal 4 Stunden hingesetzt und ein Plugin für KeePass geschrieben mit dem man in den Kommentaren nach einem Suchtext suchen kann und dieser rot markiert wird wenn er gefunden wurde.

English version below!

KeePass NotesSearch Plugin Version 1.6 download:

NotesSearchPlugin.zip

NotesSearch Plugin (NotesSearchPlugin.dll & NotesSearchPlugin.plgx)

NotesSearchPlugin_encrypted.zip

Verschlüsselte Version falls ihr Probleme habt die DLL/PLGX durch eure Firewall zu bekommen. Passwort zur Entschlüsselung: notessearch

NotesSearchPlugin_Sourcecode.zip

NotesSearchPlugin.cs & AssemblyInfo.cs

>> Das Plugin ist seit 07.09.2023 auch auf der offiziellen KeePass Plugins Homepage von Dominik Reichl gelistet.

Release Notes
V1.6 (27.04.2024)
>>
Fehler behoben (System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt bei NotesSearchPlugin.NotesSearchPluginExt.IsNoteTextChanged()) nach Ablauf des Timers zum automatischen schließen (Optionen –> Sicherheit –> Arbeitsfläche nach KeePass-Inaktivität sperren (Sekunden))
Beachten bitte dass eine Änderung der Notizen innerhalb des NotesSearch-Plugins NICHT gespeichert werden wenn das Plugin durch das Hauptprogramm beendet wird, also der Timer abgelaufen ist!
V1.5 (20.04.2024)
>>
Bei Änderungen in den Notizen wird der Button „Save (Alt-Q)“ rot um darauf hinzuweisen diese zu speichern
>> Wenn Änderungen in den Notizen gemacht wurden und das Plugin geschlossen wird kommt eine Abfrage ob die Änderungen gespeichert werden sollen (Ja, Nein, Abbrechen)
>> Downloadpakete (zip-files) enthalten die Version 1.5 als DLL (NotesSearchPlugin.dll) und zusätzlich als PLGX-Datei (NotesSearchPlugin.plgx) für besser Unterstützung von „custom builds“ z.B. unter Linux
Infos zu PLGX auf der KeePass-Homepage
V1.4 (24.01.2024)
>> Speichern von Änderungen hinzugefügt –> Save (Alt-Q)
V1.3 (13.10.2023)

>> URLs werden im Standardbrowser geöffnet wenn man sie anklickt
V1.2 (25.09.2023)
>> Search-as-you-type hinzugefügt (es wird sofort gesucht sobald Suchtext eingeben wird)
bitte beachten: wird der Suchtext in einer URL/Link gefunden dann wird die Zeile ganz oben angezeigt jedoch nicht rot markiert
V1.1 (14.09.2023)
>> Schriftartgröße im Kommentarfeld um 15% erhöht und das Suchfeld um 50%
>> entfernen von Leerzeichen vor und hinter dem Suchtext (trim)
V1.0 (07.09.2023)
>> Erster release

Zur Installation einfach beide Dateien NotesSearchPlugin.dll und NotesSearchPlugin.plgx wie auf der KeePass-Seite beschrieben importieren (Danke an Dominik Reichl) bzw. ins KeePass-Plugins Verzeichnis kopieren. Bei mir z.B. „C:\Program Files (x86)\KeePass Password Safe 2\Plugins“

Nachdem KeePass neu gestartet wurde kann man über einen Rechts-Klick auf einen Eintrag im Menü „NotesSearch“ auswählen …

Notes Search Menu

Es erscheint das Suchfenster …

Keepass Notes Search

Sobald du die ersten Zeichen des Suchtextes (4) eingegeben hast wird die gefundene Zeile angezeigt (search-as-you-type). Wenn du ganz von Anfang des Kommentars suchen willst klicke auf „Search from top“ (2) oder Alt-W damit wird immer nur das erste Vorkommen des Suchtextes im Kommentar gefunden und rot markiert (5). Bei „Search from top (Alt-W)“ (2) wird immer ganz oben angefangen zu suchen, dies ist bei Änderung des Suchtextes wichtig um alle Vorkommnisse zu finden.
Wenn der Suchtext innerhalb einer URL gefunden wird wird dieser nicht rot markiert sondern nur in der obersten Zeile angezeigt.

Anschließend kann man mit „Search next“ oder Alt-S (3) zum nächsten Vorkommen des Suchtextes springen welches dann ebenfalls rot markiert wird. Wenn kein Suchtext mehr gefunden wird erscheint die Meldung „No further occurrences of the search text were found!

Du kannst Änderungen im Kommentar speichern indem du auf „Save (Alt-Q)“ (1) klickst oder die Tastenkombination Alt-Q aufrufst. Falls du eine Änderung im Kommentar vorgenommen hast wirst du gefragt ob du die Änderung speichern willst, ansonsten passiert nichts.

Innerhalb des Kommentars können sie beliebigen Text markieren und mit Strg-C kopieren.
ACHTUNG:
>> Bitte beachte dass alle Informationen die darüber in der Zwischenablage landen darin verbleiben bis diese überschrieben/gelöscht werden!
>> Sie können innerhalb des Kommentarfelds auch neuen Text eingeben, dieser wird jedoch nur gespeichert wenn sie auf „Save (Alt-Q)“ klicken oder über die Tastenkombination Alt-Q die Änderung speichern, ansonsten wir die Änderung verworfen!

Zum Beenden einfach oben rechts mit „X“ schließen.

Viel Spaß mit dem Plugin, ich hoffe es hilft dem einen oder anderen 🙂


English

Because I urgently needed a function to search within the KeePass notes field, I spent about 4 hours (together with ChatGPT 3.5) writing a plugin for KeePass that allows you to search for a specific text within notes and if found, mark it in red.

KeePass NotesSearch Plugin Version 1.6 download:

NotesSearchPlugin.zip

NotesSearch Plugin (NotesSearchPlugin.dll & NotesSearchPlugin.plgx)

NotesSearchPlugin_encrypted.zip

Encrypted version just in case you have got trouble getting the dll through your firewall. Decryption password: notessearch

NotesSearchPlugin_Sourcecode.zip

NotesSearchPlugin.cs & AssemblyInfo.cs

>> The plugin is also listed on the official KeePass Plugins Homepage of Dominik Reichl since 09/07/2023.

Release Notes
V1.6 (04/27/2024)
Bug fixed (System.NullReferenceException: The object reference was not set to an object instance in NotesSearchPlugin.NotesSearchPluginExt.IsNoteTextChanged()) after the automatic close timer expired (Options –> Security –> Lock workspace after KeePass inactivity (seconds))
Please be aware that changes to the notes within the NotesSearch plugin will NOT be saved if the plugin is closed by the main program, i.e. the timer has expired!
V1.5 (04/20/2024)
>>
If you changed the notes the button „Save (Alt-Q)“ will change it´s color to red just to remind you to save your changes
>> If you made any changes and you close the plugin you are asked if you want to save it (Yes, No, Cancel)
>> Download packages (zip files) contain version 1.5 as a DLL (NotesSearchPlugin.dll) and additionally as a PLGX file (NotesSearchPlugin.plgx) for better support of „custom builds“ e.g. under Linux
Info about PLGX on KeePass-Homepage
V1.4 (01/24/2024)
>> Added saving changes –> Save (Alt-Q)
V1.3 (10/13/2023)
>> URLs are opened in the default browser when clicked
V1.2 (09/25/2023)
>> search-as-you-type added (the searchtext is search as soon as you start typing)
please be aware: if the searchtext is found within a URL / link the text will be shown on the very top of the window but it will not be marked in red
V1.1 (09/14/2023)
>> increase font size of notes field by 15% and the search-text-field by 50%
>> remove any whitespace from the search-text (right/left trim) 
V1.0 (09/07/2023)
>> Initial release 

To install, simply import or copy both, the NotesSearchPlugin.dll & NotesSearchPlugin.plgx files as described on the KeePass website (thanks to Dominik Reichl) into the KeePass plugins directory. On my PC e.g. „C:\Program Files (x86)\KeePass Password Safe 2\Plugins“

After restarting KeePass, you can select „NotesSearch“ from the context menu by right-clicking on an entry …

Notes Search Menu

This will open the search window …

Keepass Notes Search

As you type your search text in (4), the first matching line will automatically be found (search-as-you-type). If you want to find the first occurrence click on „Search from top“ (2) or press Alt-W. This will find and highlight the first occurrence of the search text in the notes (5). When using „Search from top,“ (2) it always starts searching from the top, which is important when changing the search text to find all occurrences. If the search text is found within a URL it will not be marked in red, instead it will be display at the top of the notes area.

You can then use „Search next“ or Alt-S (3) to jump to the next occurrence of the search text, which will also be highlighted in red. If no more instances of the search text are found, you will see the message „No further occurrences of the search text were found!

You can save any changes in the notes area by clicking on „Save (Alt-Q)“ (1) or press Alt-Q. If you changed anything in the notes area you are asked if you want to save your changes, otherwise nothing happens.

Within the notes field you can mark any text and copy it with Ctrl-C.
ATTENTION:
>> Please note that all information that ends up on the clipboard remains there until it is overwritten/deleted!
>>You can also enter new text in the notes area, but this will only be saved if you click on
„Save (Alt-Q)“ or save the changes using the Alt-Q key combination, otherwise the changes will be discarded!

To exit, simply close the window using the „X“ in the upper right corner.

Enjoy the plugin, and I hope it helps you and others! 🙂


Keywords: KeePass, plugin, dll, plgx, search within notes, search notes plugin, search within KeePass notes field, suchen in kommentar, suchen in kommentaren, suchen in KeePass Kommentaren, custom build plgx supported (Linux etc.)


Français
Parce que j’avais un besoin urgent de la fonction de recherche au sein du champ de commentaire de KeePass, j’ai consacré environ 4 heures (en collaboration avec ChatGPT 3.5) à écrire un plugin pour KeePass qui permet de rechercher un texte dans les commentaires et de le surligner en rouge lorsqu’il est trouvé. Cliquez sur l’un des liens de téléchargement en haut du tableau. Mots-clés : KeePass, plugin, dll, plgx, recherche dans les commentaires, recherche dans les commentaires, recherche dans les commentaires de KeePass, prise en charge de la construction personnalisée plgx (Linux, etc.), recherche dans les notes KeePass.


Español
Porque necesitaba urgentemente la función de búsqueda dentro del campo de comentarios de KeePass, pasé unas 4 horas (junto con ChatGPT 3.5) escribiendo un complemento para KeePass que permite buscar un texto en los comentarios y resaltar en rojo cuando se encuentra. Haz clic en uno de los enlaces de descarga en la parte superior de la tabla. Palabras clave: KeePass, complemento, dll, plgx, búsqueda en comentarios, búsqueda en comentarios, búsqueda en comentarios de KeePass, soporte de construcción personalizada plgx (Linux, etc.), búsqueda en notas de KeePass.


Italiano
Poiché avevo un urgente bisogno della funzione di ricerca all’interno del campo dei commenti di KeePass, ho trascorso circa 4 ore (in collaborazione con ChatGPT 3.5) scrivendo un plugin per KeePass che consente di cercare un testo nei commenti e di evidenziarlo in rosso quando viene trovato. Fai clic su uno dei link per il download nella parte superiore della tabella. Parole chiave: KeePass, plugin, dll, plgx, ricerca nei commenti, ricerca nei commenti, ricerca nei commenti di KeePass, supporto per la creazione personalizzata di plgx (Linux, ecc.), ricerca nelle note di KeePass.


Polski
Ponieważ pilnie potrzebowałem funkcji wyszukiwania wewnątrz pola komentarza w KeePass, spędziłem około 4 godzin (wspólnie z ChatGPT 3.5) pisząc wtyczkę do KeePass, która pozwala na wyszukiwanie tekstu w komentarzach i oznaczanie go na czerwono, gdy zostanie znaleziony. Kliknij jeden z linków do pobrania powyżej w tabeli. Słowa kluczowe: KeePass, wtyczka, dll, plgx, wyszukiwanie w komentarzu, wyszukiwanie w komentarzach, wyszukiwanie w komentarzach KeePass, wsparcie dla niestandardowej budowy plgx (Linux itp.), wyszukiwanie w notatkach KeePass.


Čeština
Protože jsem naléhavě potřeboval funkci vyhledávání uvnitř pole komentáře v KeePass, strávil jsem zhruba 4 hodiny (spolu s ChatGPT 3.5) psaním doplňku pro KeePass, který umožňuje vyhledávání textu v komentářích a označuje ho červeně, když je nalezen. Klikněte na jeden z odkazů ke stažení nahoře v tabulce. Klíčová slova: KeePass, doplněk, dll, plgx, vyhledávání v komentáři, vyhledávání v komentářích, vyhledávání v komentářích KeePass, podpora vlastního sestavení plgx (Linux atd.), vyhledávání v poznámkách KeePass.


Українська
Тому що мені терміново знадобилася функція пошуку в коментарях у полі KeePass, я витратив близько 4 годин (спільно з ChatGPT 3.5) на написання плагіна для KeePass, який дозволяє шукати текст в коментарях і позначати його червоним, коли він знаходиться. Клацніть одне з посилань для завантаження вгорі таблиці. Ключові слова: KeePass, плагін, dll, plgx, пошук в коментарі, пошук в коментарях, пошук в коментарях KeePass, підтримка користувацької побудови plgx (Linux тощо), пошук в нотатках KeePass.