Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: stakhanov on February 11, 2011, 04:32:22 PM



Title: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 11, 2011, 04:32:22 PM
I made a simple plasmoid to display the current exchange rate at Mt. Gox on KDE (a desktop environment for linux). You can download it from KDE look: http://kde-look.org/content/show.php?content=138572

Enjoy!

PS: Donations welcome! 1LZtiyC7DsUWhoQaPXyWnVPD5f6eiruZFL


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: wizeman on February 11, 2011, 06:41:27 PM
I made a simple plasmoid to display the current exchange rate at Mt. Gox on KDE (a desktop environment for linux). You can download it from KDE look: http://kde-look.org/content/show.php?content=138572

Sounds great :)

But.. is it just me, or is the ZIP file empty?   ???


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 11, 2011, 06:48:27 PM
It's not just you... Bummer!

Thanks for reporting, I'll look into it.


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 11, 2011, 06:53:18 PM
OK, it should be fixed now.


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: Cryptoman on February 12, 2011, 03:52:40 AM
How does one install it?


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 12, 2011, 08:47:40 AM
How does one install it?

Download the zip file, unzip it, and type:

Code:
plasmapkg -u btcRate

Then the plasmoid should be available when you select "Add new widgets" from the desktop or the panel. Let me know if it works!


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: Cryptoman on February 12, 2011, 04:08:49 PM
It installed fine, but when I went to add it to the desktop I got the following message:

Quote
This object could not be created for the following reason: Script initialization failed

I'm running OpenSUSE 11.3, KDE 4.4.4.


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 12, 2011, 04:11:08 PM
Could you run it with the following command, and paste me any error mesages? Thanks for testing, by the way!

Code:
plasmoidviewer btcRate


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: Cryptoman on February 12, 2011, 04:54:33 PM
Code:
> plasmoidviewer btcRate
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
Traceback (most recent call last):
  File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 75, in init
    self.pyapplet.init()
  File "/home/user/.kde4/share/apps/plasma/plasmoids/btcRate/contents/code/main.py", line 29, in init
    self.compute_rate()
  File "/home/user/.kde4/share/apps/plasma/plasmoids/btcRate/contents/code/main.py", line 60, in compute_rate
    self.label.setText(u"BTC: {:.2f}$".format(rate/weights))
ValueError: zero length field name in format


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 12, 2011, 05:28:39 PM
I think the problem is that you have python 2.6. I have uploaded a new version that should work better.


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: Cryptoman on February 12, 2011, 05:49:43 PM
Indeed, I have 2.6.5.  It works great now!  I sent you a donation.


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 12, 2011, 05:57:54 PM
Thanks!! I'm glad it finally worked out. Getting even a simple piece of software to work on other people's computers is hard!


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 13, 2011, 09:54:24 AM
Thanks to the generous anonymous donor who sent me 1.26BTC!  :)


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: unclescrooge on February 13, 2011, 02:49:44 PM
Hello and thanks for the plamsoid.


I wonder, why does your script call for gettrades.php and not tickers.php? Wouldn't the last one be easier to read?

Also, could you add the volume to the plasmoid, so we can juge the liquidity of the market too?

Thank you very much
Raphy


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 13, 2011, 03:59:16 PM
Thanks for taking a look!

Could you give the full URL for tickers.php? I haven't been able to find that page.

I think I could add the volume info as a mousover popup. I'd also like to add a trend with rate of change, but I haven't figured out yet how to estimate these robustly.


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: unclescrooge on February 13, 2011, 04:27:26 PM
Thanks for taking a look!

Could you give the full URL for tickers.php? I haven't been able to find that page.

I think I could add the volume info as a mousover popup. I'd also like to add a trend with rate of change, but I haven't figured out yet how to estimate these robustly.

Here's the adress: http://mtgox.com/code/data/ticker.php (http://mtgox.com/code/data/ticker.php)

And the content looks like this:
Code:
{"ticker":{"high":1.08,"low":1.0103,"vol":3741,"buy":1.033,"sell":1.0599,"last":1.033}}

Pretty simple huh?

Thanks for your dev


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 13, 2011, 04:31:20 PM
Ah, I see, thanks.

I prefer taking the full getTrades.php file, because I compute a time-weighted average rather than the last trade. But I could use the ticker file to display additional information.


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: stakhanov on February 13, 2011, 04:33:27 PM
I've just uploaded a new version. It doesn't show additional info yet, but it should improve the display in some cases, and refresh faster if you turn your computer on and off a lot like I do.


Title: Re: Bitcoin exchange rate plasmoid for KDE
Post by: breandan81 on February 14, 2011, 02:20:15 AM
that's pretty cool, thanks