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(){
|
activities(){
|
||||||
echo Current Page: 1
|
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' \
|
echo $API_ACTIVITES \
|
||||||
| 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
|
||||||
while true; do
|
while true; do
|
||||||
echo ""
|
echo ""
|
||||||
echo Total Pages: $PAGETOTAL
|
echo Total Pages: $PAGETOTAL
|
||||||
@ -482,8 +485,10 @@ activities(){
|
|||||||
display_banner && display_name && display_userinfo
|
display_banner && display_name && display_userinfo
|
||||||
echo Current Page: $PAGENO
|
echo Current Page: $PAGENO
|
||||||
curl -s -b $COOKIE $BML_URL/activities?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' \
|
| 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
|
| 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" ]
|
elif [ "$PAGENO" -gt "$PAGETOTAL" ]
|
||||||
then
|
then
|
||||||
display_banner && display_name && display_userinfo
|
display_banner && display_name && display_userinfo
|
||||||
@ -498,6 +503,7 @@ activities(){
|
|||||||
echo Enter x to go back
|
echo Enter x to go back
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
services(){
|
services(){
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user