CHANGED: ok, mysql support is back again (upon requests). therefore there

are two different version of the script in the same time with
                the same features, one for mysql and the other one for the binary
                database.
ADDED:          Dump to textfile capability. Later on I want to dump it into a
                palm readable format, any help is welcome!
ADDED:          interactive mode.
CHANGED:        Better modularity, better code.
CHANGED:        note can now run without the need of a config file. If does not
                exist, it will try to work with default values.
ADDED:          sub num_bereich(), which allows one to specify more then one
                number for deletion or displaying (i.e.: "-d 1,4,7" or "-d 4-9")
This commit is contained in:
TLINDEN
2012-02-10 20:03:20 +01:00
parent ff1414cd3a
commit ee0797bad6
11 changed files with 2092 additions and 14 deletions

88
config/noterc Normal file
View File

@@ -0,0 +1,88 @@
# 0.4
# This is a sample config for the note script
# You do not need it, if you keep the values
# here unchanged.
#
# Copy it to your $HOME as .noterc
#
# IMPORTANT:
# If you previously used note 0.1 or 0.2 then
# you will already have such a file. This file
# is not compatible with the one for note 0.3!
# You have to delete it and to create a new one.
#
# This config has to be valid perl code. Therefore
# please be carefull!
#
# You can contact me per email: <tom@daemon.de>
#
# Thomas Linden, 01/2000
# mysql database settings. leave them uncommented
# if you are not using the mysql version of note.
# $dbhost = ""; # mysql server (hostname)
# $dbuser = ""; # mysql username
# $dbpasswd = ""; # her password
# $dbname = ""; # database name
# $table = "note"; # Table and field names.
# $fnum = "number";
# $fnote = "note";
# $fdate = "date";
# uncomment this, if you want to run note always
# in interactive mode
#$ALWAYS_INT = "YES";
# uncomment this, if you want to use always your
# favorite editor (even for creating notes) instead
# of <STDIN>
#$ALWAYS_EDIT = "YES"
# Define the maximum bytes a note can have in a
# note-entry.
$MAX_NOTE = 1024;
# Define the maximum bytes a timestamp can have
# in a note-entry.
$MAX_TIME = 64;
# The maximum width for displaying a note.
$maxlen = 30;
# Your home, better do not change it!
$HOME = `echo \$HOME`;
chomp $HOME;
# The location of the note-database. If it does
# not exist, it will be created.
$NOTEDB = $HOME . "/.notedb";
# if $COLOR equals NO, then everything will be
# displayed with your default colors (mostly black)
$COLOR = "NO";
# Color-definitions of the various fields. Will be
# ignored if $COLOR = "NO".
$BORDER_COLOR = "BLACK"; # Borders
$NUM_COLOR = "blue"; # Note number
$NOTE_COLOR = "magenta"; # The note itself
$TIME_COLOR = "black"; # The time
# The following colors are available:
# black, red, green, yellow, blue, magenta, cyan and white.
# It will be bold if it is uppercase.
# You can append an underscore, if you like it underscored,
# ie: blue_
# Or, you can append an "I", if you like it inverted
# keep this "1;" please!
1;