sbotc INLINE message replacing space ' ' whith comma ',' ??? #6

Closed
opened 2020-05-13 21:02:39 +02:00 by qo-op · 2 comments
Owner

sbotc message from ./zen/ssb_INIT.sh

[CODE] Make json templates for SSB modular messages
To facilitate SSB message protocol enhancement should create json part templates to make modular dialog.

sbotc message from ./zen/ssb_INIT.sh [CODE] Make json templates for SSB modular messages To facilitate SSB message protocol enhancement should create json part templates to make modular dialog.
Author
Owner

Both method replace space with comma??

export LC_ALL=C.UTF-8 #attipix
export LANG=C.UTF-8 #attipix
DUNITERNODE=$($MY_PATH/tools/duniter_getnode.sh)
[[ $DUNITERNODE ]] && g1balance=$(silkaj -p $DUNITERNODE balance $g1pub 2>&1) || g1balance=$(silkaj balance $g1pub 2>&1)

# SSB PUBLISH G1 wallet silkaj balance 
# TODO FIND WHY THIS ***** COMA , IS EVERYWHERE NOT PUBLSHING silkaj


json_escape () {
    printf '%s' "$1" | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))'
}


INLINE=$(json_escape "$g1balance")
[[ $INLINE ]] && sbotc publish '{"type":"post","text":'$INLINE'}'

INLINE="${g1balance@Q}"
[[ $INLINE ]] && sbotc publish '{"type":"post","text":"'$INLINE'"}'

https://comma.ai

Both method replace space with comma?? ``` export LC_ALL=C.UTF-8 #attipix export LANG=C.UTF-8 #attipix DUNITERNODE=$($MY_PATH/tools/duniter_getnode.sh) [[ $DUNITERNODE ]] && g1balance=$(silkaj -p $DUNITERNODE balance $g1pub 2>&1) || g1balance=$(silkaj balance $g1pub 2>&1) # SSB PUBLISH G1 wallet silkaj balance # TODO FIND WHY THIS ***** COMA , IS EVERYWHERE NOT PUBLSHING silkaj json_escape () { printf '%s' "$1" | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))' } INLINE=$(json_escape "$g1balance") [[ $INLINE ]] && sbotc publish '{"type":"post","text":'$INLINE'}' INLINE="${g1balance@Q}" [[ $INLINE ]] && sbotc publish '{"type":"post","text":"'$INLINE'"}' ``` https://comma.ai
Author
Owner

... SSB connector is over...
Waiting for better stability

... SSB connector is over... Waiting for better stability
qo-op closed this issue 2020-12-03 01:51:16 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: axiom-team/astroport#6
No description provided.