mirror of
https://codeberg.org/scip/note.git
synced 2025-12-16 20:21:04 +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
|
||||
#
|
||||
# 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
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@@ -38,7 +38,6 @@ use Getopt::Long;
|
||||
use FileHandle;
|
||||
use File::Spec;
|
||||
use YAML;
|
||||
#use Data::Dumper;
|
||||
|
||||
|
||||
#
|
||||
@@ -139,12 +138,10 @@ my (
|
||||
|
||||
# these are not customizable at runtime!
|
||||
$hardparams = "(readonly|maxlen|dbdriver|useencryption|cryptmethod)";
|
||||
|
||||
$CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
|
||||
$USER = getlogin || getpwuid($<);
|
||||
chomp $USER;
|
||||
$USER = getlogin || getpwuid($<); chomp $USER;
|
||||
$TOPIC = 1;
|
||||
$VERSION = "1.3.24";
|
||||
$VERSION = "1.3.25";
|
||||
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
||||
$maxlen = "auto";
|
||||
$timelen = 22;
|
||||
@@ -532,7 +529,8 @@ sub encrypt_passwd {
|
||||
if ($@) {
|
||||
print "Something went wrong: $@\n";
|
||||
exit 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
print "Encrypted password:\n$crypt_string\n";
|
||||
}
|
||||
}
|
||||
@@ -1302,7 +1300,7 @@ sub interactive {
|
||||
|
||||
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
|
||||
terms of the GNU General Public License. Use it at your own risk :-)
|
||||
|
||||
@@ -1735,7 +1733,8 @@ sub tree {
|
||||
$LocalTree->{$node}->{$NoteKey} = [];
|
||||
}
|
||||
&tree($num, $text, $LocalTree->{$node}, @nodes);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (length($text) > ($maxlen - 5)) {
|
||||
$text = substr($text, 0, ($maxlen -5));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user