Difference between revisions of "BitcoinPrice (Gnome extension)"

From Organic Design wiki
m
m (Nad moved page Extension:BitcoinPrice (Gnome extension) to BitcoinPrice (Gnome extension) without leaving a redirect)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is my first [[Gnome]] extension which collects the current Mt Gox [[Bitcoin]] price and displays it next to the clock in the main Gnome panel. The code is available in our extensions repository [http://svn.organicdesign.co.nz/listing.php?repname=extensions&path=%2FBitcoinPrice%2F here].
+
[[File:Btc price extension.png]]
  
First the code needs to be placed into your extensions directory in the path '''~/.local/share/gnome-shell/extensions/''', and the extension directory should be renamed from '''BitcoinPrice''' to '''BitcoinPrice@organicdesign.co.nz'''. This is probably the wrong way to go about installing it, but I'm a total noob at Gnome extensions, so haven't figured out the right ways of doing things yet!
 
  
Also I didn't know how to make it check the Mt Gox API URL on a regular interval, so currently you have to call a Python one-liner on a cron job using something like the command below in '''/etc/crpntab'''. The extension expects the price to be in a file called '''.btcprice.txt''' in your home directory.
+
This is my first [[Gnome]] extension which collects the current Mt Gox [[Bitcoin]] price and displays it next to the clock in the main Gnome panel. It can be installed in the usual way from the Gnome extensions site [https://extensions.gnome.org/extension/754/bitcoin-price/ here]. The code is open source and is available from our extensions repository [http://svn.organicdesign.co.nz/listing.php?repname=extensions&path=%2FBitcoinPrice%2F here] or our GitHub mirror [https://github.com/OrganicDesign/extensions/tree/git-svn/BitcoinPrice here].
{{code|<pre>*/5 * * * * nad /home/nad/.local/share/gnome-shell/extensions/BitcoinPrice@organicdesign.co.nz/mtgox-price.py > /home/nad/.btcprice.txt</pre>}}
 
  
Here's what it looks like when it's running:
+
== How it works ==
 +
It checks the [http://mtgox.com/api/1/BTCUSD/ticker Mt. Gox BTCUSD ticker] every two minutes which returns about 1KB of JSON encoded data from which the script extracts the current price from and places onto the main panel bar by the clock.
  
[[File:Btc price extension.png]]
+
== Todo ==
 +
*<s>"Reload Now" button</s>
 +
*<s>Bitcoin icon to the left of the price</s>
 +
*<s>Pref for currency</s>
 +
*Pref for position in the panel (left, centre, right)
 +
*Pref for update period
 +
*Pref for data source (Blockchain, MtGox, Bitstamp, BTC-E etc)
  
 +
== See also ==
 +
*[[GNOME]]
 +
*[[Bitcoin]]
 
[[Category:Extensions]]
 
[[Category:Extensions]]

Latest revision as of 14:50, 22 October 2014

Btc price extension.png


This is my first Gnome extension which collects the current Mt Gox Bitcoin price and displays it next to the clock in the main Gnome panel. It can be installed in the usual way from the Gnome extensions site here. The code is open source and is available from our extensions repository here or our GitHub mirror here.

How it works

It checks the Mt. Gox BTCUSD ticker every two minutes which returns about 1KB of JSON encoded data from which the script extracts the current price from and places onto the main panel bar by the clock.

Todo

  • "Reload Now" button
  • Bitcoin icon to the left of the price
  • Pref for currency
  • Pref for position in the panel (left, centre, right)
  • Pref for update period
  • Pref for data source (Blockchain, MtGox, Bitstamp, BTC-E etc)

See also