mirror of
https://codeberg.org/scip/note.git
synced 2025-12-17 04:31:02 +01:00
ADDED: "-" works also for --dump, but in the other direction. It causes
note to dump to standard output instead into a file.
ADDED: you can specify - as filename for use with --import and if you want
to create a new note. "-" stands for standardinput and it allows you
tp pipe another commands output to note!
ADDED: you can now use an environment variable for the passphrase (when using
encryption). If it is presen, note will not ask for a passphrase. This
is very usefull in comination with the addition above, for use in
scripts.
CHANGED: the interactive help screen is now coloured.
ADDED: -o commandline switch, which causes note to overwrite an existing
database when importing data from a previous dump. Very handy if
you want to re-initialize your db, i.e. if you changed the format.
ADDED: the long-tree-view (-T) displays now also the note-number of each
note.
This commit is contained in:
@@ -86,6 +86,14 @@ sub use_crypt {
|
||||
}
|
||||
}
|
||||
|
||||
sub set_del_all
|
||||
{
|
||||
unlink $NOTEDB;
|
||||
open(TT,">$NOTEDB") or die "Could not create $NOTEDB: $!\n";
|
||||
close (TT);
|
||||
}
|
||||
|
||||
|
||||
sub get_single
|
||||
{
|
||||
my($this, $num) = @_;
|
||||
|
||||
@@ -43,6 +43,7 @@ my $sql_edit = "UPDATE $table SET $fnote = ?, $fdate = ? WHERE $fnum = ?";
|
||||
my $sql_insertnew = "INSERT INTO $table VALUES (?, ?, ?)";
|
||||
|
||||
my $sql_del = "DELETE FROM $table WHERE $fnum = ?";
|
||||
my $sql_del_all = "DELETE FROM $table";
|
||||
######################################################################################################
|
||||
|
||||
sub new
|
||||
@@ -213,6 +214,14 @@ sub set_del
|
||||
}
|
||||
|
||||
|
||||
sub set_del_all
|
||||
{
|
||||
my($this) = @_;
|
||||
my $statement = $DB->prepare($sql_del_all) || die $DB->errstr();
|
||||
$statement->execute() || die $DB->errstr();
|
||||
return;
|
||||
}
|
||||
|
||||
sub set_recountnums
|
||||
{
|
||||
my $this = shift;
|
||||
|
||||
Reference in New Issue
Block a user