- rewrite documentation sections regarding database backends.
- add depcreation announcement to README
- enhanced default config to reflect the new default file extensions
- enhanced error message when Encryption is set to off but a binary
  file is being encountered.
- bump version to 1.4.1
This commit is contained in:
2024-09-05 17:55:08 +02:00
parent 891f830cba
commit dbaf515259
7 changed files with 386 additions and 558 deletions

215
README
View File

@@ -1,215 +0,0 @@
note 1.4.0 by T.v.Dein (13/08/2023)
=======================================
Introduction
============
This is a small console program written in
perl, which allows you to manage notes similar
to programs like "knotes" from command line.
There are currently three different databases backends,
which you can use with note:
o NOTEDB::binary - this is the default backend
and uses a binary file to store your notes.
o NOTEDB::mysql - this backend uses a mysql
database to store your notes. You can switch
easily to another DBMS since this module uses
the Perl standard module "DBI" for database-
access. See below for more info on this topic!
o NOTEDB::dbm - this module uses two DBM files
for data storage and requires the module DB_FILE,
which is part of the perl standard distribution.
See below for more details about the DBM module.
o NOTEDB::general - uses the module Config::General
for storage, which makes the data file portable,
since it is a plain ascii file (binary content
will be base64 encoded).
o NOTEDB::text - uses the Storable module for data
storage (a serializer). Storable is included with
perl, and since it's written in C, it's very fast.
But the resulting data files are not that portable
as the once of NOTEDB::general are.
Where to get?
=============
By now you can download it at http://www.daemon.de/NOTE.
If you are using debian, you run `can apt-get ìnstall note`.
If you are using gentoo, you can emerge it.
You may also try your nearest tucows or freshmeat mirror.
Features
========
o Several different database backends, mysql(DBI), dbm,
binary (bin file), general and text (text files).
o Command line interface using the standard perl module
Getopt::Long, which allows you to use short or long
command-line options.
o Interactive interface (pure ascii), the following functions
are available in interactive mode: list, display, topic,
delete, edit, help.
o Highly configurable using a perlish configfile ~/.noterc.
although it is configurable it is not required, note can
run without a configfile using useful default presets.
o Colourized output is supported using ASCII Escape-Sequences.
o The user can customize the color for each item.
o Data can be stored in various different database backends,
since all database access is excluded from the program itself
in perl modules.
o Notes can be deleted, edited and you can search trough your notes.
o Notes can be categorized. Each category (topic) can contain multiple
notes and even more sup-topics. There is no limitation about
sub topics.
o You can view all notes in a list and it is possible only to view
notes under a certain topic.
o There is a tree-view, which allows you to get an overview of your
topic-hierarchy.
o Notes can be encrypted using DES or IDEA algorithms and Crypt::CBC.
o You can dump the contents of your note database into a plain text
file, which can later be imported. Imports can be appended or it can
overwrite an existing database (`-o`).
o Note has scripting capabilities, you can create a new note by piping
another commands output to note, you can also import a notedump from
stdin as well es duming to stdout instead a file. Additional, there
is an option `--raw` available, which prints everything out completely
without formatting.
o for better performance, note can cache the database for listings
or searching.
o It can be installed without root-privileges.
o If Term::ReadLine (and Term::ReadLine::Gnu) is installed, history
and auto-completion are supported in interactive mode.
o Last, a while ago a user stated: "... it simply does, what it
says ..."
Requirements
============
You need the following things:
o perl installed (5.004x)
o The module IO::Seekable and Fcntl, which should be
already installed with your perl distribuion if
you want to use the binary database backend.
o DBI module and DBI::mysql if you want to use the
mysql database backend.
o The module DB_FILE if you want to use the DBM module.
o Getopt::Long (part of perl std distribution)
o Term::ReadLine and optionally Term::ReadLine::Gnu if
you want to use the auto-completion and history functionality.
o Config::General if you want to use the NOTEDB::general
backend.
o YAML is needed to create backups using -D. Please note,
that this format is deprecated starting with 1.4.0. The
Support will be removed in 1.5.0. Please switch to JSON
format as soon as possible, either by using the -j
commandline option or the UseJSON configuration value.
Installation
============
Unpack the tar-ball and issue the following command:
$ perl Makefile.PL
This creates the Makefile neccessary for installing.
You may add some additional variables to the command line, the
most important one is PREFIX.
Then enter the following command to prepare the installation
process:
$ make
After that, you are ready to install. Become root and issue:
# make install
The installation process installs all modules for every available
data backends. The default note configuration does not require
additional perl modules.
If you want to use the mysql backend refer to the installation
instructions for the mysql database installation in mysql/README.
If you want to use encryption support, you will need at least
Crypt:CBC and Crypt::Blowfish (or Crypt::DES or whatever).
Configuration
=============
This version of note doesn't necessarily need
a configuration file. But you can have one and change
some default values. Take a look to the file config/noterc
provided with this tarball. There are detailed instructions
about every available parameter.
Simply copy this file into your home-directory and name it
`.noterc`
If you decide not to use the default database backend (a binary
file), you will *need* a configuration!
Usage
=====
Refer to the note(1) manpage for usage instructions.
Comments
========
You can send any comments to Thomas Linden <tom at linden dot at>.
If you find a bug or if you have a suggestion for improvement of the
script feel free to send me a patch ;-)
License
=======
This program comes with absolutely NO WARRANTY. It is distributed under
the terms of the GNU General Public License. Use it at your own risk :-)
You can read the complete GPL at: http://www.gnu.org/copyleft/gpl.html
Resources
=========
The command-line options and all commands of the interactive mode are
described in the supplied note(1) manpage.
You may also refer to the note website http://www.daemon.de/note/.
Author and Copyright
====================
The author is T.v.Dein
note is Copyright of T.v.Dein
Contributors / Credits
======================
Shouts to all those guys who helped me to enhance note: THANKS A LOT!
Jens Heunemann <jens.heunemann@consol.de> - sub tree.
Peter Palmreuther - various additions.
And many other people who sent bug reports, feature requests. If you
feel that I forgot your name in this list, then please send me an email
and I'll add you.
Last changed
============
13/08/2023

