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:
TLINDEN
2012-02-10 20:14:24 +01:00
parent 26d9b1ce97
commit 5b54b5f822
7 changed files with 281 additions and 103 deletions

View File

@@ -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;