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//
                then it appears "invisible" by using blue forground and blue
                background color for displaying. This is handy for passwords
                since no nobody can grab you password by looking at your
                monitor, but you can copy&paste it.
This commit is contained in:
TLINDEN
2012-02-10 20:29:18 +01:00
parent 850a892bfb
commit a43f27d328
6 changed files with 34 additions and 13 deletions

View File

@@ -1,3 +1,12 @@
================================================================================
1.2.3:
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//
then it appears "invisible" by using blue forground and blue
background color for displaying. This is handy for passwords
since no nobody can grab you password by looking at your
monitor, but you can copy&paste it.
================================================================================
1.2.2:
FIXED: oneliner note entries caused breaked displaying in interactive

4
README
View File

@@ -1,4 +1,4 @@
note 1.2.2 by Thomas Linden, 04/03/2003
note 1.2.3 by Thomas Linden, 08/03/2003
=======================================
Introduction
@@ -202,4 +202,4 @@ and I'll add you.
Last changed
============
04/03/2003
08/03/2003

7
TODO
View File

@@ -4,4 +4,9 @@
- ncurses support
- readline/editline support for interactive prompt
with: completion and history
with: completion and history
- LOCKing support, so that multiple people can use
note simultaneously while not interfering with
each other

View File

@@ -1 +1 @@
1.2.2
1.2.3

View File

@@ -126,7 +126,7 @@ $TIME_COLOR = "blue";
$TOPIC_COLOR = "bold";
$TOPIC = 1;
$TopicSep = '/';
$version = "1.2.2";
$version = "1.2.3";
if ($TOPIC) {
$CurDepth = 1; # the current depth inside the topic "directory" structure...
}
@@ -178,6 +178,7 @@ $AUTO_CLEAR = "YES";
'whiteI' => '7;37',
'white_black' => '40;37;01',
'bold' => ';01',
'hide' => '44;34'
);
#
@@ -1181,18 +1182,22 @@ sub format {
# make text bold/underlined/inverse using current $NOTEC
my($note) = @_;
if ($FormatText) {
my $BN = uc($NOTEC);
# prepare colors to be used for replacement
my $BN = uc($NOTEC);
my $_BN = uc($_NOTEC);
my $UN = $NOTEC;
$UN =~ s/<(.*)>/<$1_>/;
$UN =~ s/<(.*)>/<$1_>/;
my $_UN = $UN;
$_UN =~ s/<(.*)>/<\/$1>/;
my $IN = $NOTEC; my $_IN = $_NOTEC;
$IN =~ s/<(.*)>/<$1I>/;
$_IN =~ s/<(.*)>/<$1I>/;
$_UN =~ s/<(.*)>/<\/$1>/;
my $IN = $NOTEC;
my $_IN = $_NOTEC;
$IN =~ s/<(.*)>/<$1I>/;
$_IN =~ s/<(.*)>/<$1I>/;
$note =~ s/\*\*([^\*^\*]*)\*\*/$BN$1$_BN/g;
$note =~ s/__([^_^_]*)__/$UN$1$_UN/g;
$note =~ s/{{([^}^}]*)}}/$IN$1$_IN/g;
$note =~ s#//([^/^/]*)//#<hide>$1</hide>#g;
}
$note =~ s/(<\/.*>)/$1$NOTEC/g;
$note;

View File

@@ -447,10 +447,12 @@ character. Here are the available things, you can do:
bold: **word**
underlined:__word__
inverse:{{word}}
hidden: //word//
The text will be formatted using the actually note-color.
The hidden formatting will use blue forground and blue background
to hide a string from the terminal, which is usefull for passwords.
=head1 ENCRYPTION
@@ -503,6 +505,6 @@ Thomas Linden <tom@daemon.de>
=head1 VERSION
1.2.2 (04/03/2003)
1.2.3 (08/03/2003)
=cut