FIXED: the T (and t respectively) printed nothing out since 1.0.3! It does

it now again...
ADDED:          a new database backend added, NOTEDB::dbm, which uses DBM files for
                storage.
FIXED:          &display-tree returns now, if there is no note, otherwise it
                would die because of an undefined refernce.
CHANGED:        Changed the config file format completely. It is now no more a perl
                file, instead it is a simple plain text file which note parses.
CHANGED:        Changed the way, note loads it database backend. It uses now the
                $dbdriver variable as module-name, which makes it possible easily
                to write your own backend without the need to change note itself.
FIXED:          Removed Getopt::Long option "bundling", causes errors with perl
                5.6.0 and is not senceful.
FIXED:          Added the Getopt::Long option "no_ignore_case". In 1.0.4 options
                were case insensitive causing -i to be interpreted as --import
                instead of --interactive ;-(((
ADDED:          a new config option $DEFAULT_LIST, which causes note,  \
                if turned to "LONG", to use long-listing as default.    |
                But it will still be able to use short-listing if you   |
                explicit specify that.                                  |    submitted by
FIXED:          sub search prints now an appropriate error-message in   |==> Peter Palmreuther
                case no searchstring was given instead of jumping to    |    thanks a lot!
                usage.                                                  |
CHANGED:        Changed the text in the interactive help to reflect     |
                changes of verion 1.0.3 (t and T).                     /
This commit is contained in:
TLINDEN
2012-02-10 20:15:05 +01:00
parent 332db5a3dd
commit 9a2d07e0e0
8 changed files with 830 additions and 309 deletions

View File

@@ -1,130 +1,143 @@
# 1.0.0
# 1.0.5 -*- sh -*-
# This is a sample config for the note script
# There are usefully defaults set in note itself.
# There are useful defaults set in note itself.
#
# The default database backend is NOTEDB::binary.
#
# Copy it to your $HOME as .noterc
#
# This config has to be valid perl code. Therefore
# please be careful!
#
# note is Copyright (c) 1999-2000 Thomas Linden.
# You can contact me per email: <tom@daemon.de>
#
# Thomas Linden, 18/04/2000
#
# comments start with #, empty lines will be ignored.
# 1 turns an option on, 0 turns it off.
# An option consists of an atribute-value pair separated
# by minimum one space (more spaces and/or tabs are allowed)
# Your home, better do not change it!
$HOME = $ENV{'HOME'};
# Your home directory, better do not change it!
# can be an environment variable or a path
Home $ENV{'HOME'}
# specify the path, where the NOTEDB directory
# specify the path, where the NOTEDB lib directory
# resides. This will only used if it is not
# installed inside the perl-lib directory structure!
$libpath = "/usr/local/lib";
LibPath /usr/local/lib
# you need to decide which database backend you want
# to use. Please refer to the corresponding documentation
# for closer information about the certain backend!
# Currently supported types: "binary" or "mysql".
$dbdriver = "binary";
# Currently supported types: "binary", "dbm" or "mysql".
# You must also edit/uncomment one section below for the
# backend you want to use!
DbDriver binary
# backend specific settings:
####### mysql ###############
# sql database settings.
$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";
######## end mysql ###########
# backend specific settings for sql backend
#DbHost localhost
#DbUser you
#DbPasswd
#DbName mynotes
#DbTable note
#FieldNumber number
#FieldNote note
#FieldDate date
#### specific end ###
####### binary db ##################
# The location of the note-database. If it does
# not exist, it will be created. Only if $driver = "binary"
$NOTEDB = $HOME . "/.notedb";
# Define the maximum bytes a note can have in a
# note-entry.
$MAX_NOTE = 4096;
# backend specific settings for binary(default) backend
NoteDb ~/.notedb
# Define the maximum bytes fields can have in a
# note-entry. Do not change MaxTimeByte to less than 64!
# Define the maximum bytes a timestamp can have
# in a note-entry.
$MAX_TIME = 64;
####### end binary #################
MaxNoteByte 4096
MaxTimeByte 64
#### specific end ###
# ENCRYPTION
# if you want to encrypt your note-data, turn this on
# by setting to "YES". The default is no.
# if turned on, note will ask you for a passphrase
$USE_CRYPT = "NO";
# takes only affect if $USE_CRYPT is on!
# Possible values: IDEA or DES
$CRYPT_METHOD = "IDEA"; # requires Crypt::IDEA
# backend specific settings for DBM backend
# this must be an existing directory!
#DbName /home/you/.notedbm
#### specific end ###
# You can use encryption with note, that means notes and
# timestamps will be stored encrypted. This is supported
# by every db-backend.
# Set to 1 to turn it on. The Default is 0 (off)
UseEncryption 0
# Specify the encryption protocol. The appropriate perl
# module needs to be installed. Possible velues are
# IDEA, DES or BLOWFISH, the default is IDEA.
CryptMethod IDEA
# uncomment this, if you want to run note always
# in interactive mode
#$ALWAYS_INT = "YES";
# You can run note always in interactive mode by simply
# typing "note". Set this option to 1 to turn it on.
# The default is 0 (off).
AlwaysInteractive 0
# uncomment this, if you want to use always your
# favorite editor (even for creating notes) instead
# of <STDIN>
#$ALWAYS_EDIT = "YES";
# In interactive mode, note issues a list command if you
# simply hit enter. By turning this on, it will issue a
# longlist command instead if you hit just enter.
# The default is 0 (off)
DefaultLong 0
# uncomment this, if you dont prefer that note updates
# the timestamp of a note after editing it. It will
# keep the original timestamp if this option is set.
#$KEEP_TIMESTAMP = "YES";
# You can use an external editor everytime from note instead
# of STDIN for creating new notes. Set to 1 to turn it on.
# The default is 0 (off).
AlwaysEditor 0
# uncomment and edit it, if you want to use another
# editor than the default $EDITOR or as fallback vi.
#$PreferredEditor = "emacs";
#PreferredEditor emacs
# This option turns topic-support on or off
# comment it out, if you don't need it
$TOPIC = 1;
# If you dont prefer that note updates the timestamp of a
# note after editing, turn this on. It will
# keep the original timestamp if this option is set.
# The default is 0(off), to turn it on set to 1.
KeepTimeStamp 0
# You can specify your own topic separator here.
# the default topic separator is a normal slash: "/"
#$TopicSep = '/';
# see README for details about topics!
TopicSeparator /
# The maximum width for displaying a note.
$maxlen = 30;
# The maximum width for displaying a note, in CHARS.
# Depends on your screen-size. You can set it to
# "auto", if you wish that note sould determine the
# available size, but it experimental, be aware!
MaxLen 30
# if $COLOR equals NO, then everything will be
# displayed with your default colors (mostly black)
$COLOR = "YES";
# note can use colors for output, set this option to
# 1, if you don't want it, or if your terminal does
# not support it, set to 0. The default is 1 (on).
UseColors 1
# Color-definitions of the various fields. Will be
# ignored if $COLOR = "NO".
$BORDER_COLOR = "BLACK"; # Borders
$NUM_COLOR = "blue"; # Note number
$NOTE_COLOR = "green"; # The note itself
$TIME_COLOR = "black"; # The time
$TOPIC_COLOR = "BLACK"; # The topic "prompt"
# Color-definitions of the various items. Will only
# take effect, if "UseColors" is turned on!
BorderColor BLACK
NumberColor blue
NoteColor green
TimeColor black
TopicColor BLACK
# 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
# black, red, green, yellow, blue, magenta, cyan and white.
# for bold color write it uppercase (BLACK will be bold black)
# for underlined color append an underscore (blue_ will be underlined blue)
# for inverted color append an "I" (greenI will be inverted green)
# keep this "1;" please!
1;
# That's all about it for now.
# If you still have any questiosn, please feel free to contact
# me by email: Thomas Linden <tom@daemon.de>