213
README.md Normal file
View File

@@ -0,0 +1,213 @@
# note - a perl script for maintaining notes.
This is the perl script 'note' in version 1.4.1 from 05/09/2024.
## Introduction
This is a small console program written in perl, which allows you to
manage notes similar to programs like "knotes" from command line.
There are a couple of different databases backends, which you can use
with note:
* **binary** - this is the default backend
and uses a binary file to store your notes.
* **mysql** - this backend uses a mysql
database to store your notes. You can switch
easily to another DBMS since this module uses
the Perl standard module "DBI" for database-
access. See below for more info on this topic!
* **dbm** - this module uses two DBM files
for data storage and requires the module DB_FILE,
which is part of the perl standard distribution.
See below for more details about the DBM module.
* **general** - uses the module Config::General
for storage, which makes the data file portable,
since it is a plain ascii file (binary content
will be base64 encoded).
* **text** - uses the Storable module for data
storage (a serializer). Storable is included with
perl, and since it's written in C, it's very fast.
But the resulting data files are not that portable
as the once of NOTEDB::general are.
* **pwsafe3** - uses the
[PWSAFE3](https://github.com/pwsafe/pwsafe/blob/master/docs/formatV3.txt)
file format, which is securely encrypted. The file can be opened
with any other program which supports the format. There are windows
programs and apps for mobile phones available. **I highly recommend
to use this backend if you ever intend to store sensitive
information in it!**
## Where to
You can download the source at http://www.daemon.de/NOTE or
https://github.com/tlinden/note.
If you are using debian, you run `can apt-get ìnstall note`.
If you are using gentoo, you can emerge it.
## Features
* Several different database backends, mysql(DBI), dbm,
binary (bin file), general and text (text files).
* Command line interface using the standard perl module
Getopt::Long, which allows you to use short or long
command-line options.
* Interactive interface (pure ascii), the following functions
are available in interactive mode: list, display, topic,
delete, edit, help.
* Highly configurable using a perlish configfile ~/.noterc.
although it is configurable it is not required, note can
run without a configfile using useful default presets.
* Colourized output is supported using ASCII Escape-Sequences.
* The user can customize the color for each item.
* Data can be stored in various different database backends,
since all database access is excluded from the program itself
in perl modules.
* Notes can be deleted, edited and you can search trough your notes.
* Notes can be categorized. Each category (topic) can contain multiple
notes and even more sup-topics. There is no limitation about
sub topics.
* You can view all notes in a list and it is possible only to view
notes under a certain topic.
* There is a tree-view, which allows you to get an overview of your
topic-hierarchy.
* Notes can be encrypted using DES or IDEA algorithms and Crypt::CBC.
* You can dump the contents of your note database into a plain text
file, which can later be imported. Imports can be appended or it can
overwrite an existing database (`-o`).
* Note has scripting capabilities, you can create a new note by piping
another commands output to note, you can also import a notedump from
stdin as well es duming to stdout instead a file. Additional, there
is an option `--raw` available, which prints everything out completely
without formatting.
* for better performance, note can cache the database for listings
or searching.
* It can be installed without root-privileges.
* If Term::ReadLine (and Term::ReadLine::Gnu) is installed, history
and auto-completion are supported in interactive mode.
* Last, a while ago a user stated: "... it simply does, what it
says ..."
## Requirements
You need the following things:
* perl installed (5.004x)
* The module IO::Seekable and Fcntl, which should be
already installed with your perl distribuion if
you want to use the binary database backend.
* DBI module and DBI::mysql if you want to use the
mysql database backend.
* The module DB_FILE if you want to use the DBM module.
* Getopt::Long (part of perl std distribution)
* Term::ReadLine and optionally Term::ReadLine::Gnu if
you want to use the auto-completion and history functionality.
* Config::General if you want to use the NOTEDB::general
backend.
* YAML is needed to create backups using -D. Please note,
that this format is deprecated starting with 1.4.0.
**The support will be removed in 1.5.0. Please switch to JSON
format as soon as possible, either by using the -j
commandline option or the UseJSON configuration value.**
* The Crypt::PWSafe3 module if you want to use the pwsafe3 backend.
## Installation
Unpack the tar-ball and issue the following command:
`$ perl Makefile.PL`
This creates the Makefile neccessary for installing.
You may add some additional variables to the command line, the
most important one is PREFIX.
Then enter the following command to prepare the installation
process:
`$ make`
After that, you are ready to install. Become root and issue:
`# make install`
The installation process installs all modules for every available
data backends. The default note configuration does not require
additional perl modules.
If you want to use the mysql backend refer to the installation
instructions for the mysql database installation in mysql/README.
If you want to use encryption support, you will need at least
Crypt:CBC and Crypt::Blowfish (or Crypt::DES or whatever you
prefer). You won't need to manually install any of this if you want to
use the pwsafe3 backend, in that case install Crypt::PWSafe3 with all
its dependencies.
## Configuration
This version of note doesn't necessarily need a configuration
file. But you can have one and change some default values. Take a look
at the file config/noterc provided with this tarball. There are
detailed instructions about every available parameter. Simply copy
this file into your home-directory and name it `.noterc` If you decide
not to use the default database backend (a binary file), you will
*need* a configuration!
## Usage
Refer to the note(1) manpage for usage instructions.
## Getting help
Although I'm happy to hear from note users in private email,
that's the best way for me to forget to do something.
In order to report a bug, unexpected behavior, feature requests or to
submit a patch, please open an issue on github:
https://github.com/TLINDEN/note/issues.
## Deprecation notes
The **binary** database format will be removed with version 1.5.0. No
deprecation note is being printed for now.
The **text** database format will be either removed or will use
another backend module for security reasons. The perl module Storable
will not be used anymore.
## Copyright and License
Copyright (c) 1999-2013 Thomas Linden
Copyright (c) 2013-2024 Thomas von Dein
Licensed under the GNU GENERAL PUBLIC LICENSE version 3.
You can read the complete GPL at: http://www.gnu.org/copyleft/gpl.html
## Author
T.v.Dein <tom AT vondein DOT org>
## Contributors / Credits
Shouts to all those guys who helped me to enhance note: THANKS A LOT!
Jens Heunemann - sub tree.
Peter Palmreuther - various additions.
And many other people who sent bug reports, feature requests. If you
feel that I forgot your name in this list, then please send me an email
and I'll add you.

View File

@@ -1 +1 @@
1.4.0
1.4.1

View File

@@ -1,7 +1,7 @@
#!/usr/bin/perl
#
# note - console notes management with database and encryption support.
# Copyright (C) 1999-2023 T.v.Dein (see README for details!)
# Copyright (C) 1999-2024 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
@@ -17,10 +17,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# - Thomas Linden <tom at linden dot at>
# - Thomas von Dein <tom at vondein dot org>
#
# latest version on:
# http://www.daemon.de/note/
# https://github.com/TLINDEN/note/
#
use lib qw(blib/lib);
@@ -123,7 +124,7 @@ my (
'autoclear' => 0,
'maxlen' => 'auto',
'defaultlong' => 0,
'dbdriver' => 'binary',
'dbdriver' => 'binary', # will be depcrecated in 1.5.0 and replaced by dumper.
'timeformat' => 'DD.MM.YYYY hh:mm:ss',
'usecolors' => 0,
'addticket' => 0,
@@ -144,7 +145,7 @@ $hardparams = "(readonly|maxlen|dbdriver|useencryption|cryptmethod)";
$CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
$USER = getlogin || getpwuid($<); chomp $USER;
$TOPIC = 1;
$VERSION = "1.4.0";
$VERSION = "1.4.1";
$CurDepth = 1; # the current depth inside the topic "directory" structure...
$maxlen = "auto";
$timelen = 22;
@@ -476,7 +477,7 @@ else {
if(scalar keys %all > 0) {
my $id = (keys %all)[0];
if($all{$id}->{date} !~ /^\d+\.\d+?/) {
print "notedb seems to be encrypted!\n";
print "Warning! Encryption is not enabled, but notedb seems to be encrypted or in a non-text binary format. Please check your db file and your config!\n";
exit(1);
}
}

View File

@@ -1,51 +1,47 @@
# note 1.3.13 -*- sh -*-
#
# This is a sample config for the note script
# There are useful defaults set in note itself.
#
# Copy it to your $HOME as .noterc
#
# note is Copyright (c) 1999-2013 Thomas Linden.
# You can contact me per email: <tom at linden dot at>
#
# Comments start with #, empty lines will be ignored.
#
# To turn on an option, set it to: 1, on or yes
# To turn off an option, set it to: 0, off or no
#
# An option consists of an atribute-value pair separated
# by minimum one space (more spaces and/or tabs are allowed)
# and an optional equal sign in between.
#
# Variable names are case in-sensitive.
#
# Refer to the manpage to learn more about the config
# note 1.4.1 -*- conf -*-
#
# This is a sample config for the note script There are useful
# defaults set in note itself.
#
# Copy it to your $HOME as .noterc
#
# Comments start with #, empty lines will be ignored.
#
# To turn on an option, set it to: 1, on or yes
# To turn off an option, set it to: 0, off or no
#
# An option consists of an atribute-value pair separated by minimum
# one space (more spaces and/or tabs are allowed) and an optional
# equal sign in between.
#
# Variable names are case in-sensitive.
#
# Refer to the manpage to learn more about the config
#
# 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", "dbm", "mysql",
# "general", "dumper", "pwsafe3" or "text".
# You must also edit/uncomment one section below for the
# backend you want to use!
#
# 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",
# "dbm", "mysql", "general", "dumper", "pwsafe3" or "text". You must
# also edit/uncomment one section below for the backend you want to
# use!
dbdriver = binary
#
# BINARY backend (the default)
#
# BINARY backend (the default)
binary::dbname = ~/.notedb # filename
binary::MaxNoteByte = 4096 # max bytes per note entry
binary::MaxTimeByte = 64 # max bytes for the date
#
# MYSQL backend
#
# MYSQL backend
mysql::dbhost = localhost # hostname
mysql::dbport = 3306 # tcp port
mysql::dbuser = you # db login
@@ -55,152 +51,146 @@ mysql::encrypt_passwd = 0 # mysql::dbpasswd is
# encrypted (note --encrypt)
#
# DBM backend
dbm::directory = ~/.notedbm # directory
#
# DBM backend
dbm::directory = ~/.notedb.dbm
#
# GENERAL backend
general::dbname = ~/.notedb # filename
#
# GENERAL backend
general::dbname = ~/.notedb.txt
#
# TEXT backend
text::dbname = ~/.notedb # filename
#
# TEXT backend
text::dbname = ~/.notedb.storable
#
# DUMPER backend
dumper::dbname = ~/.notedb # filename
#
# DUMPER backend
dumper::dbname = ~/.notedb.dumper
#
# Password Safe v3 backend
# Some notes on this one:
# This backend maintains encryption itself, which is
# mandatory as well. So you'll have to disable encryption
# (UseEncryption = NO)!
#
# The Password Safe v3 file has its own fields for
# password and username, which note doesn't have. To be
# compatible, the pwsafe3 backend parses the note text
# for those fields and stores them accordignly to the db:
#
# For username field: user|username|login|account|benutzer
# For passwd field: password|pass|passwd|kennwort|pw
#
# If it doesn't find it, it will put empty strings
# into the pwsafe3 database.
#
# The pwsafe3 database can be accessed by Password Safe
# (see: http://passwordsafe.sourceforge.net/) or other
# tools which support the format (see:
# http://passwordsafe.sourceforge.net/relatedprojects.shtml)
pwsafe3::dbname = ~/db.psafe3 # filename
#
# Password Safe v3 backend Some notes on this one: This backend
# maintains encryption itself, which is mandatory as well. So you'll
# have to disable encryption (UseEncryption = NO)!
#
# The Password Safe v3 file has its own fields for password and
# username, which note doesn't have. To be compatible, the pwsafe3
# backend parses the note text for those fields and stores them
# accordignly to the db:
#
# For username field: user|username|login|account|benutzer
# For passwd field: password|pass|passwd|kennwort|pw
#
# If it doesn't find it, it will put empty strings into the pwsafe3
# database.
#
# The pwsafe3 database can be accessed by Password Safe (see:
# http://passwordsafe.sourceforge.net/) or other tools which support
# the format (see:
# http://passwordsafe.sourceforge.net/relatedprojects.shtml)
pwsafe3::dbname = ~/.notedb.psafe3
#
# You can use encryption with note, that means notes and
# timestamps will be stored encrypted. This is supported
# by every db-backend.
#
# You can use encryption with note, that means notes and timestamps
# will be stored encrypted. This is supported by every db-backend, but
# not the pwsafe3 backend because this one has builtin encryption
# support.
UseEncryption = NO
#
# Specify the encryption protocol. The appropriate perl
# module needs to be installed. Possible velues are
# IDEA, DES or Blowfish, the default is IDEA.
#
# 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
#
# You can run note always in interactive mode by simply
# typing "note". The default is: YES.
#
# You can run note always in interactive mode by simply
# typing "note". The default is: YES.
AlwaysInteractive = 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: NO
#
# 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: NO
DefaultLong = NO
#
# You can use an external editor everytime from note instead
# of STDIN for creating new notes. The default is: YES
#
# You can use an external editor everytime from note instead of STDIN
# for creating new notes. The default is: YES
AlwaysEditor = YES
#
# By default, note looks in the environment for a variable
# $EDITOR or, if this is not the case, for $VISUAL and as
# fallback it uses 'vi'.
# You can override this by setting this variable here.
#
# By default, note looks in the environment for a variable $EDITOR or,
# if this is not the case, for $VISUAL and as fallback it uses 'vi'.
# You can override this by setting this variable here.
PreferredEditor =
#
# If you don't 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: NO
#
# If you don't 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: NO
KeepTimeStamp = NO
#
# You can specify your own topic separator here.
# The default topic separator is a normal slash: "/"
#
# You can specify your own topic separator here. The default topic
# separator is a normal slash: "/"
TopicSeparator = /
#
# 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 should determine the
# available size automatically.
#
# 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 should
# determine the available size automatically.
MaxLen = auto
#
# Turn this off if you dont want note to automatically
# clear the screen after displaying something and after
# exit. The default is: NO
#
# Turn this off if you dont want note to automatically clear the
# screen after displaying something and after exit. The default is: NO
AutoClear = NO
#
# note can use colors for output, turn this of, if
# you don't like it, or if your terminal does
# not support it. The default is: YES
#
# note can use colors for output, turn this of, if you don't like it,
# or if your terminal does not support it. The default is: YES
UseColors = NO
#
# Color-definitions of the various items. Will only
# take effect, if "UseColors" is turned on!
#
# The following colors are available:
# 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).
#
# Color-definitions of the various items. Will only take effect, if
# "UseColors" is turned on!
#
# The following colors are available: 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).
BorderColor BLACK
NumberColor blue
NoteColor green
@@ -209,90 +199,82 @@ TopicColor BLACK
#
# Additional to colors, you can also do a little bit of formatting your
# notes (bold, underlined, italic) text. The default is: YES.
#
# Additional to colors, you can also do a little bit of formatting
# your notes (bold, underlined, italic) text. The default is: YES.
FormatText = NO
#
# You might specify your own directory for temporary files.
# note needs to create some temp files during editing of notes.
# You could protect this directory using the command: chmod 700 directory.
# The default is: /tmp
#
# You might specify your own directory for temporary files. note
# needs to create some temp files during editing of notes. You could
# protect this directory using the command: chmod 700 directory. The
# default is: /tmp
TempDirectory = ~/tmp
#
# You can jump to a topic by typing "cd 13" in interactive mode.
# The deault is: NO
#
# You can jump to a topic by typing "cd 13" in interactive mode. The
# deault is: NO
ShortCd = YES
#
# note can use a cached copy of the note database for list/tree/search
# this is currently only supported by the binary and the mysql backends,
# the general and text backends have an internal cache.
# The default is: NO
#
# note can use a cached copy of the note database for list/tree/search
# this is currently only supported by the binary and the mysql
# backends, the general and text backends have an internal cache. The
# default is: NO
Cache = NO
#
# You can define your very own time format for time stamps
# YY - the last 2 digits of a year
# YYYY - year
# MM - month
# DD - day
# hh - hours
# mm - minutes
# ss - seconds
# This is the default: (18.10.2000 21:32:08)
#
# You can define your very own time format for time stamps
# YY - the last 2 digits of a year
# YYYY - year
# MM - month
# DD - day
# hh - hours
# mm - minutes
# ss - seconds
# This is the default: (18.10.2000 21:32:08)
TimeFormat = DD.MM.YYYY hh:mm:ss
#
# You can make note readonly which is useful for database copies
# The default is: NO
#
# You can make note readonly which is useful for database copies The
# default is: NO
ReadOnly = NO
#
# Note may separate titles and topics using horizontal lines when
# listing them. You can turn on this behavior by setting
# PrintLines to YES.
# The default is: NO
#
# Note may separate titles and topics using horizontal lines when
# listing them. You can turn on this behavior by setting PrintLines to
# YES. The default is: NO
PrintLines = NO
#
# Add a hash to identify notes. Such a hash will persist several
# importy/export cycles and makes each single note unique.
#
# Add a hash to identify notes. Such a hash will persist several
# importy/export cycles and makes each single note unique.
AddTicket = NO
#
# Show an entry on startup. If you want it, create such an entry
# and supply its number here
#
# Show an entry on startup. If you want it, create such an entry and
# supply its number here
motd =
#
# Enable JSON formatted backups. The option will be removed
# in version 1.5 and become the only available option.
# In earlier versions: if unset or set to NO, YAML will be used.
#
# Enable JSON formatted backups. The option will be removed in version
# 1.5 and become the only available option. In earlier versions: if
# unset or set to NO, YAML will be used.
UseJSON = YES
#
#
# That's all about it for now.
# If you still have any questiosn, please feel free to contact
# me by email: Thomas Linden <tom at linden dot at>
#
#

154
config/rc
View File

@@ -1,154 +0,0 @@
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 directory, better do not change it!
can be an environment variable or a path
Home $ENV{'HOME'}
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
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", "dbm" or "mysql".
You must also edit/uncomment one section below for the
backend you want to use!
DbDriver binary
backend specific settings for sql backend
DbHost localhost
DbUser you
DbPasswd
DbName mynotes
DbTable note
FieldNumber number
FieldNote note
FieldDate date
use an encrypted password, generate it with note "--encrypt_passwd"
encrypt_passwd 1
#### specific end ###
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!
MaxNoteByte 4096
MaxTimeByte 64
#### specific end ###
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
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
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
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
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: "/"
see README for details about topics!
TopicSeparator /
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
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 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.
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)
Additional to colors, you can also do a little bit of formatting your
notes (bold, underlined, italic), see README!
You need to set this Option to 1, if you decide to make use of this
capabily
FormatText 1
You might specify your own directory for temporary files.
note needs to create some temp files during editing of notes.
You could protect this directory using the command: chmod 700 directory.
The default is /tmp
TempDirectory /home/you/tmp
You can jump to a topic by typing "cd 13" in interactive mode.
You need to set thi soption to 1 if you want to use this feature.
ShortCd 0
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>

View File

@@ -12,14 +12,15 @@ note [options] [ number [,number...]]
=head1 DESCRIPTION
B<note> is a small console program written in perl, which allows
you to manage notes similar to programs like "knotes" but from
the command line. Note can use different database-backends for
notes-storage. It ships with a DBI-based mysql-module(which
can also be used for other by DBI supported DBMS), another
module, which uses a binary file for storage and a DBM module.
There are also two modules available which uses a text file.
Note supports since version 1.0.0 encryption(IDEA or DES)!
B<note> is a small console program written in perl, which allows you
to manage notes similar to programs like "knotes" but from the command
line. Note can use different database-backends for notes-storage. It
ships with a DBI-based mysql-module(which can also be used for other
by DBI supported DBMS), another module, which uses a binary file for
storage and a DBM module. There are also two modules available which
uses a text file. Note supports since version 1.0.0 encryption(IDEA
or DES)! And last but not least the PWSafe3 format is also supported
by the pwsafe3 backend, which is encrypted by default.
=head1 OPTIONS