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:
@ -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")
|
||||
|
Reference in New Issue
Block a user