mirror of
https://codeberg.org/scip/note.git
synced 2025-12-19 13:41:02 +01:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dc71d1885 | ||
| 4f06a9f8f5 | |||
| bb5779a664 | |||
| dbaf515259 | |||
| 891f830cba | |||
| 37e73950da | |||
| 1b842625ed | |||
| c03d521b2c | |||
| 53c16708fe | |||
|
|
4505ec70a4 | ||
|
|
c5cdc42445 | ||
|
|
ec2a36b4ad |
258
Changelog
258
Changelog
@@ -1,94 +1,188 @@
|
|||||||
================================================================================
|
-*-text-*-
|
||||||
1.3.26: fixed installer, on newer perls NOTEDB/* is being ignored
|
1.4.1:
|
||||||
================================================================================
|
Fixed https://rt.cpan.org/Ticket/Display.html?id=155578:
|
||||||
1.3.25: fixed indents
|
|
||||||
================================================================================
|
Feeding a new entry into note from STDIN didn't work correctly
|
||||||
1.3.24: removed bashism in mysql installer.
|
anymore. Using the default builtin config and no config file it didn't
|
||||||
================================================================================
|
work at all. Now it works as one would expect. A bare - as argument
|
||||||
1.3.23: defect distritbution. do not use.
|
ALWAYS reads a new entry from STDIN. The same happens if one uses -n
|
||||||
================================================================================
|
-. In addition note now prints a message if it attempts to read from
|
||||||
1.3.22: fixed bug in mysql backend.
|
STDIN to avoid confusion.
|
||||||
|
|
||||||
|
The parameter -n has been added to be able to force note to create a
|
||||||
|
new entry directly from commandline, regardless of any configuration.
|
||||||
|
|
||||||
|
Fixed regex to check if a note has been specified as argument. Now it
|
||||||
|
does not match a bare - anymore.
|
||||||
|
|
||||||
|
Reorganized a little code.
|
||||||
|
|
||||||
|
|
||||||
|
1.4.1:
|
||||||
|
Fixed https://codeberg.org/scip/note/issues/11:
|
||||||
|
|
||||||
|
Every backend now uses a different default file extension and the
|
||||||
|
default config file has it configured the same way.
|
||||||
|
|
||||||
|
The error message about an encrypted file when expecting an
|
||||||
|
unencrypted one has been adjusted to be more understandable by new
|
||||||
|
users.
|
||||||
|
|
||||||
|
Documentation updates.
|
||||||
|
|
||||||
|
Deprecation Warning: binary and text backend support will be removed
|
||||||
|
in the upcoming version 1.5.0.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1.4.0:
|
||||||
|
Added support for JSON encoded export files instead of YAML.
|
||||||
|
Currently this is just an option, which can be set in the config
|
||||||
|
with UseJSON or commandline -j. The old export format is now
|
||||||
|
being considered deprecated (a warning will be shown) and will
|
||||||
|
be removed in 1.5. Fixes https://codeberg.org/scip/note/issues/10.
|
||||||
|
|
||||||
|
A helper script has been added to help to combine two notedb's
|
||||||
|
into one: contrib/sync-combine-two-yaml-exports-into-one.pl. It is
|
||||||
|
still using YAML mode, JSON support will be added in the future.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1.3.26:
|
||||||
|
fixed installer, on newer perls NOTEDB/* is being ignored
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1.3.25:
|
||||||
|
fixed indents
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1.3.24:
|
||||||
|
removed bashism in mysql installer.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1.3.23:
|
||||||
|
defect distritbution. do not use.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1.3.22:
|
||||||
|
fixed bug in mysql backend.
|
||||||
added retry feature for NOTEDB::pwsafe3 backend save() password
|
added retry feature for NOTEDB::pwsafe3 backend save() password
|
||||||
entering. bails out after 5 retries.
|
entering. bails out after 5 retries.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.21:
|
1.3.21:
|
||||||
Changed note id generation in NOTEDB::pwsafe3::_uuid(), again.
|
Changed note id generation in NOTEDB::pwsafe3::_uuid(), again.
|
||||||
Instead of crc checksums and the loop to avoid duplicates, I just
|
Instead of crc checksums and the loop to avoid duplicates, I just
|
||||||
use a counter and sort the entries by ctime, so that older entries
|
use a counter and sort the entries by ctime, so that older entries
|
||||||
keep their note id. Also this should fix a rare bug, where the
|
keep their note id. Also this should fix a rare bug, where the
|
||||||
code hangs because of said loop.
|
code hangs because of said loop.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.20:
|
1.3.20:
|
||||||
fixed bug in NOTEDB::pwsafe3::_retrieve(), it iterated over the
|
fixed bug in NOTEDB::pwsafe3::_retrieve(), it iterated over the
|
||||||
records unsorted which resulted in different note ids each time
|
records unsorted which resulted in different note ids each time
|
||||||
the program runs.
|
the program runs.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.19:
|
1.3.19:
|
||||||
revert fix in NOTEDB::pwsafe3::filechanged(), use > again.
|
revert fix in NOTEDB::pwsafe3::filechanged(), use > again.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.18:
|
1.3.18:
|
||||||
fixed unit tests and added more (lots of them)
|
fixed unit tests and added more (lots of them)
|
||||||
|
|
||||||
fixed several bugs in backend modules, which I found during
|
fixed several bugs in backend modules, which I found during
|
||||||
writing of the unit tests.
|
writing of the unit tests.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.17:
|
1.3.17:
|
||||||
applied patch by Bill Carlson, which fixes string length issues
|
applied patch by Bill Carlson, which fixes string length issues
|
||||||
in non-interactive search mode.
|
in non-interactive search mode.
|
||||||
|
|
||||||
fixed usage text (-h) so that it now contains the available
|
fixed usage text (-h) so that it now contains the available
|
||||||
options.
|
options.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.16:
|
1.3.16:
|
||||||
fixed checking of encrypted notes when encryption is turned off.
|
fixed checking of encrypted notes when encryption is turned off.
|
||||||
instead of checking note id 1, we now check the first entry,
|
instead of checking note id 1, we now check the first entry,
|
||||||
whatever id it may have.
|
whatever id it may have.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.15:
|
1.3.15:
|
||||||
fixed bug in NOTEDB::pwsafe3 backend, it converted the date
|
fixed bug in NOTEDB::pwsafe3 backend, it converted the date
|
||||||
of a note entry into the wrong formatted timestamp.
|
of a note entry into the wrong formatted timestamp.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.14:
|
1.3.14:
|
||||||
fixed bug in NOTEDB::pwsafe3 backend, it used lockging on the
|
fixed bug in NOTEDB::pwsafe3 backend, it used lockging on the
|
||||||
database file for reading, which is wrong.
|
database file for reading, which is wrong.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.13:
|
1.3.13:
|
||||||
ADDED: new config parameter 'motd', a note entry which will be shown
|
ADDED: new config parameter 'motd', a note entry which will be shown
|
||||||
on startup (if exists).
|
on startup (if exists).
|
||||||
CHANGED: the prompt will now show if the current instance is running
|
CHANGED: the prompt will now show if the current instance is running
|
||||||
in readonly mode.
|
in readonly mode.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.12:
|
1.3.12:
|
||||||
FIXED: NOTEDB::general data backend module did overwrite records if
|
FIXED: NOTEDB::general data backend module did overwrite records if
|
||||||
there were some deleted ones in the database.
|
there were some deleted ones in the database.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.11:
|
1.3.11:
|
||||||
FIXED: NOTEDB::pwsafe3 contained the old python stuff in delete code.
|
FIXED: NOTEDB::pwsafe3 contained the old python stuff in delete code.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.10:
|
1.3.10:
|
||||||
FIXED: the YAML export/import change were missing too. grml...
|
FIXED: the YAML export/import change were missing too. grml...
|
||||||
FIXED: NOTEDB::general backend fixed loading Config::General
|
FIXED: NOTEDB::general backend fixed loading Config::General
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.9:
|
1.3.9:
|
||||||
FIXED: bin/note were missing. for whatever reason, I don't know.
|
FIXED: bin/note were missing. for whatever reason, I don't know.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.8:
|
1.3.8:
|
||||||
ADDED: New backend added: NOTEDB::pwsafe3, which adds support to store
|
ADDED: New backend added: NOTEDB::pwsafe3, which adds support to store
|
||||||
notes in a Password Safe v3 database.
|
notes in a Password Safe v3 database.
|
||||||
FIXED: -d didn't work, because of a typo in mode assignment.
|
FIXED: -d didn't work, because of a typo in mode assignment.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.7:
|
1.3.7:
|
||||||
ADDED: added ticket feature, which adds a unique id to each
|
ADDED: added ticket feature, which adds a unique id to each
|
||||||
new note, which persists during imports/exports. the
|
new note, which persists during imports/exports. the
|
||||||
id is a randomly generated string.
|
id is a randomly generated string.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.6:
|
1.3.6:
|
||||||
ADDED: Added test cases for "make test"
|
ADDED: Added test cases for "make test"
|
||||||
ADDED: Added test for optional and required perl modules in
|
ADDED: Added test for optional and required perl modules in
|
||||||
Makefile.PL
|
Makefile.PL
|
||||||
FIXED: NOTEDB::dumper version string were wrong, therefore
|
FIXED: NOTEDB::dumper version string were wrong, therefore
|
||||||
cpan didn't index is properly.
|
cpan didn't index is properly.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.5:
|
1.3.5:
|
||||||
FIXED: Applied patch by Elmar Loos which fixes misbehavior for
|
FIXED: Applied patch by Elmar Loos which fixes misbehavior for
|
||||||
-t and -T (identical output)
|
-t and -T (identical output)
|
||||||
@@ -108,24 +202,31 @@ CHANGED: default config and default settings without config have
|
|||||||
ADDED: New interactive mode command: "c". It is now possible to
|
ADDED: New interactive mode command: "c". It is now possible to
|
||||||
change note's behavior at runtime. No database related
|
change note's behavior at runtime. No database related
|
||||||
parameters can be modified.
|
parameters can be modified.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.4:
|
1.3.4:
|
||||||
ADDED: Each note now contains a "ticket number" which identifies
|
ADDED: Each note now contains a "ticket number" which identifies
|
||||||
it against other notes. Those tickets are not changing when
|
it against other notes. Those tickets are not changing when
|
||||||
notes will be reorganized.
|
notes will be reorganized.
|
||||||
|
|
||||||
ADDED: added support for less to view note entries instead of
|
ADDED: added support for less to view note entries instead of
|
||||||
just printing it to STDOUT. (interactive mode).
|
just printing it to STDOUT. (interactive mode).
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.3:
|
1.3.3:
|
||||||
ADDED: new configfile parameter PrintLines (default: YES), which
|
ADDED: new configfile parameter PrintLines (default: YES), which
|
||||||
controls wether listings are separated by horizontal lines.
|
controls wether listings are separated by horizontal lines.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.2:
|
1.3.2:
|
||||||
FIXED: NOTEDB::mysql backend parameter fixed (dbtype)
|
FIXED: NOTEDB::mysql backend parameter fixed (dbtype)
|
||||||
FIXED: NOTEDB::mysql didn't fetch topics correctly
|
FIXED: NOTEDB::mysql didn't fetch topics correctly
|
||||||
FIXED: NOTEDB::text didn't correctly return last highest note id
|
FIXED: NOTEDB::text didn't correctly return last highest note id
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.1:
|
1.3.1:
|
||||||
FIXED: most config variables not related to drivers had
|
FIXED: most config variables not related to drivers had
|
||||||
invalid sentence in note, so the new ones of the new config
|
invalid sentence in note, so the new ones of the new config
|
||||||
@@ -136,7 +237,9 @@ FIXED: fixed handling of NOTEDB::crypt_supported, now encryption
|
|||||||
ADDED: NOTEDB::text now supports internal caching too.
|
ADDED: NOTEDB::text now supports internal caching too.
|
||||||
CHANGED: lock() sets the umask internally to 022, so that other
|
CHANGED: lock() sets the umask internally to 022, so that other
|
||||||
users are able to read the lockfile.
|
users are able to read the lockfile.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.3.0:
|
1.3.0:
|
||||||
ADDED: new config option: ReadOnly
|
ADDED: new config option: ReadOnly
|
||||||
ADDED: new database backend: NOTEDB::text, which uses the Storable
|
ADDED: new database backend: NOTEDB::text, which uses the Storable
|
||||||
@@ -156,35 +259,35 @@ CHANGED: the configuration variables are now stored in a hash, this
|
|||||||
CHANGED: the libpath variable has been removed, it didnt't work either.
|
CHANGED: the libpath variable has been removed, it didnt't work either.
|
||||||
use now .. instead, so that a local installation for a non
|
use now .. instead, so that a local installation for a non
|
||||||
root user is still possible.
|
root user is still possible.
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1.2.6:
|
1.2.6:
|
||||||
FIXED: the binary driver (NOTEDB::binary) encounters now if a note
|
FIXED: the binary driver (NOTEDB::binary) encounters now if a note
|
||||||
entry is bigger then MaxNoteByte. It prints the overlapping
|
entry is bigger then MaxNoteByte. It prints the overlapping
|
||||||
part to STDERR, and a warning message and finally saves
|
part to STDERR, and a warning message and finally saves
|
||||||
the complete, unchanged note entry to an external text file.
|
the complete, unchanged note entry to an external text file.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.2.5:
|
1.2.5:
|
||||||
FIXED: removed any file/path actions using '/'. replaced by portable
|
FIXED: removed any file/path actions using '/'. replaced by portable
|
||||||
functions by using File::Spec. This makes it possible to run
|
functions by using File::Spec. This makes it possible to run
|
||||||
note unchanged on win32 (and possibly any other) environments.
|
note unchanged on win32 (and possibly any other) environments.
|
||||||
|
|
||||||
FIXED: added a whitespace to the prompt in interactive mode to
|
FIXED: added a whitespace to the prompt in interactive mode to
|
||||||
circumvent a bug in the win32 Term::ReadLine module which causes
|
circumvent a bug in the win32 Term::ReadLine module which causes
|
||||||
the cursor to be displayed on the left side (column 0) of
|
the cursor to be displayed on the left side (column 0) of
|
||||||
the screen.
|
the screen.
|
||||||
|
|
||||||
FIXED: added "or die" code to some commands which are running inside
|
FIXED: added "or die" code to some commands which are running inside
|
||||||
an eval{} block to fetch errors. Without the "or die"s no
|
an eval{} block to fetch errors. Without the "or die"s no
|
||||||
error could ever catched.
|
error could ever catched.
|
||||||
|
|
||||||
CHANGED: removed HOME variable support of the noterc. in fact, if it
|
CHANGED: removed HOME variable support of the noterc. in fact, if it
|
||||||
exists, no error will occur, but it will no longer be used.
|
exists, no error will occur, but it will no longer be used.
|
||||||
It didn't work in older versions anyway.
|
It didn't work in older versions anyway.
|
||||||
|
|
||||||
ADDED: It is now possible to quit note using CTRL-D (or: EOF)
|
ADDED: It is now possible to quit note using CTRL-D (or: EOF)
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.2.4:
|
1.2.4:
|
||||||
CHANGED: in the function find_editor() the alternatives vim and pico
|
CHANGED: in the function find_editor() the alternatives vim and pico
|
||||||
has been removed because they would never had a match.
|
has been removed because they would never had a match.
|
||||||
@@ -197,7 +300,8 @@ ADDED: if the config variable FormatText is set to 'simple' then
|
|||||||
be displayed formatted, instead of two.
|
be displayed formatted, instead of two.
|
||||||
ADDED: added Term::ReadLine support (auto-completion and history).
|
ADDED: added Term::ReadLine support (auto-completion and history).
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.2.3:
|
1.2.3:
|
||||||
ADDED: if FormatText is enabled one can now use a new special format
|
ADDED: if FormatText is enabled one can now use a new special format
|
||||||
tag: //. If a text is surrounded by two slashes, i.e.: //blah//
|
tag: //. If a text is surrounded by two slashes, i.e.: //blah//
|
||||||
@@ -206,7 +310,8 @@ ADDED: if FormatText is enabled one can now use a new special format
|
|||||||
since no nobody can grab you password by looking at your
|
since no nobody can grab you password by looking at your
|
||||||
monitor, but you can copy&paste it.
|
monitor, but you can copy&paste it.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.2.2:
|
1.2.2:
|
||||||
FIXED: oneliner note entries caused breaked displaying in interactive
|
FIXED: oneliner note entries caused breaked displaying in interactive
|
||||||
mode.
|
mode.
|
||||||
@@ -221,7 +326,8 @@ ADDED: new config variable AutoClear, which is turned on by default,
|
|||||||
which controls wether the screen shall be cleared after each
|
which controls wether the screen shall be cleared after each
|
||||||
item (display, list and so on).
|
item (display, list and so on).
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.2.1:
|
1.2.1:
|
||||||
CHANGED: added the correct installation instructions to the README file.
|
CHANGED: added the correct installation instructions to the README file.
|
||||||
REMOVED: removed the usage guidelines from te README file. This information
|
REMOVED: removed the usage guidelines from te README file. This information
|
||||||
@@ -234,7 +340,8 @@ ADDED: topics can now be abbreviated in interactive mode, which
|
|||||||
match could be found, otherwise the available topics that
|
match could be found, otherwise the available topics that
|
||||||
matches will be suggested.
|
matches will be suggested.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.2.0:
|
1.2.0:
|
||||||
CHANGED: using Makemaker instead of self-written code in Makefile.PL
|
CHANGED: using Makemaker instead of self-written code in Makefile.PL
|
||||||
for installation. No more dependency checks built-in because
|
for installation. No more dependency checks built-in because
|
||||||
@@ -264,14 +371,14 @@ CHANGED: cosmetics.
|
|||||||
NOTE: increased minor version number from 1 to 2 to indicate that
|
NOTE: increased minor version number from 1 to 2 to indicate that
|
||||||
development begun after 2 1/2 years pause again :-)
|
development begun after 2 1/2 years pause again :-)
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.1.2:
|
1.1.2:
|
||||||
FIXED: Empty notes will no longer stored.
|
FIXED: Empty notes will no longer stored.
|
||||||
ADDED: A new config option which allows you to specify a time format
|
ADDED: A new config option which allows you to specify a time format
|
||||||
other than the default one which is used by note.
|
other than the default one which is used by note.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.1.1:
|
1.1.1:
|
||||||
FIXED: Some odd typos in README and note.pod.
|
FIXED: Some odd typos in README and note.pod.
|
||||||
@@ -285,7 +392,7 @@ CHANGED: the default colors are now visible both on black and white
|
|||||||
ADDED: two more color values: <white_black> and <bold>.
|
ADDED: two more color values: <white_black> and <bold>.
|
||||||
CHANGED: the color hash is now in ::main instead of ::C.
|
CHANGED: the color hash is now in ::main instead of ::C.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.1.0:
|
1.1.0:
|
||||||
CHANGED: does no more use the external touch command to create a new
|
CHANGED: does no more use the external touch command to create a new
|
||||||
@@ -320,11 +427,11 @@ CHANGED: oop-ized and re-indented the modules dbm.pm, mysql.pm and
|
|||||||
binary.pm.
|
binary.pm.
|
||||||
ADDED: You can now specify a port for the mysql backend ("DbPort").
|
ADDED: You can now specify a port for the mysql backend ("DbPort").
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.9: jumped directly to 1.1.0, too many additions.
|
1.0.9: jumped directly to 1.1.0, too many additions.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.8:
|
1.0.8:
|
||||||
FIXED: typo in noterc shipped with package may caused confusion
|
FIXED: typo in noterc shipped with package may caused confusion
|
||||||
@@ -337,14 +444,14 @@ CHANGED: changed the way note manages temporary filez. It uses now a
|
|||||||
ADDED: A new config option allows the user to specify her own
|
ADDED: A new config option allows the user to specify her own
|
||||||
temp-directory. The default is still /tmp.
|
temp-directory. The default is still /tmp.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.7:
|
1.0.7:
|
||||||
FIXED: there was a bug in the search expression, use now \Q and \E.
|
FIXED: there was a bug in the search expression, use now \Q and \E.
|
||||||
ADDED: --config <file> allows one to use another config than the
|
ADDED: --config <file> allows one to use another config than the
|
||||||
default.
|
default.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.6:
|
1.0.6:
|
||||||
FIXED: there were some odd bugs in commandline parsing, some options
|
FIXED: there were some odd bugs in commandline parsing, some options
|
||||||
@@ -357,14 +464,14 @@ CHANGED: Optimized a little bit the output routine, now it is better to
|
|||||||
ADDED: sub format and appropriate config-option for text formatting
|
ADDED: sub format and appropriate config-option for text formatting
|
||||||
capabilities.
|
capabilities.
|
||||||
CHANGED: changed getconfig regexp, which allows now also to use
|
CHANGED: changed getconfig regexp, which allows now also to use
|
||||||
Option = Param.
|
Option Param.
|
||||||
FIXED: was not possible to override config-options, which are set by
|
FIXED: was not possible to override config-options, which are set by
|
||||||
default to something.
|
default to something.
|
||||||
ADDED: note checks now, if a database os actually really encrypted and
|
ADDED: note checks now, if a database os actually really encrypted and
|
||||||
exits with an error if it s and the user turned off encryption.
|
exits with an error if it s and the user turned off encryption.
|
||||||
This protects her from destroying it's own database ..
|
This protects her from destroying it's own database ..
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.5:
|
1.0.5:
|
||||||
FIXED: the T (and t respectively) printed nothing out since 1.0.3!
|
FIXED: the T (and t respectively) printed nothing out since 1.0.3!
|
||||||
@@ -385,7 +492,6 @@ FIXED: Removed Getopt::Long option "bundling", causes errors with perl
|
|||||||
FIXED: Added the Getopt::Long option "no_ignore_case". In 1.0.4 options
|
FIXED: Added the Getopt::Long option "no_ignore_case". In 1.0.4 options
|
||||||
were case insensitive causing -i to be interpreted as --import
|
were case insensitive causing -i to be interpreted as --import
|
||||||
instead of --interactive ;-(((
|
instead of --interactive ;-(((
|
||||||
|
|
||||||
Thanks to Peter Palmreuter for the following fixed/additions:
|
Thanks to Peter Palmreuter for the following fixed/additions:
|
||||||
ADDED: a new config option $DEFAULT_LIST, which causes note,
|
ADDED: a new config option $DEFAULT_LIST, which causes note,
|
||||||
if turned to "LONG", to use long-listing as default.
|
if turned to "LONG", to use long-listing as default.
|
||||||
@@ -397,14 +503,14 @@ FIXED: sub search prints now an appropriate error-message in
|
|||||||
CHANGED: Changed the text in the interactive help to reflect
|
CHANGED: Changed the text in the interactive help to reflect
|
||||||
changes of verion 1.0.3 (t and T).
|
changes of verion 1.0.3 (t and T).
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.4:
|
1.0.4:
|
||||||
CHANGED: Moved from @ARGV-parsing to Getopt::Long, adding options is now
|
CHANGED: Moved from @ARGV-parsing to Getopt::Long, adding options is now
|
||||||
much easier and I do now understand my own code ;-)
|
much easier and I do now understand my own code ;-)
|
||||||
ADDED: --raw, the "Raw Mode", which turns off any formatting of output.
|
ADDED: --raw, the "Raw Mode", which turns off any formatting of output.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.3:
|
1.0.3:
|
||||||
ADDED: "-" works also for --dump, but in the other direction. It causes
|
ADDED: "-" works also for --dump, but in the other direction. It causes
|
||||||
@@ -424,7 +530,7 @@ ADDED: -o commandline switch, which causes note to overwrite an
|
|||||||
ADDED: the long-tree-view (-T) displays now also the note-number of
|
ADDED: the long-tree-view (-T) displays now also the note-number of
|
||||||
each note.
|
each note.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.2:
|
1.0.2:
|
||||||
ADDED: Topic-Tree overview command (-t or -T).
|
ADDED: Topic-Tree overview command (-t or -T).
|
||||||
@@ -433,20 +539,20 @@ ADDED: Enhanced list command in interactive mode, you can now specify
|
|||||||
CHANGED: updated the help and usage sections to reflect the additions
|
CHANGED: updated the help and usage sections to reflect the additions
|
||||||
above.
|
above.
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.1:
|
1.0.1:
|
||||||
FIXED: fixed bug in NOTEDB::mysql, which caused note to store NULL
|
FIXED: fixed bug in NOTEDB::mysql, which caused note to store NULL
|
||||||
values in db, if encryption was off. A really dump failure :-(
|
values in db, if encryption was off. A really dump failure :-(
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
1.0.0:
|
1.0.0:
|
||||||
CHANGED: removed install.sh. use now a Makefile for installation.
|
CHANGED: removed install.sh. use now a Makefile for installation.
|
||||||
ADDED: Encryption support. Note can now encrypt notes using IDEA
|
ADDED: Encryption support. Note can now encrypt notes using IDEA
|
||||||
or DES as encryption-protocols(symetric).
|
or DES as encryption-protocols(symetric).
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
0.9:
|
0.9:
|
||||||
FIXED: There were many new bugs after my last changes *grrrrr*. fixed.
|
FIXED: There were many new bugs after my last changes *grrrrr*. fixed.
|
||||||
@@ -467,7 +573,6 @@ FIXED: there was a bug in NOTEDB::binary which caused not to recount
|
|||||||
note numbers after deleting one :-(
|
note numbers after deleting one :-(
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
0.8:
|
0.8:
|
||||||
ADDED: NOTEDB::binary. so now 0.8 is ready for shipping !
|
ADDED: NOTEDB::binary. so now 0.8 is ready for shipping !
|
||||||
@@ -492,7 +597,6 @@ FIXED: width of listings is now always the same independent of the
|
|||||||
stringlength of a certain note.
|
stringlength of a certain note.
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
0.7:
|
0.7:
|
||||||
ADDED: one can now use the unix-like "cd" command to change to another
|
ADDED: one can now use the unix-like "cd" command to change to another
|
||||||
@@ -506,9 +610,6 @@ ADDED: a new config option "$KEEP_TIMESTAMP" allows a user to disable
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
0.6:
|
0.6:
|
||||||
FIXED: oops - the new suptopic feature confused the commandline-mode of
|
FIXED: oops - the new suptopic feature confused the commandline-mode of
|
||||||
note! quickly corrected! so subtopics also available from
|
note! quickly corrected! so subtopics also available from
|
||||||
@@ -539,10 +640,6 @@ FIXED: A bug at line 769 causing single note where smaller than note-
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0.5:
|
0.5:
|
||||||
ADDED: Topic support(requested). You can sort the various notes under
|
ADDED: Topic support(requested). You can sort the various notes under
|
||||||
different topics now.
|
different topics now.
|
||||||
@@ -551,10 +648,6 @@ FIXED: There was another bug, which caused the list command to display
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0.4.2:
|
0.4.2:
|
||||||
ADDED: If run in interactive mode, note will at first do a list
|
ADDED: If run in interactive mode, note will at first do a list
|
||||||
command.
|
command.
|
||||||
@@ -566,10 +659,6 @@ FIXED: Some more vars will be resetted during each loop in interactive
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0.4.1:
|
0.4.1:
|
||||||
ADDED: The install.sh script for the mysql version is no able to
|
ADDED: The install.sh script for the mysql version is no able to
|
||||||
install the required Mysql module directly from CPAN, thanks
|
install the required Mysql module directly from CPAN, thanks
|
||||||
@@ -589,10 +678,6 @@ FIXED: the function num_bereich() had a bug, which caused ot to ignore under
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0.4:
|
0.4:
|
||||||
CHANGED: ok, mysql support is back again (upon requests). therefore there
|
CHANGED: ok, mysql support is back again (upon requests). therefore there
|
||||||
are two different version of the script in the same time with
|
are two different version of the script in the same time with
|
||||||
@@ -609,10 +694,6 @@ ADDED: sub num_bereich(), which allows one to specify more then one
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0.3:
|
0.3:
|
||||||
CHANGED: it uses no more a mysql database, but a binary file instead.
|
CHANGED: it uses no more a mysql database, but a binary file instead.
|
||||||
This is much faster!
|
This is much faster!
|
||||||
@@ -620,8 +701,6 @@ ADDED: note can display the notes with colors, it is turned off by
|
|||||||
default
|
default
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
0.2:
|
0.2:
|
||||||
FIXED: now any occurence of ' will be masked with \' before storage
|
FIXED: now any occurence of ' will be masked with \' before storage
|
||||||
@@ -631,7 +710,6 @@ FIXED: now numbers of notes will be recounted, if one delete one note,
|
|||||||
CHANGED: the look of the list output has been changed, similar to a table
|
CHANGED: the look of the list output has been changed, similar to a table
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
0.1:
|
0.1:
|
||||||
INITIAL RELEASE.
|
INITIAL RELEASE.
|
||||||
|
|||||||
217
README
217
README
@@ -1,217 +0,0 @@
|
|||||||
note 1.3.20 by T.v.Dein (09/02/2015)
|
|
||||||
=======================================
|
|
||||||
|
|
||||||
Introduction
|
|
||||||
============
|
|
||||||
|
|
||||||
This is a small console program written in
|
|
||||||
perl, which allows you to manage notes similar
|
|
||||||
to programs like "knotes" from commandline.
|
|
||||||
|
|
||||||
There are currently three different database 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 can apt-get it. 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 Commandline 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 confiurable 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 algorythms 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 distributuion 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 ditribution)
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
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 commandline, 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 neccessarily 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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Recources
|
|
||||||
=========
|
|
||||||
|
|
||||||
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
|
|
||||||
============
|
|
||||||
|
|
||||||
09/02/2015
|
|
||||||
213
README.md
Normal file
213
README.md
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
# note - a perl script for maintaining notes.
|
||||||
|
|
||||||
|
This is the perl script 'note' in version 1.4.2 from 24/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://codeberg.org/scip/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://codeberg.org/scip/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.
|
||||||
|
|
||||||
|
|
||||||
120
bin/note
120
bin/note
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
#
|
||||||
# note - console notes management with database and encryption support.
|
# note - console notes management with database and encryption support.
|
||||||
# Copyright (C) 1999-2017 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
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# 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
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# 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:
|
# latest version on:
|
||||||
# http://www.daemon.de/note/
|
# http://www.daemon.de/note/
|
||||||
|
# https://codeberg.org/scip/note/
|
||||||
#
|
#
|
||||||
|
|
||||||
use lib qw(blib/lib);
|
use lib qw(blib/lib);
|
||||||
@@ -38,6 +39,7 @@ use Getopt::Long;
|
|||||||
use FileHandle;
|
use FileHandle;
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
use YAML;
|
use YAML;
|
||||||
|
use JSON::PP;
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -71,11 +73,12 @@ my (
|
|||||||
$opt_, $opt_i, $opt_r, $opt_e, $opt_d, $opt_enc,
|
$opt_, $opt_i, $opt_r, $opt_e, $opt_d, $opt_enc,
|
||||||
$opt_s, $opt_t, $opt_T, $opt_l, $opt_L, $opt_c,
|
$opt_s, $opt_t, $opt_T, $opt_l, $opt_L, $opt_c,
|
||||||
$opt_D, $opt_I, $opt_o, $opt_h, $opt_n, $opt_v,
|
$opt_D, $opt_I, $opt_o, $opt_h, $opt_n, $opt_v,
|
||||||
|
$opt_j, $opt_new,
|
||||||
|
|
||||||
#
|
#
|
||||||
# set from commandline (or interactive)
|
# set from commandline (or interactive)
|
||||||
#
|
#
|
||||||
$number, $searchstring, $dump_file, $ImportType, $NewType, $Raw, $TOPIC,
|
$number, $searchstring, $dump_file, $ImportType, $StdinMode, $Raw, $TOPIC,
|
||||||
|
|
||||||
#
|
#
|
||||||
# configuration options
|
# configuration options
|
||||||
@@ -121,7 +124,7 @@ my (
|
|||||||
'autoclear' => 0,
|
'autoclear' => 0,
|
||||||
'maxlen' => 'auto',
|
'maxlen' => 'auto',
|
||||||
'defaultlong' => 0,
|
'defaultlong' => 0,
|
||||||
'dbdriver' => 'binary',
|
'dbdriver' => 'binary', # will be depcrecated in 1.5.0 and replaced by dumper.
|
||||||
'timeformat' => 'DD.MM.YYYY hh:mm:ss',
|
'timeformat' => 'DD.MM.YYYY hh:mm:ss',
|
||||||
'usecolors' => 0,
|
'usecolors' => 0,
|
||||||
'addticket' => 0,
|
'addticket' => 0,
|
||||||
@@ -133,7 +136,8 @@ my (
|
|||||||
'printlines' => 0,
|
'printlines' => 0,
|
||||||
'cache' => 0,
|
'cache' => 0,
|
||||||
'preferrededitor' => '',
|
'preferrededitor' => '',
|
||||||
'motd' => ''
|
'motd' => '',
|
||||||
|
'usejson' => 0, # will be the default in the future
|
||||||
);
|
);
|
||||||
|
|
||||||
# these are not customizable at runtime!
|
# these are not customizable at runtime!
|
||||||
@@ -141,7 +145,7 @@ $hardparams = "(readonly|maxlen|dbdriver|useencryption|cryptmethod)";
|
|||||||
$CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
|
$CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
|
||||||
$USER = getlogin || getpwuid($<); chomp $USER;
|
$USER = getlogin || getpwuid($<); chomp $USER;
|
||||||
$TOPIC = 1;
|
$TOPIC = 1;
|
||||||
$VERSION = "1.3.26";
|
$VERSION = "1.4.2";
|
||||||
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
||||||
$maxlen = "auto";
|
$maxlen = "auto";
|
||||||
$timelen = 22;
|
$timelen = 22;
|
||||||
@@ -196,7 +200,7 @@ if ($ARGV[0] eq "") {
|
|||||||
}
|
}
|
||||||
elsif ($#ARGV == 0 && $ARGV[0] eq "-") {
|
elsif ($#ARGV == 0 && $ARGV[0] eq "-") {
|
||||||
$mode = "new";
|
$mode = "new";
|
||||||
$NewType = 1; # read from STDIN until EOF
|
$StdinMode = 1; # read from STDIN until EOF
|
||||||
shift;
|
shift;
|
||||||
undef $has_nothing;
|
undef $has_nothing;
|
||||||
}
|
}
|
||||||
@@ -206,6 +210,7 @@ else {
|
|||||||
"interactive|i!" => \$opt_i, # no arg
|
"interactive|i!" => \$opt_i, # no arg
|
||||||
"config|c=s" => \$opt_c, # string, required
|
"config|c=s" => \$opt_c, # string, required
|
||||||
"raw|r!" => \$opt_r, # no arg
|
"raw|r!" => \$opt_r, # no arg
|
||||||
|
"new|n:s" => \$opt_new, # no arg or optional string
|
||||||
"edit|e=i" => \$opt_e, # integer, required
|
"edit|e=i" => \$opt_e, # integer, required
|
||||||
"delete|d=s" => \$opt_d, # integer, required
|
"delete|d=s" => \$opt_d, # integer, required
|
||||||
"search|s=s" => \$opt_s, # string, required
|
"search|s=s" => \$opt_s, # string, required
|
||||||
@@ -214,21 +219,29 @@ else {
|
|||||||
"list|l:s" => \$opt_l, # string, optional
|
"list|l:s" => \$opt_l, # string, optional
|
||||||
"longlist|L:s" => \$opt_L, # string, optional
|
"longlist|L:s" => \$opt_L, # string, optional
|
||||||
"dump|Dump|D:s" => \$opt_D, # string, optional
|
"dump|Dump|D:s" => \$opt_D, # string, optional
|
||||||
|
"json|j" => \$opt_j, # bool, optional
|
||||||
"import|Import|I:s" => \$opt_I, # string, optional
|
"import|Import|I:s" => \$opt_I, # string, optional
|
||||||
"overwrite|o!" => \$opt_o, # no arg
|
"overwrite|o!" => \$opt_o, # no arg
|
||||||
"help|h|?!" => \$opt_h, # no arg
|
"help|h|?!" => \$opt_h, # no arg
|
||||||
"version|v!" => \$opt_v, # no arg
|
"version|v!" => \$opt_v, # no arg
|
||||||
"encrypt=s" => \$opt_enc, # string, required
|
"encrypt=s" => \$opt_enc, # string, required
|
||||||
);
|
);
|
||||||
$opt_n = shift; # after that @ARGV contains eventually
|
|
||||||
# a note-number
|
# after that @ARGV contains eventually a note-number or a single dash
|
||||||
# $opt_ is a single dash, in case of existence!
|
$opt_n = shift;
|
||||||
|
|
||||||
#
|
#
|
||||||
# determine mode
|
# determine mode
|
||||||
#
|
#
|
||||||
if ($opt_i) {
|
if ($opt_i) {
|
||||||
$mode = "interactive";
|
$mode = "interactive";
|
||||||
}
|
}
|
||||||
|
elsif (defined $opt_new) {
|
||||||
|
$mode = "new";
|
||||||
|
if ($opt_new eq "-") {
|
||||||
|
$StdinMode = 1; # read from STDIN
|
||||||
|
}
|
||||||
|
}
|
||||||
elsif (defined $opt_l || defined $opt_L) {
|
elsif (defined $opt_l || defined $opt_L) {
|
||||||
$mode = "list";
|
$mode = "list";
|
||||||
if (defined $opt_l) {
|
if (defined $opt_l) {
|
||||||
@@ -276,6 +289,10 @@ else {
|
|||||||
else {
|
else {
|
||||||
$dump_file = "-"; # use STDIN
|
$dump_file = "-"; # use STDIN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined $opt_j) {
|
||||||
|
$conf{usejson} = 1; # force JSON
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elsif (defined $opt_I) {
|
elsif (defined $opt_I) {
|
||||||
$mode = "import";
|
$mode = "import";
|
||||||
@@ -293,7 +310,7 @@ else {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ($opt_v) {
|
elsif ($opt_v) {
|
||||||
print "This is note $VERSION by Thomas Linden <tom at linden dot at>.\n";
|
print "This is note $VERSION by Thomas von Dein <tom at vondein dot org>.\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
elsif ($opt_h) {
|
elsif ($opt_h) {
|
||||||
@@ -310,8 +327,9 @@ else {
|
|||||||
$has_nothing = 1;
|
$has_nothing = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
### determine generic options
|
### determine generic options
|
||||||
if ($opt_n =~ /^[\d+\-?\,*]+$/) {
|
if ($opt_n =~ /^\d[\d\-?\,]*$/) {
|
||||||
# first arg is a digit!
|
# first arg is a digit!
|
||||||
if ($mode eq "") {
|
if ($mode eq "") {
|
||||||
$number = $opt_n;
|
$number = $opt_n;
|
||||||
@@ -323,6 +341,10 @@ else {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif ($opt_n eq "-") {
|
||||||
|
$StdinMode = 1; # read from STDIN
|
||||||
|
$mode = "new";
|
||||||
|
}
|
||||||
elsif ($opt_n ne "") {
|
elsif ($opt_n ne "") {
|
||||||
print "Unknown option: $opt_n\n";
|
print "Unknown option: $opt_n\n";
|
||||||
&usage;
|
&usage;
|
||||||
@@ -343,7 +365,6 @@ if ($has_nothing && $mode eq "") {
|
|||||||
&usage;
|
&usage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# read the configfile.
|
# read the configfile.
|
||||||
$CONF = $opt_c if($opt_c); # if given by commandline, use this.
|
$CONF = $opt_c if($opt_c); # if given by commandline, use this.
|
||||||
if (-e $CONF) {
|
if (-e $CONF) {
|
||||||
@@ -362,8 +383,8 @@ if ($mode eq "encrypt_passwd") {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Always interactive?
|
# Always interactive? with the exception if stdin was requested
|
||||||
if ($conf{alwaysinteractive} && $mode ne "dump" && $mode ne "import") {
|
if ($conf{alwaysinteractive} && $mode ne "dump" && $mode ne "import" && !$StdinMode && !defined $opt_new) {
|
||||||
$mode = "interactive";
|
$mode = "interactive";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,7 +489,7 @@ else {
|
|||||||
if(scalar keys %all > 0) {
|
if(scalar keys %all > 0) {
|
||||||
my $id = (keys %all)[0];
|
my $id = (keys %all)[0];
|
||||||
if($all{$id}->{date} !~ /^\d+\.\d+?/) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -709,12 +730,26 @@ sub new {
|
|||||||
print "readonly\n";
|
print "readonly\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = &getdate;
|
$date = &getdate;
|
||||||
|
$note = "";
|
||||||
|
$line = "";
|
||||||
|
|
||||||
return if $db->lock();
|
return if $db->lock();
|
||||||
if ($conf{alwayseditor}) {
|
|
||||||
|
if ($StdinMode) {
|
||||||
|
# create a new note from STDIN
|
||||||
|
print STDERR "Reading from STDIN ...\n";
|
||||||
|
while (<STDIN>) {
|
||||||
|
$note .= $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif ($conf{alwayseditor} && &is_interactive()) {
|
||||||
|
# read a new note interactively or by using the editor
|
||||||
$TEMP = &gettemp;
|
$TEMP = &gettemp;
|
||||||
# security!
|
# security!
|
||||||
unlink $TEMP;
|
unlink $TEMP;
|
||||||
|
|
||||||
# let the user edit it...
|
# let the user edit it...
|
||||||
$editor = &find_editor;
|
$editor = &find_editor;
|
||||||
if ($editor) {
|
if ($editor) {
|
||||||
@@ -729,6 +764,7 @@ sub new {
|
|||||||
$db->unlock();
|
$db->unlock();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# read it in ($note)
|
# read it in ($note)
|
||||||
$note = "";
|
$note = "";
|
||||||
open E, "<$TEMP" or $WARN = 1;
|
open E, "<$TEMP" or $WARN = 1;
|
||||||
@@ -738,29 +774,20 @@ sub new {
|
|||||||
$db->unlock();
|
$db->unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$c = 0;
|
$c = 0;
|
||||||
while (<E>) {
|
while (<E>) {
|
||||||
$note = $note . $_;
|
$note = $note . $_;
|
||||||
}
|
}
|
||||||
chomp $note;
|
chomp $note;
|
||||||
close E;
|
close E;
|
||||||
|
|
||||||
# privacy!
|
# privacy!
|
||||||
unlink $TEMP;
|
unlink $TEMP;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$note = "";
|
|
||||||
$line = "";
|
|
||||||
# create a new note
|
|
||||||
if ($NewType) {
|
|
||||||
# be silent! read from STDIN until EOF.
|
|
||||||
while (<STDIN>) {
|
|
||||||
$note .= $_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
print "enter the text of the note, end with a single .\n";
|
print "enter the text of the note, end with a single .\n";
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
$line = <STDIN>;
|
$line = <STDIN>;
|
||||||
$note = $note . $line;
|
$note = $note . $line;
|
||||||
} until $line eq ".\n";
|
} until $line eq ".\n";
|
||||||
@@ -768,7 +795,7 @@ sub new {
|
|||||||
chop $note;
|
chop $note;
|
||||||
chop $note;
|
chop $note;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
# look if the note was empty, so don't store it!
|
# look if the note was empty, so don't store it!
|
||||||
if ($note =~ /^\s*$/) {
|
if ($note =~ /^\s*$/) {
|
||||||
print "...your note was empty and will not be saved.\n";
|
print "...your note was empty and will not be saved.\n";
|
||||||
@@ -923,6 +950,7 @@ sub edit {
|
|||||||
|
|
||||||
sub dump {
|
sub dump {
|
||||||
my(%res, $num, $DUMP);
|
my(%res, $num, $DUMP);
|
||||||
|
|
||||||
# $dump_file
|
# $dump_file
|
||||||
if ($dump_file eq "-") {
|
if ($dump_file eq "-") {
|
||||||
$DUMP = *STDOUT;
|
$DUMP = *STDOUT;
|
||||||
@@ -931,8 +959,11 @@ sub dump {
|
|||||||
open (DUMPFILE, ">$dump_file") or die "could not open $dump_file\n";
|
open (DUMPFILE, ">$dump_file") or die "could not open $dump_file\n";
|
||||||
$DUMP = *DUMPFILE;
|
$DUMP = *DUMPFILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
select $DUMP;
|
select $DUMP;
|
||||||
|
|
||||||
%res = $db->get_all();
|
%res = $db->get_all();
|
||||||
|
|
||||||
# FIXME: prepare hashing in NOTEDB class
|
# FIXME: prepare hashing in NOTEDB class
|
||||||
foreach $num (sort { $a <=> $b } keys %res) {
|
foreach $num (sort { $a <=> $b } keys %res) {
|
||||||
print STDOUT "dumping note number $num to $dump_file\n" if($dump_file ne "-");
|
print STDOUT "dumping note number $num to $dump_file\n" if($dump_file ne "-");
|
||||||
@@ -947,7 +978,17 @@ sub dump {
|
|||||||
my $date = $res{$num}->{date};
|
my $date = $res{$num}->{date};
|
||||||
$res{$num} = { body => $body, title => $title, path => $path, date => $date};
|
$res{$num} = { body => $body, title => $title, path => $path, date => $date};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($conf{usejson}) {
|
||||||
|
my $json = JSON::PP->new->utf8->pretty;
|
||||||
|
print $json->encode(\%res);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
warn "Deprecation notice: YAML export format will not be supported in the future!
|
||||||
|
Enable JSON using the UseJSON config parameter or the -j commandline parameter!";
|
||||||
print Dump(\%res);
|
print Dump(\%res);
|
||||||
|
}
|
||||||
|
|
||||||
close(DUMPFILE);
|
close(DUMPFILE);
|
||||||
select STDOUT;
|
select STDOUT;
|
||||||
}
|
}
|
||||||
@@ -964,9 +1005,16 @@ sub import {
|
|||||||
$DUMP = *DUMPFILE;
|
$DUMP = *DUMPFILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $yaml = join '', <$DUMP>;
|
my $serialized = join '', <$DUMP>;
|
||||||
|
|
||||||
my $res = Load($yaml);
|
my $res;
|
||||||
|
|
||||||
|
if($serialized =~ /^\{/) {
|
||||||
|
$res = decode_json($serialized);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$res = Load($serialized);
|
||||||
|
}
|
||||||
|
|
||||||
foreach my $number (keys %{$res}) {
|
foreach my $number (keys %{$res}) {
|
||||||
my $note;
|
my $note;
|
||||||
@@ -1311,6 +1359,9 @@ Options:
|
|||||||
-c, --config file
|
-c, --config file
|
||||||
Use another config file than the default \$HOME/.noterc.
|
Use another config file than the default \$HOME/.noterc.
|
||||||
|
|
||||||
|
-n, --new
|
||||||
|
Create a new note entry.
|
||||||
|
|
||||||
-l, --list [topic]
|
-l, --list [topic]
|
||||||
Lists all existing notes. If no topic were specified, it will
|
Lists all existing notes. If no topic were specified, it will
|
||||||
display a list of all existing topics. See the section TOPICS for
|
display a list of all existing topics. See the section TOPICS for
|
||||||
@@ -1856,4 +1907,9 @@ sub load_driver {
|
|||||||
sub ticket {
|
sub ticket {
|
||||||
return join "", (map { $randomlist[int(rand($#randomlist))] } (0 .. 10) );
|
return join "", (map { $randomlist[int(rand($#randomlist))] } (0 .. 10) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub is_interactive {
|
||||||
|
return -t STDIN && -t STDOUT;
|
||||||
|
}
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
|||||||
182
config/noterc
182
config/noterc
@@ -1,21 +1,18 @@
|
|||||||
# note 1.3.13 -*- sh -*-
|
# note 1.4.1 -*- conf -*-
|
||||||
#
|
#
|
||||||
# This is a sample config for the note script
|
# This is a sample config for the note script There are useful
|
||||||
# There are useful defaults set in note itself.
|
# defaults set in note itself.
|
||||||
#
|
#
|
||||||
# Copy it to your $HOME as .noterc
|
# 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.
|
# Comments start with #, empty lines will be ignored.
|
||||||
#
|
#
|
||||||
# To turn on an option, set it to: 1, on or yes
|
# To turn on an option, set it to: 1, on or yes
|
||||||
# To turn off an option, set it to: 0, off or no
|
# To turn off an option, set it to: 0, off or no
|
||||||
#
|
#
|
||||||
# An option consists of an atribute-value pair separated
|
# An option consists of an atribute-value pair separated by minimum
|
||||||
# by minimum one space (more spaces and/or tabs are allowed)
|
# one space (more spaces and/or tabs are allowed) and an optional
|
||||||
# and an optional equal sign in between.
|
# equal sign in between.
|
||||||
#
|
#
|
||||||
# Variable names are case in-sensitive.
|
# Variable names are case in-sensitive.
|
||||||
#
|
#
|
||||||
@@ -25,13 +22,12 @@
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# you need to decide which database backend you want
|
# you need to decide which database backend you want to use. Please
|
||||||
# to use. Please refer to the corresponding documentation
|
# refer to the corresponding documentation for closer information
|
||||||
# for closer information about the certain backend!
|
# about the certain backend! Currently supported types: "binary",
|
||||||
# Currently supported types: "binary", "dbm", "mysql",
|
# "dbm", "mysql", "general", "dumper", "pwsafe3" or "text". You must
|
||||||
# "general", "dumper", "pwsafe3" or "text".
|
# also edit/uncomment one section below for the backend you want to
|
||||||
# You must also edit/uncomment one section below for the
|
# use!
|
||||||
# backend you want to use!
|
|
||||||
dbdriver = binary
|
dbdriver = binary
|
||||||
|
|
||||||
|
|
||||||
@@ -57,63 +53,62 @@ mysql::encrypt_passwd = 0 # mysql::dbpasswd is
|
|||||||
|
|
||||||
#
|
#
|
||||||
# DBM backend
|
# DBM backend
|
||||||
dbm::directory = ~/.notedbm # directory
|
dbm::directory = ~/.notedb.dbm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# GENERAL backend
|
# GENERAL backend
|
||||||
general::dbname = ~/.notedb # filename
|
general::dbname = ~/.notedb.txt
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# TEXT backend
|
# TEXT backend
|
||||||
text::dbname = ~/.notedb # filename
|
text::dbname = ~/.notedb.storable
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# DUMPER backend
|
# DUMPER backend
|
||||||
dumper::dbname = ~/.notedb # filename
|
dumper::dbname = ~/.notedb.dumper
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Password Safe v3 backend
|
# Password Safe v3 backend Some notes on this one: This backend
|
||||||
# Some notes on this one:
|
# maintains encryption itself, which is mandatory as well. So you'll
|
||||||
# This backend maintains encryption itself, which is
|
# have to disable encryption (UseEncryption = NO)!
|
||||||
# mandatory as well. So you'll have to disable encryption
|
|
||||||
# (UseEncryption = NO)!
|
|
||||||
#
|
#
|
||||||
# The Password Safe v3 file has its own fields for
|
# The Password Safe v3 file has its own fields for password and
|
||||||
# password and username, which note doesn't have. To be
|
# username, which note doesn't have. To be compatible, the pwsafe3
|
||||||
# compatible, the pwsafe3 backend parses the note text
|
# backend parses the note text for those fields and stores them
|
||||||
# for those fields and stores them accordignly to the db:
|
# accordignly to the db:
|
||||||
#
|
#
|
||||||
# For username field: user|username|login|account|benutzer
|
# For username field: user|username|login|account|benutzer
|
||||||
# For passwd field: password|pass|passwd|kennwort|pw
|
# For passwd field: password|pass|passwd|kennwort|pw
|
||||||
#
|
#
|
||||||
# If it doesn't find it, it will put empty strings
|
# If it doesn't find it, it will put empty strings into the pwsafe3
|
||||||
# into the pwsafe3 database.
|
# database.
|
||||||
#
|
#
|
||||||
# The pwsafe3 database can be accessed by Password Safe
|
# The pwsafe3 database can be accessed by Password Safe (see:
|
||||||
# (see: http://passwordsafe.sourceforge.net/) or other
|
# http://passwordsafe.sourceforge.net/) or other tools which support
|
||||||
# tools which support the format (see:
|
# the format (see:
|
||||||
# http://passwordsafe.sourceforge.net/relatedprojects.shtml)
|
# http://passwordsafe.sourceforge.net/relatedprojects.shtml)
|
||||||
pwsafe3::dbname = ~/db.psafe3 # filename
|
pwsafe3::dbname = ~/.notedb.psafe3
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# You can use encryption with note, that means notes and
|
# You can use encryption with note, that means notes and timestamps
|
||||||
# timestamps will be stored encrypted. This is supported
|
# will be stored encrypted. This is supported by every db-backend, but
|
||||||
# by every db-backend.
|
# not the pwsafe3 backend because this one has builtin encryption
|
||||||
|
# support.
|
||||||
UseEncryption = NO
|
UseEncryption = NO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Specify the encryption protocol. The appropriate perl
|
# Specify the encryption protocol. The appropriate perl module needs
|
||||||
# module needs to be installed. Possible velues are
|
# to be installed. Possible velues are IDEA, DES or Blowfish, the
|
||||||
# IDEA, DES or Blowfish, the default is IDEA.
|
# default is IDEA.
|
||||||
CryptMethod = IDEA
|
CryptMethod = IDEA
|
||||||
|
|
||||||
|
|
||||||
@@ -126,81 +121,76 @@ AlwaysInteractive = YES
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# In interactive mode, note issues a list command if you
|
# In interactive mode, note issues a list command if you simply hit
|
||||||
# simply hit enter. By turning this on, it will issue a
|
# enter. By turning this on, it will issue a longlist command instead
|
||||||
# longlist command instead if you hit just enter.
|
# if you hit just enter. The default is: NO
|
||||||
# The default is: NO
|
|
||||||
DefaultLong = NO
|
DefaultLong = NO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# You can use an external editor everytime from note instead
|
# You can use an external editor everytime from note instead of STDIN
|
||||||
# of STDIN for creating new notes. The default is: YES
|
# for creating new notes. The default is: YES
|
||||||
AlwaysEditor = YES
|
AlwaysEditor = YES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# By default, note looks in the environment for a variable
|
# By default, note looks in the environment for a variable $EDITOR or,
|
||||||
# $EDITOR or, if this is not the case, for $VISUAL and as
|
# if this is not the case, for $VISUAL and as fallback it uses 'vi'.
|
||||||
# fallback it uses 'vi'.
|
|
||||||
# You can override this by setting this variable here.
|
# You can override this by setting this variable here.
|
||||||
PreferredEditor =
|
PreferredEditor =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# If you don't prefer that note updates the timestamp of a
|
# If you don't prefer that note updates the timestamp of a note after
|
||||||
# note after editing, turn this on. It will
|
# editing, turn this on. It will keep the original timestamp if this
|
||||||
# keep the original timestamp if this option is set.
|
# option is set. The default is: NO
|
||||||
# The default is: NO
|
|
||||||
KeepTimeStamp = NO
|
KeepTimeStamp = NO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# You can specify your own topic separator here.
|
# You can specify your own topic separator here. The default topic
|
||||||
# The default topic separator is a normal slash: "/"
|
# separator is a normal slash: "/"
|
||||||
TopicSeparator = /
|
TopicSeparator = /
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The maximum width for displaying a note, in CHARS.
|
# The maximum width for displaying a note, in CHARS. Depends on your
|
||||||
# Depends on your screen-size. You can set it to
|
# screen-size. You can set it to "auto", if you wish that note should
|
||||||
# "auto", if you wish that note should determine the
|
# determine the available size automatically.
|
||||||
# available size automatically.
|
|
||||||
MaxLen = auto
|
MaxLen = auto
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Turn this off if you dont want note to automatically
|
# Turn this off if you dont want note to automatically clear the
|
||||||
# clear the screen after displaying something and after
|
# screen after displaying something and after exit. The default is: NO
|
||||||
# exit. The default is: NO
|
|
||||||
AutoClear = NO
|
AutoClear = NO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# note can use colors for output, turn this of, if
|
# note can use colors for output, turn this of, if you don't like it,
|
||||||
# you don't like it, or if your terminal does
|
# or if your terminal does not support it. The default is: YES
|
||||||
# not support it. The default is: YES
|
|
||||||
UseColors = NO
|
UseColors = NO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Color-definitions of the various items. Will only
|
# Color-definitions of the various items. Will only take effect, if
|
||||||
# take effect, if "UseColors" is turned on!
|
# "UseColors" is turned on!
|
||||||
#
|
#
|
||||||
# The following colors are available:
|
# The following colors are available: black, red, green, yellow, blue,
|
||||||
# black, red, green, yellow, blue, magenta, cyan and white.
|
# magenta, cyan and white.
|
||||||
#
|
#
|
||||||
# For bold color write it uppercase (BLACK will be bold black).
|
# For bold color write it uppercase (BLACK will be bold black). For
|
||||||
# For underlined color append an underscore (blue_ will be underlined blue).
|
# underlined color append an underscore (blue_ will be underlined
|
||||||
# For inverted color append an "I" (greenI will be inverted green).
|
# blue). For inverted color append an "I" (greenI will be inverted
|
||||||
|
# green).
|
||||||
BorderColor BLACK
|
BorderColor BLACK
|
||||||
NumberColor blue
|
NumberColor blue
|
||||||
NoteColor green
|
NoteColor green
|
||||||
@@ -210,33 +200,33 @@ TopicColor BLACK
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Additional to colors, you can also do a little bit of formatting your
|
# Additional to colors, you can also do a little bit of formatting
|
||||||
# notes (bold, underlined, italic) text. The default is: YES.
|
# your notes (bold, underlined, italic) text. The default is: YES.
|
||||||
FormatText = NO
|
FormatText = NO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# You might specify your own directory for temporary files.
|
# You might specify your own directory for temporary files. note
|
||||||
# note needs to create some temp files during editing of notes.
|
# needs to create some temp files during editing of notes. You could
|
||||||
# You could protect this directory using the command: chmod 700 directory.
|
# protect this directory using the command: chmod 700 directory. The
|
||||||
# The default is: /tmp
|
# default is: /tmp
|
||||||
TempDirectory = ~/tmp
|
TempDirectory = ~/tmp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# You can jump to a topic by typing "cd 13" in interactive mode.
|
# You can jump to a topic by typing "cd 13" in interactive mode. The
|
||||||
# The deault is: NO
|
# deault is: NO
|
||||||
ShortCd = YES
|
ShortCd = YES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# note can use a cached copy of the note database for list/tree/search
|
# 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,
|
# this is currently only supported by the binary and the mysql
|
||||||
# the general and text backends have an internal cache.
|
# backends, the general and text backends have an internal cache. The
|
||||||
# The default is: NO
|
# default is: NO
|
||||||
Cache = NO
|
Cache = NO
|
||||||
|
|
||||||
|
|
||||||
@@ -256,17 +246,16 @@ TimeFormat = DD.MM.YYYY hh:mm:ss
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# You can make note readonly which is useful for database copies
|
# You can make note readonly which is useful for database copies The
|
||||||
# The default is: NO
|
# default is: NO
|
||||||
ReadOnly = NO
|
ReadOnly = NO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Note may separate titles and topics using horizontal lines when
|
# Note may separate titles and topics using horizontal lines when
|
||||||
# listing them. You can turn on this behavior by setting
|
# listing them. You can turn on this behavior by setting PrintLines to
|
||||||
# PrintLines to YES.
|
# YES. The default is: NO
|
||||||
# The default is: NO
|
|
||||||
PrintLines = NO
|
PrintLines = NO
|
||||||
|
|
||||||
|
|
||||||
@@ -278,15 +267,14 @@ AddTicket = NO
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Show an entry on startup. If you want it, create such an entry
|
# Show an entry on startup. If you want it, create such an entry and
|
||||||
# and supply its number here
|
# supply its number here
|
||||||
motd =
|
motd =
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
# Enable JSON formatted backups. The option will be removed in version
|
||||||
# That's all about it for now.
|
# 1.5 and become the only available option. In earlier versions: if
|
||||||
# If you still have any questiosn, please feel free to contact
|
# unset or set to NO, YAML will be used.
|
||||||
# me by email: Thomas Linden <tom at linden dot at>
|
UseJSON = YES
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|||||||
154
config/rc
154
config/rc
@@ -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>
|
|
||||||
172
contrib/sync-combine-two-yaml-exports-into-one.pl
Executable file
172
contrib/sync-combine-two-yaml-exports-into-one.pl
Executable file
@@ -0,0 +1,172 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
use warnings;
|
||||||
|
use strict;
|
||||||
|
no strict "refs";
|
||||||
|
|
||||||
|
use IO::All;
|
||||||
|
use Encode;
|
||||||
|
# only YAML::XS is able to properly load our data (others fail
|
||||||
|
# invariably)
|
||||||
|
use YAML::XS qw(Load);
|
||||||
|
# only YAML is able to properly Dump the data YAML::XS generates
|
||||||
|
# various kinds of multiline entries like "line\nline2\nline3" end up
|
||||||
|
# literally in the generated yaml, which note is then unable to
|
||||||
|
# feed. So, the pure perl version is better as it always generates
|
||||||
|
# multiline entries for data containing newlines
|
||||||
|
use YAML qw(Dump);
|
||||||
|
use Data::Dumper;
|
||||||
|
use Term::ANSIColor;
|
||||||
|
|
||||||
|
my ($yf1, $yf2, $outfile) = @ARGV;
|
||||||
|
|
||||||
|
|
||||||
|
# read both input files and parse yaml into data structure, fix
|
||||||
|
# non-printables
|
||||||
|
my $badutf81 < io $yf1;
|
||||||
|
my $yaml1 = decode( 'UTF-8', $badutf81 =~ s/[^\x00-\x7F]+//gr );
|
||||||
|
my $y1 = Load $yaml1 or die "Could not load $yf1: $!";
|
||||||
|
|
||||||
|
my $badutf82 < io $yf2;
|
||||||
|
my $yaml2 = decode( 'UTF-8', $badutf82 =~ s/[^\x00-\x7F]+//gr );
|
||||||
|
my $y2 = Load $yaml2 or die "Could not load $yf2: $!";
|
||||||
|
|
||||||
|
# convert to comparable hashes with unique keys
|
||||||
|
my $hash1 = &hashify($y1);
|
||||||
|
my $hash2 = &hashify($y2);
|
||||||
|
|
||||||
|
# diff and recombine the two into a new one
|
||||||
|
my $combinedhash = &hash2note(&diff($hash1, $hash2));
|
||||||
|
|
||||||
|
#print Dumper($combinedhash); exit;
|
||||||
|
|
||||||
|
# turn into yaml
|
||||||
|
my $combindedyaml = Dump($combinedhash);
|
||||||
|
|
||||||
|
# perl uses scalars as hash keys (read: strings) so we need to unquote
|
||||||
|
# them here to make note happy
|
||||||
|
$combindedyaml =~ s/^'(\d+)':/$1:/gm;
|
||||||
|
|
||||||
|
# done
|
||||||
|
my $out = io $outfile;
|
||||||
|
$combindedyaml > $out;
|
||||||
|
|
||||||
|
|
||||||
|
print "\nDone. Wrote combined hashes to $outfile\n";
|
||||||
|
|
||||||
|
sub hash2note {
|
||||||
|
# convert given hash into note format with number as key
|
||||||
|
my $hash = shift;
|
||||||
|
my $new;
|
||||||
|
my $i = 0;
|
||||||
|
|
||||||
|
foreach my $path (sort keys %{$hash}) {
|
||||||
|
$new->{++$i} = $hash->{$path};
|
||||||
|
}
|
||||||
|
|
||||||
|
return $new;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub diff {
|
||||||
|
# diff the two hashes, create a new combined one
|
||||||
|
my($hash1, $hash2) = @_;
|
||||||
|
my $new;
|
||||||
|
|
||||||
|
# iterate over hash1, store duplicates and remove them in hash2,
|
||||||
|
# store different entries and remove in both,
|
||||||
|
# store those missing in hash2 and delete them in hash1
|
||||||
|
foreach my $path (sort keys %{$hash1}) {
|
||||||
|
if (exists $hash2->{$path}) {
|
||||||
|
if ($hash2->{$path}->{body} eq $hash1->{$path}->{body}) {
|
||||||
|
#printf STDERR "%s => %s is duplicate\n", $path, $hash1->{$path}->{title};
|
||||||
|
$new->{$path} = delete $hash2->{$path};
|
||||||
|
delete $hash1->{$path};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
printf STDERR "%s => %s is different\n", $path, $hash1->{$path}->{title};
|
||||||
|
my $which = &askdiff($hash1->{$path}->{body}, $hash2->{$path}->{body}, $hash1->{$path}->{title});
|
||||||
|
|
||||||
|
if ($which eq 'l') {
|
||||||
|
# use left
|
||||||
|
$new->{$path} = delete $hash1->{$path};
|
||||||
|
delete $hash2->{$path};
|
||||||
|
}
|
||||||
|
elsif ($which eq 'r') {
|
||||||
|
# use right
|
||||||
|
$new->{$path} = delete $hash2->{$path};
|
||||||
|
delete $hash1->{$path};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
# both
|
||||||
|
$new->{$path} = delete $hash1->{$path};
|
||||||
|
$new->{$path . 2} = delete $hash2->{$path};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
#printf STDERR "%s => %s is missing in hash2\n", $path, $hash1->{$path}->{title};
|
||||||
|
$new->{$path} = delete $hash1->{$path};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# store any lefovers of hash1
|
||||||
|
foreach my $path (sort keys %{$hash1}) {
|
||||||
|
#printf STDERR "%s => %s is left in hash1\n", $path, $hash1->{$path}->{title};
|
||||||
|
$new->{$path} = $hash1->{$path};
|
||||||
|
}
|
||||||
|
|
||||||
|
# store any lefovers of hash2
|
||||||
|
foreach my $path (sort keys %{$hash2}) {
|
||||||
|
#printf STDERR "%s => %s is left in hash2\n", $path, $hash2->{$path}->{title};
|
||||||
|
$new->{$path} = $hash2->{$path};
|
||||||
|
}
|
||||||
|
|
||||||
|
return $new
|
||||||
|
}
|
||||||
|
|
||||||
|
sub askdiff {
|
||||||
|
my ($left, $right, $title) = @_;
|
||||||
|
$left > io("/tmp/$$-body-left");
|
||||||
|
$right > io("/tmp/$$-body-right");
|
||||||
|
my $diff = `diff --side-by-side /tmp/$$-body-left /tmp/$$-body-right`;
|
||||||
|
|
||||||
|
print color ('bold');
|
||||||
|
print "\n\nEntry $title exists in both hashes but differ. Diff:\n";
|
||||||
|
print color ('reset');
|
||||||
|
|
||||||
|
print "$diff\n";
|
||||||
|
|
||||||
|
print color ('bold');
|
||||||
|
print "keep [l]eft, keep [r]ight, keep [b]oth? ";
|
||||||
|
print color ('reset');
|
||||||
|
|
||||||
|
my $answer = <STDIN>;
|
||||||
|
chomp $answer;
|
||||||
|
|
||||||
|
system("rm -f /tmp/$$-body-left /tmp/$$-body-right");
|
||||||
|
|
||||||
|
if ($answer !~ /^[blr]$/) {
|
||||||
|
print "Wrong answer $answer, using [b]oth!\n";
|
||||||
|
return 'b';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub hashify {
|
||||||
|
# create new hash with path+title as key instead of id's
|
||||||
|
my $data = shift;
|
||||||
|
my $new = {};
|
||||||
|
|
||||||
|
foreach my $id (keys %{$data} ) {
|
||||||
|
my $path = $data->{$id}->{path} . '|' . $data->{$id}->{title};
|
||||||
|
if (exists $new->{$path}) {
|
||||||
|
die "$path already exists!\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$new->{$path} = $data->{$id};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $new;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
perl modules for note used as database backends.
|
perl modules for note used as database backends.
|
||||||
the install.sh script will install both of them,
|
the install.sh script will install both of them,
|
||||||
although you may only need one backend. Perhaps
|
although you may only need one backend. Perhaps
|
||||||
other users on your system have oter ideas in mind...
|
other users on your system have other ideas in mind...
|
||||||
|
|
||||||
Therefore, please ignore these file. There is nothing
|
Therefore, please ignore these file. There is nothing
|
||||||
to edit or to do. Simply leave this directory :-)
|
to edit or to do. Simply leave this directory :-)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
package NOTEDB::binary;
|
package NOTEDB::binary;
|
||||||
|
|
||||||
$NOTEDB::binary::VERSION = "1.12";
|
$NOTEDB::binary::VERSION = "1.13";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use IO::Seekable;
|
use IO::Seekable;
|
||||||
@@ -451,7 +451,7 @@ NOTEDB::binary - module lib for accessing a notedb from perl
|
|||||||
|
|
||||||
# get all existing notes
|
# get all existing notes
|
||||||
%all_notes = $db->get_all();
|
%all_notes = $db->get_all();
|
||||||
# format of returnes hash like the one from get_search above
|
# format of returns hash like the one from get_search above
|
||||||
|
|
||||||
# get the next noteid available
|
# get the next noteid available
|
||||||
$next_num = $db->get_nextnum();
|
$next_num = $db->get_nextnum();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
package NOTEDB::dbm;
|
package NOTEDB::dbm;
|
||||||
|
|
||||||
$NOTEDB::dbm::VERSION = "1.41";
|
$NOTEDB::dbm::VERSION = "1.42";
|
||||||
|
|
||||||
use DB_File;
|
use DB_File;
|
||||||
use NOTEDB;
|
use NOTEDB;
|
||||||
@@ -29,7 +29,7 @@ sub new
|
|||||||
|
|
||||||
my $notefile = "note.dbm";
|
my $notefile = "note.dbm";
|
||||||
my $timefile = "date.dbm";
|
my $timefile = "date.dbm";
|
||||||
my $dbm_dir = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".note_dbm");
|
my $dbm_dir = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.dbm");
|
||||||
|
|
||||||
if (! -d $dbm_dir) {
|
if (! -d $dbm_dir) {
|
||||||
# try to make it
|
# try to make it
|
||||||
@@ -230,12 +230,12 @@ NOTEDB::dbm - module lib for accessing a notedb from perl
|
|||||||
|
|
||||||
# get all existing notes
|
# get all existing notes
|
||||||
%all_notes = $db->get_all();
|
%all_notes = $db->get_all();
|
||||||
# format of returnes hash like the one from get_search above
|
# format of returns hash like the one from get_search above
|
||||||
|
|
||||||
# get the next noteid available
|
# get the next noteid available
|
||||||
$next_num = $db->get_nextnum();
|
$next_num = $db->get_nextnum();
|
||||||
|
|
||||||
# recount all noteids starting by 1 (usefull after deleting one!)
|
# recount all noteids starting by 1 (useful after deleting one!)
|
||||||
$db->set_recountnums();
|
$db->set_recountnums();
|
||||||
|
|
||||||
# modify a certain note
|
# modify a certain note
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package NOTEDB::dumper;
|
package NOTEDB::dumper;
|
||||||
|
|
||||||
$NOTEDB::dumper::VERSION = "1.02";
|
$NOTEDB::dumper::VERSION = "1.03";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
@@ -29,7 +29,7 @@ sub new {
|
|||||||
my $self = {};
|
my $self = {};
|
||||||
bless($self,$class);
|
bless($self,$class);
|
||||||
|
|
||||||
$self->{NOTEDB} = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
|
$self->{NOTEDB} = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.dumper");
|
||||||
|
|
||||||
if(! -e $param{dbname}) {
|
if(! -e $param{dbname}) {
|
||||||
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
||||||
@@ -329,7 +329,7 @@ NOTEDB::text - module lib for accessing a notedb from perl
|
|||||||
|
|
||||||
# get all existing notes
|
# get all existing notes
|
||||||
%all_notes = $db->get_all();
|
%all_notes = $db->get_all();
|
||||||
# format of returnes hash like the one from get_search above
|
# format of returns hash like the one from get_search above
|
||||||
|
|
||||||
# get the next noteid available
|
# get the next noteid available
|
||||||
$next_num = $db->get_nextnum();
|
$next_num = $db->get_nextnum();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package NOTEDB::general;
|
package NOTEDB::general;
|
||||||
|
|
||||||
$NOTEDB::general::VERSION = "1.04";
|
$NOTEDB::general::VERSION = "1.05";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
#use Data::Dumper;
|
#use Data::Dumper;
|
||||||
@@ -31,7 +31,7 @@ sub new {
|
|||||||
my $self = {};
|
my $self = {};
|
||||||
bless($self,$class);
|
bless($self,$class);
|
||||||
|
|
||||||
$self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
|
$self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.txt");
|
||||||
|
|
||||||
if(! -e $param{dbname}) {
|
if(! -e $param{dbname}) {
|
||||||
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
||||||
@@ -370,7 +370,7 @@ NOTEDB::general - module lib for accessing a notedb from perl
|
|||||||
|
|
||||||
# get all existing notes
|
# get all existing notes
|
||||||
%all_notes = $db->get_all();
|
%all_notes = $db->get_all();
|
||||||
# format of returnes hash like the one from get_search above
|
# format of returns hash like the one from get_search above
|
||||||
|
|
||||||
# get the next noteid available
|
# get the next noteid available
|
||||||
$next_num = $db->get_nextnum();
|
$next_num = $db->get_nextnum();
|
||||||
|
|||||||
@@ -377,12 +377,12 @@ NOTEDB::mysql - module lib for accessing a notedb from perl
|
|||||||
|
|
||||||
# get all existing notes
|
# get all existing notes
|
||||||
%all_notes = $db->get_all();
|
%all_notes = $db->get_all();
|
||||||
# format of returnes hash like the one from get_search above
|
# format of returns hash like the one from get_search above
|
||||||
|
|
||||||
# get the next noteid available
|
# get the next noteid available
|
||||||
$next_num = $db->get_nextnum();
|
$next_num = $db->get_nextnum();
|
||||||
|
|
||||||
# recount all noteids starting by 1 (usefull after deleting one!)
|
# recount all noteids starting by 1 (useful after deleting one!)
|
||||||
$db->set_recountnums();
|
$db->set_recountnums();
|
||||||
|
|
||||||
# modify a certain note
|
# modify a certain note
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
package NOTEDB::pwsafe3;
|
package NOTEDB::pwsafe3;
|
||||||
|
|
||||||
$NOTEDB::pwsafe3::VERSION = "1.08";
|
$NOTEDB::pwsafe3::VERSION = "1.09";
|
||||||
use strict;
|
use strict;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use Time::Local;
|
use Time::Local;
|
||||||
@@ -28,7 +28,7 @@ sub new {
|
|||||||
my $self = {};
|
my $self = {};
|
||||||
bless($self,$class);
|
bless($self,$class);
|
||||||
|
|
||||||
$self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
|
$self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.psafe3");
|
||||||
|
|
||||||
$self->{mtime} = $self->get_stat();
|
$self->{mtime} = $self->get_stat();
|
||||||
$self->{unread} = 1;
|
$self->{unread} = 1;
|
||||||
@@ -568,7 +568,7 @@ NOTEDB::pwsafe3 - module lib for accessing a notedb from perl
|
|||||||
|
|
||||||
# get all existing notes
|
# get all existing notes
|
||||||
%all_notes = $db->get_all();
|
%all_notes = $db->get_all();
|
||||||
# format of returnes hash like the one from get_search above
|
# format of returns hash like the one from get_search above
|
||||||
|
|
||||||
# get the next noteid available
|
# get the next noteid available
|
||||||
$next_num = $db->get_nextnum();
|
$next_num = $db->get_nextnum();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package NOTEDB::text;
|
package NOTEDB::text;
|
||||||
|
|
||||||
$NOTEDB::text::VERSION = "1.04";
|
$NOTEDB::text::VERSION = "1.05";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
#use Data::Dumper;
|
#use Data::Dumper;
|
||||||
@@ -30,7 +30,7 @@ sub new {
|
|||||||
my $self = {};
|
my $self = {};
|
||||||
bless($self,$class);
|
bless($self,$class);
|
||||||
|
|
||||||
$self->{NOTEDB} = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
|
$self->{NOTEDB} = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.storable");
|
||||||
|
|
||||||
if(! -e $param{dbname}) {
|
if(! -e $param{dbname}) {
|
||||||
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
||||||
@@ -310,7 +310,7 @@ NOTEDB::text - module lib for accessing a notedb from perl
|
|||||||
|
|
||||||
# get all existing notes
|
# get all existing notes
|
||||||
%all_notes = $db->get_all();
|
%all_notes = $db->get_all();
|
||||||
# format of returnes hash like the one from get_search above
|
# format of returns hash like the one from get_search above
|
||||||
|
|
||||||
# get the next noteid available
|
# get the next noteid available
|
||||||
$next_num = $db->get_nextnum();
|
$next_num = $db->get_nextnum();
|
||||||
|
|||||||
48
note.pod
48
note.pod
@@ -12,14 +12,15 @@ note [options] [ number [,number...]]
|
|||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
B<note> is a small console program written in perl, which allows
|
B<note> is a small console program written in perl, which allows you
|
||||||
you to manage notes similar to programs like "knotes" but from
|
to manage notes similar to programs like "knotes" but from the command
|
||||||
the commandline. Note can use different database-backends for
|
line. Note can use different database-backends for notes-storage. It
|
||||||
notes-storage. It ships with a DBI-based mysql-module(which
|
ships with a DBI-based mysql-module(which can also be used for other
|
||||||
can also be used for other by DBI supported DBMS), another
|
by DBI supported DBMS), another module, which uses a binary file for
|
||||||
module, which uses a binary file for storage and a DBM module.
|
storage and a DBM module. There are also two modules available which
|
||||||
There are also two modules available which uses a text file.
|
uses a text file. Note supports since version 1.0.0 encryption(IDEA
|
||||||
Note supports since version 1.0.0 encryption(IDEA or DES)!
|
or DES)! And last but not least the PWSafe3 format is also supported
|
||||||
|
by the pwsafe3 backend, which is encrypted by default.
|
||||||
|
|
||||||
|
|
||||||
=head1 OPTIONS
|
=head1 OPTIONS
|
||||||
@@ -31,6 +32,9 @@ Note supports since version 1.0.0 encryption(IDEA or DES)!
|
|||||||
|
|
||||||
Use another config file than the default ~/.noterc.
|
Use another config file than the default ~/.noterc.
|
||||||
|
|
||||||
|
=item I<-n, --new>
|
||||||
|
|
||||||
|
Create a new note entry.
|
||||||
|
|
||||||
=item I<-l, --list [topic]>
|
=item I<-l, --list [topic]>
|
||||||
|
|
||||||
@@ -77,6 +81,10 @@ the specified ones.
|
|||||||
Dumps all notes to the textfile <file>. If <file> is a "-" it will
|
Dumps all notes to the textfile <file>. If <file> is a "-" it will
|
||||||
be printed out to standard output (STDOUT).
|
be printed out to standard output (STDOUT).
|
||||||
|
|
||||||
|
=item I<-j --json>
|
||||||
|
|
||||||
|
Use JSON format for exports created using -D. The importer determines
|
||||||
|
the format to be used automatically.
|
||||||
|
|
||||||
=item I<-I, --Import file | ->
|
=item I<-I, --Import file | ->
|
||||||
|
|
||||||
@@ -188,7 +196,7 @@ To delete note 1,2 and 3, use "-d 1-3".
|
|||||||
If you cannot remember, which note you are looking for, you
|
If you cannot remember, which note you are looking for, you
|
||||||
can use the search capability of note: "note -s <searchstring>".
|
can use the search capability of note: "note -s <searchstring>".
|
||||||
note will search the whole note database case insensitive for
|
note will search the whole note database case insensitive for
|
||||||
an occurence of this string and tell you the number and first-
|
an occurrence of this string and tell you the number and first-
|
||||||
line it has.
|
line it has.
|
||||||
|
|
||||||
You can extend the searchstring using B<AND>, B<OR> ( and ) and
|
You can extend the searchstring using B<AND>, B<OR> ( and ) and
|
||||||
@@ -206,9 +214,9 @@ display it's second line.
|
|||||||
These rules apply for the interactive search too.
|
These rules apply for the interactive search too.
|
||||||
|
|
||||||
You need to know, that note searches for the expression in every
|
You need to know, that note searches for the expression in every
|
||||||
note. In other words, "moses AND lenin" searches for an occurence
|
note. In other words, "moses AND lenin" searches for an occurrence
|
||||||
of "moses" and "lenin" in ONE note. Or, if you are looking for
|
of "moses" and "lenin" in ONE note. Or, if you are looking for
|
||||||
"mike OR daniel", then it searches for an occurence of "mike" or
|
"mike OR daniel", then it searches for an occurrence of "mike" or
|
||||||
daniel" in ONE note. Thus a note with the text "mike oldfield" will
|
daniel" in ONE note. Thus a note with the text "mike oldfield" will
|
||||||
match that search.
|
match that search.
|
||||||
|
|
||||||
@@ -316,8 +324,8 @@ You can achieve the same result by simply pressing enter at any time.
|
|||||||
You can create a new note by simply pressing B<N> or B<n>. You favorite
|
You can create a new note by simply pressing B<N> or B<n>. You favorite
|
||||||
editor will be started and you can enter your note text. If you are already
|
editor will be started and you can enter your note text. If you are already
|
||||||
under a topic then this new note will automatically go to this topic.
|
under a topic then this new note will automatically go to this topic.
|
||||||
note adds an aditional line to the top of the note with the topic. But
|
note adds an additional line to the top of the note with the topic. But
|
||||||
you can of course specify your own topic.
|
you can, of course, specify your own topic.
|
||||||
|
|
||||||
Note will tell you which number it has assigned to the newly created note.
|
Note will tell you which number it has assigned to the newly created note.
|
||||||
|
|
||||||
@@ -338,7 +346,7 @@ Say if you delete 1 and 2, then 3 will become 1, 4 will become 5 and so forth.
|
|||||||
|
|
||||||
=item B<S [expression]>
|
=item B<S [expression]>
|
||||||
|
|
||||||
You can search for the occurence of a text in your notes-database with the
|
You can search for the occurrence of a text in your notes-database with the
|
||||||
command B<S> or B<s>. If you omit an expression note will ask you for one.
|
command B<S> or B<s>. If you omit an expression note will ask you for one.
|
||||||
|
|
||||||
If your search criteria matches on exactly one entry, note will display
|
If your search criteria matches on exactly one entry, note will display
|
||||||
@@ -393,14 +401,14 @@ Quit note.
|
|||||||
|
|
||||||
You can also dump the contents of your note-database into a
|
You can also dump the contents of your note-database into a
|
||||||
ASCII-textfile(I<-D>). You can use this file later to import it into
|
ASCII-textfile(I<-D>). You can use this file later to import it into
|
||||||
your note-database(-I). This is usefull, if you want quickly trans-
|
your note-database(-I). This is useful, if you want quickly trans-
|
||||||
fer your notes from one host to another (i.e. you could mail
|
fer your notes from one host to another (i.e. you could mail
|
||||||
your note-dump form your office to home and import it there
|
your note-dump form your office to home and import it there
|
||||||
for further use).
|
for further use).
|
||||||
|
|
||||||
The dumps from the two versions of note are in the same format.
|
The dumps from the two versions of note are in the same format.
|
||||||
Using dumps it is also possible to reinitialize your database. You
|
Using dumps it is also possible to reinitialize your database. You
|
||||||
can use the "-o" switch whcih causes note to overwrite your existing
|
can use the "-o" switch which causes note to overwrite your existing
|
||||||
database. This is very handy if you changed heavily your config. And
|
database. This is very handy if you changed heavily your config. And
|
||||||
it is required, if you changed: encryption, db-driver, (binary-format)
|
it is required, if you changed: encryption, db-driver, (binary-format)
|
||||||
and the password. You can use the following command for reinitializing:
|
and the password. You can use the following command for reinitializing:
|
||||||
@@ -414,7 +422,7 @@ What the hell, does this do?! Step by step:
|
|||||||
=item *
|
=item *
|
||||||
|
|
||||||
B<note -D -> creates a note-database dump and prints it out
|
B<note -D -> creates a note-database dump and prints it out
|
||||||
to stantdard output.
|
to standard output.
|
||||||
|
|
||||||
=item *
|
=item *
|
||||||
|
|
||||||
@@ -466,8 +474,8 @@ character. Here are the available things, you can do:
|
|||||||
|
|
||||||
The text will be formatted using the actually note-color.
|
The text will be formatted using the actually note-color.
|
||||||
|
|
||||||
The hidden formatting will use blue forground and blue background
|
The hidden formatting will use blue foreground and blue background
|
||||||
to hide a string from the terminal, which is usefull for passwords.
|
to hide a string from the terminal, which is useful for passwords.
|
||||||
|
|
||||||
If you set "FormatText" to I<simple> then the formatting can be
|
If you set "FormatText" to I<simple> then the formatting can be
|
||||||
done this way instead:
|
done this way instead:
|
||||||
@@ -534,6 +542,6 @@ T.v.Dein <tlinden@cpan.org>
|
|||||||
|
|
||||||
=head1 VERSION
|
=head1 VERSION
|
||||||
|
|
||||||
1.3.20
|
1.4.0
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
Reference in New Issue
Block a user