eoscanada / eosc

Cross-platform EOSIO command-line swiss-army-knife (EOS, BOS, Telos, Worbli, etc.)
https://eosc.app
MIT License
134 stars 59 forks source link

standarize output #155

Closed str closed 3 years ago

str commented 3 years ago

Pushing the transaction to Jungle, the output I get is:


Transaction submitted to the network.
  bd69ef0828de9b99ee48f113bd6d74b80c0416710de5a15fad5b53acd0847881

BUT, when pushing the same transaction to mainnet, I get


Transaction submitted to the network.
  https://eosq.app/tx/bd69ef0828de9b99ee48f113bd6d74b80c0416710de5a15fad5b53acd0847881

Can we please standarize the output to make it easier to read by a script, please?

maoueh commented 3 years ago

I do no think standardize the output would be a good initiative, support a JSON format is much more stable and future proof like you suggested in #154. So I'll close this issue because it's not something we are going to do.

What kind of scripting are you doing? Quick and dirty bash scripts? As a workaround you could do:

eosc ... | grep -E "(tx/)?[0-9a-f]{64}" | grep -Eo "[0-9a-f]{64}"

The eosc library is mostly a thin CLI wrapper around github.com/eoscanadacom/eth-go library, so you could use Golang to script your stuff. The JavaScript eosjs library can also be used also in case you are working on this language, the library is not from us, but has a similar feature set.