they call me the regex king
This commit is contained in:
parent
314e532414
commit
7574108e97
14
bml-cli
14
bml-cli
@ -470,8 +470,11 @@ api_activites(){
|
||||
################################################################################################
|
||||
activities(){
|
||||
echo Current Page: 1
|
||||
echo $API_ACTIVITES | jq -r '["Type","Date","Time","Contact","Amount","Remarks","Status"], ["=====","==========","=====","============","=======","==================","==========="],(.payload | .content | .data | .[] | [.type, .datetime, .creditName, .formattedAmount, .message, .status]) | @tsv' \
|
||||
| sed "s/+05:00//g" | perl -pe 's/((?<=\t)|(?<=^))\t/ \t/g;' "$@" | column -t -s $'\t' | exec less -F -S -X -K
|
||||
echo $API_ACTIVITES \
|
||||
| jq -r '["Type","Date","Time","Contact","Amount","Remarks","Status"], ["====","==========","=========","==========================","==============","==================","==========="],(.payload | .content | .data | .[] | [.type, .datetime, .creditName, .formattedAmount, .message, .status]) | @tsv' \
|
||||
| sed "s/+05:00//g" \
|
||||
| sed 's/\([0-9]\{4\}-[0-9][0-9]-[0-9][0-9]\)T\([0-9][0-9]:[0-9][0-9]:[0-9][0-9]\)/\1 \2/g' \
|
||||
| perl -pe 's/((?<=\t)|(?<=^))\t/ \t/g;' "$@" | column -t -s $'\t' | exec less -F -S -X -K
|
||||
while true; do
|
||||
echo ""
|
||||
echo Total Pages: $PAGETOTAL
|
||||
@ -482,8 +485,10 @@ activities(){
|
||||
display_banner && display_name && display_userinfo
|
||||
echo Current Page: $PAGENO
|
||||
curl -s -b $COOKIE $BML_URL/activities?page=$PAGENO \
|
||||
| jq -r '["Type","Date","Time","Contact","Amount","Remarks","Status"], ["=====","==========","=====","============","=======","==================","==========="],(.payload | .content | .data | .[] | [.type, .datetime, .creditName, .formattedAmount, .message, .status]) | @tsv' \
|
||||
| sed "s/+05:00//g" | perl -pe 's/((?<=\t)|(?<=^))\t/ \t/g;' "$@" | column -t -s $'\t' | exec less -F -S -X -K
|
||||
| jq -r '["Type","Date","Time","Contact","Amount","Remarks","Status"], ["====","==========","=========","==========================","============","==================","==========="],(.payload | .content | .data | .[] | [.type, .datetime, .creditName, .formattedAmount, .message, .status]) | @tsv' \
|
||||
| sed "s/+05:00//g" \
|
||||
| sed 's/\([0-9]\{4\}-[0-9][0-9]-[0-9][0-9]\)T\([0-9][0-9]:[0-9][0-9]:[0-9][0-9]\)/\1 \2/g' \
|
||||
| perl -pe 's/((?<=\t)|(?<=^))\t/ \t/g;' "$@" | column -t -s $'\t' | exec less -F -S -X -K
|
||||
elif [ "$PAGENO" -gt "$PAGETOTAL" ]
|
||||
then
|
||||
display_banner && display_name && display_userinfo
|
||||
@ -498,6 +503,7 @@ activities(){
|
||||
echo Enter x to go back
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
services(){
|
||||
echo ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user