1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-27 09:08:25 +00:00

Add almost all stock data yahoo provides

This commit is contained in:
Nikolas Garofil 2010-04-24 14:57:04 +02:00
parent 45d63c7fba
commit 00c869a2bf
2 changed files with 51 additions and 1 deletions

View File

@ -3281,7 +3281,7 @@
<option>symbol data</option>
</term>
<listitem>Displays the data of a stock symbol. The following data
is supported: adv(Average Daily Volume),ask,asksize,bid,askrt(ask realtime),bidrt(bid realtime),bookvalue,bidsize,change,commission,changert(change realtime),ahcrt(After Hours Change realtime),ds(dividend/share),ltd(Last Trade Date),tradedate,es(earnings/share),ei(error indication),epsecy(EPS Estimate Current Year),epseny(EPS Estimate Next Year),epsenq(EPS Estimate Next Quarter),floatshares,dayslow,dayshigh,52weeklow,52weekhigh,hgp(Holdings Gain Percent),ag(Annualized Gain),hg(Holdings Gain),hgprt(Holdings Gain Percent realtime),hgrt(Holdings Gain realtime),moreinfo,obrt(Order Book realtime)
is supported: adv(Average Daily Volume),ask,asksize,bid,askrt(ask realtime),bidrt(bid realtime),bookvalue,bidsize,change,commission,changert(change realtime),ahcrt(After Hours Change realtime),ds(dividend/share),ltd(Last Trade Date),tradedate,es(earnings/share),ei(error indication),epsecy(EPS Estimate Current Year),epseny(EPS Estimate Next Year),epsenq(EPS Estimate Next Quarter),floatshares,dayslow,dayshigh,52weeklow,52weekhigh,hgp(Holdings Gain Percent),ag(Annualized Gain),hg(Holdings Gain),hgprt(Holdings Gain Percent realtime),hgrt(Holdings Gain realtime),moreinfo,obrt(Order Book realtime),mc(Market Capitalization),mcrt(Market Cap realtime),ebitda,c52wlow(Change From 52-week Low),pc52wlow(Percent Change From 52-week Low),cprt(change percent realtime),lts(Last Trade Size),c52whigh(Change from 52-week high),pc52whigh(percent change from 52-week high),ltp(last trade price),hl(high limit),ll(low limit),dr(day's range),drrt(day's range realtime),50ma(50-day Moving Average),200ma(200-day Moving Average),c200ma(Change From 200-day Moving Average),pc200ma(Percent Change From 200-day Moving Average),c50ma(Change From 50-day Moving Average),pc50ma(Percent Change From 50-day Moving Average),name,notes,open,pc(previous close),pricepaid,cip(change in percent),ps(price/sales),pb(price/book),edv(Ex-Dividend Date),per(P/E Ratio),dpd(Dividend Pay Date),perrt(P/E Ratio realtime),pegr(PEG Ratio),pepsecy(Price/EPS Estimate Current Year),pepseny(Price/EPS Estimate Next Year),symbol,sharesowned,shortratio,ltt(Last Trade Time),tradelinks,tt(Ticker Trend),1ytp(1 yr Target Price),volume,hv(Holdings Value),hvrt(Holdings Value realtime),52weekrange,dvc(Day's Value Change),dvcrt(Day's Value Change realtime),se(Stock Exchange),dy(Dividend Yield)
<para /></listitem>
</varlistentry>
<varlistentry>

View File

@ -181,6 +181,56 @@ void stock_parse_arg(struct text_object *obj, const char *arg)
else if(!strcasecmp("hgrt", data)) strcpy(data, "g6");
else if(!strcasecmp("moreinfo", data)) strcpy(data, "i");
else if(!strcasecmp("obrt", data)) strcpy(data, "i5");
else if(!strcasecmp("mc", data)) strcpy(data, "j1");
else if(!strcasecmp("mcrt", data)) strcpy(data, "j3");
else if(!strcasecmp("ebitda", data)) strcpy(data, "j4");
else if(!strcasecmp("c52wlow", data)) strcpy(data, "j5");
else if(!strcasecmp("pc52wlow", data)) strcpy(data, "j6");
else if(!strcasecmp("cprt", data)) strcpy(data, "k2");
else if(!strcasecmp("lts", data)) strcpy(data, "k3");
else if(!strcasecmp("c52whigh", data)) strcpy(data, "k4");
else if(!strcasecmp("pc52whigh", data)) strcpy(data, "k5");
else if(!strcasecmp("ltp", data)) strcpy(data, "l1");
else if(!strcasecmp("hl", data)) strcpy(data, "l2");
else if(!strcasecmp("ll", data)) strcpy(data, "l3");
else if(!strcasecmp("dr", data)) strcpy(data, "m");
else if(!strcasecmp("drrt", data)) strcpy(data, "m2");
else if(!strcasecmp("50ma", data)) strcpy(data, "m3");
else if(!strcasecmp("200ma", data)) strcpy(data, "m4");
else if(!strcasecmp("c200ma", data)) strcpy(data, "m5");
else if(!strcasecmp("pc200ma", data)) strcpy(data, "m6");
else if(!strcasecmp("c50ma", data)) strcpy(data, "m7");
else if(!strcasecmp("pc50ma", data)) strcpy(data, "m8");
else if(!strcasecmp("name", data)) strcpy(data, "n");
else if(!strcasecmp("notes", data)) strcpy(data, "n4");
else if(!strcasecmp("open", data)) strcpy(data, "o");
else if(!strcasecmp("pc", data)) strcpy(data, "p");
else if(!strcasecmp("pricepaid", data)) strcpy(data, "p1");
else if(!strcasecmp("cip", data)) strcpy(data, "p2");
else if(!strcasecmp("ps", data)) strcpy(data, "p5");
else if(!strcasecmp("pb", data)) strcpy(data, "p6");
else if(!strcasecmp("edv", data)) strcpy(data, "q");
else if(!strcasecmp("per", data)) strcpy(data, "r");
else if(!strcasecmp("dpd", data)) strcpy(data, "r1");
else if(!strcasecmp("perrt", data)) strcpy(data, "r2");
else if(!strcasecmp("pegr", data)) strcpy(data, "r5");
else if(!strcasecmp("pepsecy", data)) strcpy(data, "r6");
else if(!strcasecmp("pepseny", data)) strcpy(data, "r7");
else if(!strcasecmp("symbol", data)) strcpy(data, "s");
else if(!strcasecmp("sharesowned", data)) strcpy(data, "s1");
else if(!strcasecmp("shortratio", data)) strcpy(data, "s7");
else if(!strcasecmp("ltt", data)) strcpy(data, "t1");
else if(!strcasecmp("tradelinks", data)) strcpy(data, "t6");
else if(!strcasecmp("tt", data)) strcpy(data, "t7");
else if(!strcasecmp("1ytp", data)) strcpy(data, "t8");
else if(!strcasecmp("volume", data)) strcpy(data, "v");
else if(!strcasecmp("hv", data)) strcpy(data, "v1");
else if(!strcasecmp("hvrt", data)) strcpy(data, "v7");
else if(!strcasecmp("52weekrange", data)) strcpy(data, "w");
else if(!strcasecmp("dvc", data)) strcpy(data, "w1");
else if(!strcasecmp("dvcrt", data)) strcpy(data, "w4");
else if(!strcasecmp("se", data)) strcpy(data, "x");
else if(!strcasecmp("dy", data)) strcpy(data, "y");
else {
NORM_ERR("\"%s\" is not supported by $stock. Supported: adv,ask,asksize,bid", data);
return;