mirror of
https://codeberg.org/scip/note.git
synced 2025-12-17 04:31:02 +01:00
cleaned: tabs2spc, re-indent correctly etc
This commit is contained in:
17
bin/note
17
bin/note
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
#
|
||||||
# note - console notes management with database and encryption support.
|
# note - console notes management with database and encryption support.
|
||||||
# Copyright (C) 1999-2016 T.v.Dein (see README for details!)
|
# Copyright (C) 1999-2017 T.v.Dein (see README for details!)
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@@ -38,7 +38,6 @@ use Getopt::Long;
|
|||||||
use FileHandle;
|
use FileHandle;
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
use YAML;
|
use YAML;
|
||||||
#use Data::Dumper;
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -139,12 +138,10 @@ my (
|
|||||||
|
|
||||||
# these are not customizable at runtime!
|
# these are not customizable at runtime!
|
||||||
$hardparams = "(readonly|maxlen|dbdriver|useencryption|cryptmethod)";
|
$hardparams = "(readonly|maxlen|dbdriver|useencryption|cryptmethod)";
|
||||||
|
|
||||||
$CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
|
$CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
|
||||||
$USER = getlogin || getpwuid($<);
|
$USER = getlogin || getpwuid($<); chomp $USER;
|
||||||
chomp $USER;
|
|
||||||
$TOPIC = 1;
|
$TOPIC = 1;
|
||||||
$VERSION = "1.3.24";
|
$VERSION = "1.3.25";
|
||||||
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
||||||
$maxlen = "auto";
|
$maxlen = "auto";
|
||||||
$timelen = 22;
|
$timelen = 22;
|
||||||
@@ -532,7 +529,8 @@ sub encrypt_passwd {
|
|||||||
if ($@) {
|
if ($@) {
|
||||||
print "Something went wrong: $@\n";
|
print "Something went wrong: $@\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
print "Encrypted password:\n$crypt_string\n";
|
print "Encrypted password:\n$crypt_string\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1302,7 +1300,7 @@ sub interactive {
|
|||||||
|
|
||||||
sub usage
|
sub usage
|
||||||
{
|
{
|
||||||
print qq~This is the program note $VERSION by Thomas Linden (c) 1999-2009.
|
print qq~This is the program note $VERSION by T.v.Dein (c) 1999-2017.
|
||||||
It comes with absolutely NO WARRANTY. It is distributed under the
|
It comes with absolutely NO WARRANTY. It is distributed under the
|
||||||
terms of the GNU General Public License. Use it at your own risk :-)
|
terms of the GNU General Public License. Use it at your own risk :-)
|
||||||
|
|
||||||
@@ -1735,7 +1733,8 @@ sub tree {
|
|||||||
$LocalTree->{$node}->{$NoteKey} = [];
|
$LocalTree->{$node}->{$NoteKey} = [];
|
||||||
}
|
}
|
||||||
&tree($num, $text, $LocalTree->{$node}, @nodes);
|
&tree($num, $text, $LocalTree->{$node}, @nodes);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (length($text) > ($maxlen - 5)) {
|
if (length($text) > ($maxlen - 5)) {
|
||||||
$text = substr($text, 0, ($maxlen -5));
|
$text = substr($text, 0, ($maxlen -5));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user