huwwp / cryptop

command line crypto portfolio
MIT License
235 stars 40 forks source link

Adding cli call, json output #37

Open lecler-i opened 7 years ago

lecler-i commented 7 years ago

Is it possible to add a parameter to be able to call cryptop and have the infos formatted in JSON on stdout ?

So we can use the data in various script. It should be very easy (depend on how did you implement your cache)

Thanks in advance!

huwwp commented 7 years ago

The json only stores the coins and holdings, no values, it would be the same as cat ~/.cryptop/wallet.json or with better formatting cat ~/.cryptop/wallet.json | python -m json.tool

What are you trying to do?

lecler-i commented 7 years ago

Is it possible to add a call to cryptop for this? So it update the values if needed?

On 14 August 2017 4:57:51 AM GMT+02:00, huwwp notifications@github.com wrote:

The json only stores the coins and holdings, no values, it would be the same as cat ~/.cryptop/wallet.json or with better formatting cat ~/.cryptop/wallet.json | python -m json.tool

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/huwwp/cryptop/issues/37#issuecomment-322089609

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

bakman2 commented 6 years ago

@huwwp I will try to elaborate on @lecler-i - he is suggesting an output option like eg.

cryptop -output json which only outputs json with the coin & value (at the moment of the call). This could be very useful for scripting and whatnot.

lecler-i commented 6 years ago

@bakman2 Exactly.... Sorry for the poor english