NOTEDB::pwsafe3(3pm)

πŸ“¦
version 1.4.2 Β· 3 versions
, in ubuntu stonking

πŸ’– 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 $key is the cipher to use for encryption, and $method must be either Crypt::IDEA or Crypt::DES. note bestie: you need Crypt::CBC, Crypt::IDEA and Crypt::DES to 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 from get_search above 🌈
  • $next_num = $db->get_nextnum(); β€” get the next noteid available πŸ’œ
  • $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, and CryptMethod must be IDEA, DES or BLOWFISH πŸ”₯
  • $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