From 70bba87946c263d6c92545107e3d9f45f8d9c9df Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Tue, 21 Mar 2023 20:13:35 -0400 Subject: 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 '%'.) --- Changelog | 6 ++++++ Makefile | 2 +- NOTICE | 2 +- bin/BBlog | 7 ++++--- man/man1/BBlog.1 | 6 +++--- man/man7/BBlog-sqlite.7 | 2 +- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Changelog b/Changelog index 8b6bd54..a3a9fef 100644 --- a/Changelog +++ b/Changelog @@ -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: * Fixed: Properly escape entries with a '%' diff --git a/Makefile b/Makefile index 9c4a750..273ca53 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -## Copyright Ian Jauslin 2015-2022 +## Copyright Ian Jauslin 2015-2023 ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/NOTICE b/NOTICE index 2693a53..11dda17 100644 --- a/NOTICE +++ b/NOTICE @@ -1,2 +1,2 @@ BBlog -Copyright Ian Jauslin 2015-2022 +Copyright Ian Jauslin 2015-2023 diff --git a/bin/BBlog b/bin/BBlog index 0c8b525..d646cd9 100755 --- a/bin/BBlog +++ b/bin/BBlog @@ -1,6 +1,6 @@ #!/bin/bash -## Copyright Ian Jauslin 2015-2022 +## Copyright Ian Jauslin 2015-2023 ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ enginedir=/usr/share/BBlog/engines # version -version=2.1.5 +version=2.2 function print_config { echo "engine: $engine" @@ -222,7 +222,8 @@ function replace_format { # apply filter 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" ) else replacement=$(eval "echo \$$field") diff --git a/man/man1/BBlog.1 b/man/man1/BBlog.1 index d233c03..21306cc 100644 --- a/man/man1/BBlog.1 +++ b/man/man1/BBlog.1 @@ -1,5 +1,5 @@ -.Dd $Mdocdate: September 9 2022 $ -.Dt BBLOG 2.1.5 +.Dd $Mdocdate: March 21 2022 $ +.Dt BBLOG 2.2 .Os .Sh NAME .Nm BBlog @@ -194,6 +194,6 @@ automatically adds a letter (from 'b' to 'z') at the end of non-unique tokens, i .Nm was written by Ian Jauslin. .Sh COPYRIGHT -copyright Ian Jauslin 2015-2022 +copyright Ian Jauslin 2015-2023 .Sh SEE ALSO .Sx BBlog-sqlite Ns (7) diff --git a/man/man7/BBlog-sqlite.7 b/man/man7/BBlog-sqlite.7 index c189d92..5e081b6 100644 --- a/man/man7/BBlog-sqlite.7 +++ b/man/man7/BBlog-sqlite.7 @@ -32,7 +32,7 @@ label of the reference .Sh AUTHORS The sqlite BBlog engine was written by Ian Jauslin. .Sh COPYRIGHT -copyright Ian Jauslin 2015-2022 +copyright Ian Jauslin 2015-2023 .Sh SEE ALSO .Sx BBlog Ns (1) , .Sx sqlite3 Ns (1) -- cgit v1.2.3-54-g00ecf