NOTEDB::pwsafe3(3pm)
π NOTEDB::pwsafe3(3pm) β the group chat rundown π
okay bestie, sit down, hydrate, because we're about to talk about a Perl module from the User Contributed Perl Documentation section that lets you poke at a note database and honestly? it's giving cozy little text-file energy and i'm obsessed π«Ά
Like bestie you should totally have the module name written down somewhere anyway, so here it is: NOTEDB::pwsafe3 β¨
πΈ NAME πΈ
NOTEDB::pwsafe3 β module lib for accessing a notedb from perl π
β¨ SYNOPSIS β¨
okay so this is the whole vibe in one code block, no cap π§
# include the module
use NOTEDB;
# create a new NOTEDB object
$db = new NOTEDB("text", "/home/tom/.notedb", 4096, 24);
# decide to use encryption
# $key is the cipher to use for encryption
# $method must be either Crypt::IDEA or Crypt::DES
# you need Crypt::CBC, Crypt::IDEA and Crypt::DES to have installed.
$db->use_crypt($key,$method);
# do not use encryption
# this is the default
$db->no_crypt;
# get a single note
($note, $date) = $db->get_single(1);
# search for a certain note
%matching_notes = $db->get_search("somewhat");
# format of returned hash:
#$matching_notes{$numberofnote}->{'note' => 'something', 'date' => '23.12.2000 10:33:02'}
# get all existing notes
%all_notes = $db->get_all();
# format of returns hash like the one from get_search above
# get the next noteid available
$next_num = $db->get_nextnum();
# modify a certain note
$db->set_edit(1, "any text", "23.12.2000 10:33:02");
# create a new note
$db->set_new(5, "any new text", "23.12.2000 10:33:02");
# delete a certain note
$db->set_del(5);
# turn on encryption. CryptMethod must be IDEA, DES or BLOWFISH
$db->use_crypt("passphrase", "CryptMethod");
# turn off encryption. This is the default.
$db->no_crypt();
let's break the highlights down because there are literally so many:
use NOTEDB;β include the module, that's it, that's the girl π$db = new NOTEDB("text", "/home/tom/.notedb", 4096, 24);β create a new NOTEDB object β¨$db->use_crypt($key,$method);β decide to use encryption, where$keyis the cipher to use for encryption, and$methodmust be eitherCrypt::IDEAorCrypt::DES. note bestie: you needCrypt::CBC,Crypt::IDEAandCrypt::DESto have installed π$db->no_crypt;β do not use encryption, and this is the default π($note, $date) = $db->get_single(1);β get a single note π%matching_notes = $db->get_search("somewhat");β search for a certain note, and the format of the returned hash is:
$matching_notes{$numberofnote}->{'note' => 'something', 'date' => '23.12.2000 10:33:02'}
%all_notes = $db->get_all();β get all existing notes, with the format of the returns hash like the one fromget_searchabove π$next_num = $db->get_nextnum();β get the nextnoteidavailable π$db->set_edit(1, "any text", "23.12.2000 10:33:02");β modify a certain note βοΈ$db->set_new(5, "any new text", "23.12.2000 10:33:02");β create a new note π±$db->set_del(5);β delete a certain note π$db->use_crypt("passphrase", "CryptMethod");β turn on encryption, andCryptMethodmust beIDEA,DESorBLOWFISHπ₯$db->no_crypt();β turn off encryption, and this is the default π
π¦ DESCRIPTION π¦
so here's the tea, fr fr: you can use this module for accessing a note database. the backend uses a text file for storage and Config::General for accessing the file πβ¨
currently, NOTEDB module is only used by note itself. but feel free to use it within your own project! perhaps someone want to implement a web interface to note... π iconic honestly, like that's main character energy right there π
π USAGE π
please see the section SYNOPSIS, it says it all. lowkey unserious of it but we respect the confidence π«Ά
π AUTHOR π
Thomas Linden <tom AT linden DOT at> β thank you for your service bestie, we love you π
π the sign-off π
this whole thing is documented for perl v5.40.1, dated 2026-08-10, and it's part of the NOTEDB::pwsafe3(3pm) user contributed perl documentation situation. slay, periodt, go read your notes π
β¨πΈ
π¦ where this page comes from
- ubuntu stonking: note 1.4.2-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms