note
view release on metacpan or search on metacpan
#
# processed colors
#
$BORDERC, $_BORDERC, $NOTEC, $NUMC, $_NUMC, $_NOTEC, $TIMEC,
$_TIMEC, $TOPICC, $_TOPICC,
#
# config presets
#
$DEFAULTDBNAME, $USER, $PATH, $CONF,
#
# internals
#
$TYPE, $mode, $NoteKey, %Color, @LastTopic, $timelen, $maxlen,
$VERSION, $CurTopic, $CurDepth, $WantTopic, $db,
$sizeof, %TP, $TreeType, $ListType, $SetTitle, $clearstring,
@ArgTopics, $key, $typedef, @NumBlock, $has_nothing, @completion_topics, @completion_notes,
@randomlist, $hardparams
);
#
# DEFAULTS, allows one to use note without a config
# don't change them, instead use the config file!
#
%conf = (
'numbercolor' => 'blue',
'bordercolor' => 'black',
'timecolor' => 'black',
'topiccolor' => 'black',
'notecolor' => 'green',
'alwaysinteractive' => 1,
'keeptimestamp' => 0,
'readonly' => 0,
'shortcd' => 1,
'autoclear' => 0,
'maxlen' => 'auto',
'defaultlong' => 0,
'dbdriver' => 'binary', # will be depcrecated in 1.5.0 and replaced by dumper.
'timeformat' => 'DD.MM.YYYY hh:mm:ss',
'usecolors' => 0,
'addticket' => 0,
'formattext' => 0,
'alwayseditor' => 1,
'useencryption' => 0,
'tempdirectory' => File::Spec->tmpdir(),
'topicseparator' => '/',
'printlines' => 0,
'cache' => 0,
'preferrededitor' => '',
'motd' => '',
'usejson' => 0, # will be the default in the future
);
# these are not customizable at runtime!
$hardparams = "(readonly|maxlen|dbdriver|useencryption|cryptmethod)";
$CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
$USER = getlogin || getpwuid($<); chomp $USER;
$TOPIC = 1;
$VERSION = "1.4.2";
$CurDepth = 1; # the current depth inside the topic "directory" structure...
$maxlen = "auto";
$timelen = 22;
@randomlist = ('a'..'z', 0..9, 'A'..'Z');
# colors available
# \033[1m%30s\033[0m
%Color = ( 'black' => '0;30',
'red' => '0;31',
'green' => '0;32',
'yellow' => '0;33',
'blue' => '0;34',
'magenta' => '0;35',
'cyan' => '0;36',
'white' => '0;37',
'B' => '1;30',
'BLACK' => '1;30',
'RED' => '1;31',
'GREEN' => '1;32',
'YELLOW' => '1;33',
'BLUE' => '1;34',
'MAGENTA' => '1;35',
'CYAN' => '1;36',
'WHITE' => '1;37',
'black_' => '4;30',
'red_' => '4;31',
'green_' => '4;32',
'yellow_' => '4;33',
'blue_' => '4;34',
'magenta_' => '4;35',
'cyan_' => '4;36',
'white_' => '4;37',
'blackI' => '7;30',
'redI' => '7;31',
'greenI' => '7;32',
'yellowI' => '7;33',
'blueI' => '7;34',
'magentaI' => '7;35',
'cyanI' => '7;36',
'whiteI' => '7;37',
'white_black' => '40;37;01',
'bold' => ';01',
'hide' => '44;34'
);
#
# process command line args
#
if ($ARGV[0] eq "") {
$mode = "new";
}
elsif ($#ARGV == 0 && $ARGV[0] eq "-") {
$mode = "new";
$StdinMode = 1; # read from STDIN until EOF
shift;
undef $has_nothing;
}
( run in 1.639 second using v1.01-cache-2.11-cpan-39bf76dae61 )