mirror of
https://codeberg.org/scip/note.git
synced 2025-12-17 04:31:02 +01:00
FIXED: there was a bug in the search expression, use now \Q and \E.
ADDED: --config <file> allows one to use another config than the default.
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
==================================================================================
|
||||
|
||||
1.0.7:
|
||||
FIXED: there was a bug in the search expression, use now \Q and \E.
|
||||
ADDED: --config <file> allows one to use another config than the default.
|
||||
|
||||
==================================================================================
|
||||
|
||||
1.0.6:
|
||||
FIXED: there were some odd bugs in commandline parsing, some options were unavailable.
|
||||
FIXED: Forgot "PreferredEditor" config-option in the new config format.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $Id: binary.pm,v 1.5 2000/04/26 22:57:38 thomas Exp thomas $
|
||||
# $Id: binary.pm,v 1.6 2000/06/25 19:48:00 scip Exp scip $
|
||||
# Perl module for note
|
||||
# binary database backend. see docu: perldoc NOTEDB::binary
|
||||
#
|
||||
@@ -25,7 +25,7 @@ BEGIN {
|
||||
my ($NOTEDB, $sizeof, $typedef,$version);
|
||||
my ($cipher);
|
||||
|
||||
$version = "(NOTEDB::binary, 1.5)";
|
||||
$version = "(NOTEDB::binary, 1.6)";
|
||||
|
||||
|
||||
sub new
|
||||
@@ -171,7 +171,7 @@ sub get_search
|
||||
($num, $note, $date) = unpack($typedef, $buffer);
|
||||
$n = ude($note);
|
||||
$t = ude($date);
|
||||
if($n =~ /$searchstring/i)
|
||||
if($n =~ /\Q$searchstring\E/i)
|
||||
{
|
||||
$res{$num}->{'note'} = $n;
|
||||
$res{$num}->{'date'} = $t;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $Id: dbm.pm,v 1.1 2000/05/14 00:55:28 thomas Exp thomas $
|
||||
# $Id: dbm.pm,v 1.2 2000/06/25 19:51:11 scip Exp scip $
|
||||
# Perl module for note
|
||||
# DBM database backend. see docu: perldoc NOTEDB::dbm
|
||||
#
|
||||
@@ -107,7 +107,7 @@ sub get_search
|
||||
my($num, $note, $date, %res);
|
||||
|
||||
foreach $num (sort {$a <=> $b} keys %date) {
|
||||
if (ude($note{$num}) =~ /$searchstring/i) {
|
||||
if (ude($note{$num}) =~ /\Q$searchstring\E/i) {
|
||||
$res{$num}->{'note'} = ude($note{$num});
|
||||
$res{$num}->{'date'} = ude($date{$num});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $Id: mysql.pm,v 1.4 2000/04/26 22:57:50 thomas Exp thomas $
|
||||
# $Id: mysql.pm,v 1.5 2000/06/25 19:50:43 scip Exp scip $
|
||||
# Perl module for note
|
||||
# mysql database backend. see docu: perldoc NOTEDB::binary
|
||||
#
|
||||
@@ -161,7 +161,7 @@ sub get_search
|
||||
foreach $num (sort { $a <=> $b } keys %res) {
|
||||
$note = ude($res{$num}->{'note'});
|
||||
$date = ude($res{$num}->{'date'});
|
||||
if($note =~ /$searchstring/i)
|
||||
if($note =~ /\Q$searchstring\E/i)
|
||||
{
|
||||
$res{$num}->{'note'} = $note;
|
||||
$res{$num}->{'date'} = $date;
|
||||
|
||||
4
README
4
README
@@ -1,4 +1,4 @@
|
||||
note 1.0.6 by Thomas Linden, 18/05/2000
|
||||
note 1.0.7 by Thomas Linden, 27/06/2000
|
||||
=======================================
|
||||
|
||||
Introduction
|
||||
@@ -514,4 +514,4 @@ Contributors / Credits
|
||||
Last changed
|
||||
============
|
||||
|
||||
18/05/2000
|
||||
27/06/2000
|
||||
|
||||
31
bin/note
31
bin/note
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $Id: note,v 1.27 2000/05/16 23:51:35 thomas Exp thomas $
|
||||
# $Id: note,v 1.29 2000/06/25 20:13:23 scip Exp scip $
|
||||
#
|
||||
#
|
||||
# note - console notes management with database and encryption support.
|
||||
@@ -59,7 +59,7 @@ my (
|
||||
# commandline options
|
||||
#
|
||||
$opt_, $opt_i, $opt_r, $opt_e, $opt_d,
|
||||
$opt_s, $opt_t, $opt_T, $opt_l, $opt_L,
|
||||
$opt_s, $opt_t, $opt_T, $opt_l, $opt_L, $opt_c,
|
||||
$opt_D, $opt_I, $opt_o, $opt_h, $opt_n, $opt_v,
|
||||
|
||||
#
|
||||
@@ -126,7 +126,7 @@ $TIME_COLOR = "black";
|
||||
$TOPIC_COLOR = "BLACK";
|
||||
$TOPIC = 1;
|
||||
$TopicSep = '/';
|
||||
$version = "1.0.6";
|
||||
$version = "1.0.7";
|
||||
if($TOPIC)
|
||||
{
|
||||
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
||||
@@ -154,6 +154,7 @@ else
|
||||
Getopt::Long::Configure( qw(no_ignore_case));
|
||||
GetOptions (
|
||||
"interactive|i!" => \$opt_i, # no arg
|
||||
"config|c=s" => \$opt_c, # string, required
|
||||
"raw|r!" => \$opt_r, # no arg
|
||||
"edit|e=i" => \$opt_e, # integer, required
|
||||
"delete|d=s" => \$opt_d, # integer, required
|
||||
@@ -243,7 +244,15 @@ else
|
||||
&usage;
|
||||
}
|
||||
else {
|
||||
$has_nothing = 1;
|
||||
if($opt_c && $mode eq "" && !$opt_n) {
|
||||
$mode = "new";
|
||||
}
|
||||
elsif($opt_c && $mode eq "") {
|
||||
$mode = ""; # huh?!
|
||||
}
|
||||
else {
|
||||
$has_nothing = 1;
|
||||
}
|
||||
}
|
||||
### determine generic options
|
||||
if($opt_n =~ /^[\d+\-?\,*]+$/) {
|
||||
@@ -281,10 +290,16 @@ if($has_nothing && $mode eq "")
|
||||
|
||||
|
||||
# read the configfile.
|
||||
$CONF = $opt_c if($opt_c); # if given by commandline, use this.
|
||||
if(-e $CONF)
|
||||
{
|
||||
&getconfig($CONF);
|
||||
}
|
||||
elsif($opt_c) {
|
||||
# only wrong, if specified by commandline! else use default values!
|
||||
print STDERR "Could not open \"$CONF\": file does not exist or permission denied!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
# Always interactive?
|
||||
@@ -1062,6 +1077,7 @@ Usage: note [ options ] [ number [,number...]]
|
||||
Options:
|
||||
-h --help displays this help screen
|
||||
-v --version displays the version number
|
||||
-c --config <file> use another config file than the default \~/.noterc
|
||||
-l --list [<topic>] lists all existing notes If no topic were specified,
|
||||
it will display a list of all existing topics.
|
||||
-L --longlist [<topic>] the same as -l but prints also the timestamp
|
||||
@@ -1560,6 +1576,13 @@ sub getconfig
|
||||
__END__
|
||||
#
|
||||
# $Log: note,v $
|
||||
# Revision 1.29 2000/06/25 20:13:23 scip
|
||||
# *** empty log message ***
|
||||
#
|
||||
# Revision 1.28 2000/06/25 19:51:51 scip
|
||||
# changed pattern matching of seraching(\@ ... \E)
|
||||
# added --config option
|
||||
#
|
||||
# Revision 1.27 2000/05/16 23:51:35 thomas
|
||||
# fixed many option-parsing related bugd!
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user