cointop-sh / cointop

A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀
https://cointop.sh
Apache License 2.0
3.94k stars 309 forks source link

Open custom link with a symbol #283

Closed n1s closed 2 years ago

n1s commented 2 years ago

Hi,

How about introducing opening custom link with hotkey Shift+O with %s placeholder containing coin symbol.

For example I would like to open tradingview chart - the link is as follows https://www.tradingview.com/chart/?symbol=BITSTAMP%3ABTCUSD

so in cointop this could be https://www.tradingview.com/chart/?symbol=%sUSDT

so it opens https://www.tradingview.com/chart/?symbol=ADAUSDT when cardano is highlighted

I think this could be helpful feature

lyricnz commented 2 years ago

Maybe we could implement this using a format-string given the context of the Coin, fix maximum flexability.

customLinkFormat: "https://www.tradingview.com/chart/?symbol={coin.Symbol}USDT"

That way we can potentially use other attributes of Coin (name, id, price, holdings, etc) if required...

Similar to #149 / #154

lyricnz commented 2 years ago

Would you need this in addition to the current "open in browser" capability, or would this be an alternate/configurable target?

lyricnz commented 2 years ago

Have a gander at #284

miguelmota commented 2 years ago

Example link in config

alt_coin_link = "https://www.tradingview.com/symbols/{{SYMBOL}}USD/"

Available tags:

Link can be opened with ctrl+o

miguelmota commented 2 years ago

Closed by https://github.com/cointop-sh/cointop/pull/284