Update to v2.2:

New: Allow for the value of other entries to be in the 'sed' command of a
       filter. (May break existing configurations in cases where sed command
       uses a '%'.)
This commit is contained in:
Ian Jauslin 2023-03-21 20:13:35 -04:00
parent aacbf51475
commit 70bba87946
6 changed files with 16 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2.2:
* New: Allow for the value of other entries to be in the 'sed' command of a
filter. (May break existing configurations in cases where sed command
uses a '%'.)
2.1.5: 2.1.5:
* Fixed: Properly escape entries with a '%' * Fixed: Properly escape entries with a '%'

View File

@ -1,4 +1,4 @@
## Copyright Ian Jauslin 2015-2022 ## Copyright Ian Jauslin 2015-2023
## ##
## Licensed under the Apache License, Version 2.0 (the "License"); ## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License. ## you may not use this file except in compliance with the License.

2
NOTICE
View File

@ -1,2 +1,2 @@
BBlog BBlog
Copyright Ian Jauslin 2015-2022 Copyright Ian Jauslin 2015-2023

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
## Copyright Ian Jauslin 2015-2022 ## Copyright Ian Jauslin 2015-2023
## ##
## Licensed under the Apache License, Version 2.0 (the "License"); ## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License. ## you may not use this file except in compliance with the License.
@ -18,7 +18,7 @@
enginedir=/usr/share/BBlog/engines enginedir=/usr/share/BBlog/engines
# version # version
version=2.1.5 version=2.2
function print_config { function print_config {
echo "engine: $engine" echo "engine: $engine"
@ -222,7 +222,8 @@ function replace_format {
# apply filter # apply filter
if [ -n "$filter" ]; then if [ -n "$filter" ]; then
sed_cmd=$(eval "echo \$filter_$filter") # replace '%' inside filter text
sed_cmd=$(replace_format $(eval "echo \$filter_$filter"))
replacement=$(eval "echo \$$field" | sed -r "$sed_cmd" ) replacement=$(eval "echo \$$field" | sed -r "$sed_cmd" )
else else
replacement=$(eval "echo \$$field") replacement=$(eval "echo \$$field")

View File

@ -1,5 +1,5 @@
.Dd $Mdocdate: September 9 2022 $ .Dd $Mdocdate: March 21 2022 $
.Dt BBLOG 2.1.5 .Dt BBLOG 2.2
.Os .Os
.Sh NAME .Sh NAME
.Nm BBlog .Nm BBlog
@ -194,6 +194,6 @@ automatically adds a letter (from 'b' to 'z') at the end of non-unique tokens, i
.Nm .Nm
was written by Ian Jauslin. was written by Ian Jauslin.
.Sh COPYRIGHT .Sh COPYRIGHT
copyright Ian Jauslin 2015-2022 copyright Ian Jauslin 2015-2023
.Sh SEE ALSO .Sh SEE ALSO
.Sx BBlog-sqlite Ns (7) .Sx BBlog-sqlite Ns (7)

View File

@ -32,7 +32,7 @@ label of the reference
.Sh AUTHORS .Sh AUTHORS
The sqlite BBlog engine was written by Ian Jauslin. The sqlite BBlog engine was written by Ian Jauslin.
.Sh COPYRIGHT .Sh COPYRIGHT
copyright Ian Jauslin 2015-2022 copyright Ian Jauslin 2015-2023
.Sh SEE ALSO .Sh SEE ALSO
.Sx BBlog Ns (1) , .Sx BBlog Ns (1) ,
.Sx sqlite3 Ns (1) .Sx sqlite3 Ns (1)