0.4.1
Added presets.
Presets
There are default presets:
echo " 1" | pl strip
# 1
echo "1,2,3" | pl split ,
['1', '2', '3']
echo "a,b,c" | pl split , | pl list 0
# a
You can set your own presets:
$XONTRIB_PIPELINER_PRESETS = {
"upper": "line.upper()",
"repeat": lambda args: f"line*int({repr(args[0])})"
}
echo 'hello' | pl upper
# HELLO
echo 'hey \nhi ' | pl repeat 3
# hey hey hey
# hi hi hi