Currency Converter
KDE Plasma 4 Extensions
Score 71%
Description:

Convert currencies using data from Yahoo! Financial.

A simple Plasmoid created using PyQt and PyKDE4.

Features:

- Select to and/or from the dropdown list and the converted amount will be updated.

- Change the amount to be converted and TAB or click outside the Amount field
and the result will be updated.

- Selected currencies and amount is saved between sessions.

- Refreshing selected convertion when no activity for a user defined period of time.

- Current/last conversion result is shown in the tool tip when docked in the panel.

Install the Plasmoid:

plasmapkg -i ./currency-converter.plasmoid

Update the Plasmoid:

plasmapkg -u ./currency-converter.plasmoid

or add it from "Add Widgets"=>"Install New Widgets"=>"Download New Plasma Widgets"

TODO:

- Translations. Currently only Danish translations.

- Check version upgrade process: Is the config persistent?

- Credits label link doesn't launch web site.

- Dates aren't localized.

- Send notifications instead of showMessage.

- Better error detection on web service query.

- Create a Currency Converter Data Engine.

- Connect/emit settingsChanged in Settings.

- Show the most used currencies at top of list.

IDEAS (comments are welcome):

- Monitor currencies and notify on (...)

- Offer other services than Yahoo! Finance.
Last changelog:

4 years ago

- 0.6.1
- Use QDoubleValidator instead of KDoubleValidator which has been removed from pykde.
- 0.6
- The Plasmoid now finally docks in the panel using Plasma.PopupApplet.
- New icon! (cut'n'paste from other icons - hmmm).
- Only import required parts of the used modules. The functionalities such
as System Notifications and Network monitoring are now separate classes
which makes them reusable in my other Plasmoids.
- Fail gracefully on wrong KDE SC version.
- Fix for not detecting network on some distributions.
- Current/last conversion result is now shown in the tool tip when docked in the panel.
- Removed collapse/expand because it didn't work properly and current result can be seen in tooltip.
- Added context menu for updating current conversion.
- Added configuration for refresh/update interval.
- Improved KIO handling.
- Notification on network errors.
- Much improved error handling when no network connection using Solid. The Plasmoid
is now disabled until a connection is established instead of just giving up and dying ;-)
- Now using the KDE Currency classes (Only works from KDE SC 4.4.4).
- Showing Currency name first instead of currency code to make the easier to find in the list.

Changelog for earlier versions at https://github.com/tanghus/currency-converter-plasmoid/blob/master/Changelog


NOTE: If the download link doesn't work here's a direct link: https://github.com/tanghus/currency-converter-plasmoid/releases/download/v0.6.1/currency-converter-0.6.1.plasmoid

brig

1 year ago

Hi,
this plasmoid is very usefull and i hesitate to install new distro because of plasmoids not ported yet.his is the case with currency converter the plasmoid doesn't work anymore on plasma 5, seems to be a problem with python scripting not supported anymore by new platform. the plasmoid have to be ported in qml. is there a hope that you can port it or use the qml plasmoid for sailfish os as a basis to do this?
thank you

Report

maxkaspar

3 years ago

I'm on Arch Linux. Since the latest pyqt4 update (v4.11-2) it stopped working. It displays the message 'script initialization failed'.

Report

C

tanghus

3 years ago

Are you sure you have the python plasmoid script engine installed?
On Kubuntu it's called plasma-scriptengine-python.
Also try to test from CLI by running:

plasmoidviewer currency-converter

Report

osinclair

4 years ago

I would love to see this plasmoid use www.oanda.com , a site that is used "as default" by many organisations as they have almost all currencies on Earth

Report

C

tanghus

4 years ago

IANAL but the tos seems rather strict http://www.oanda.com/site/terms-of-use

Report

C

tanghus

4 years ago

In Kubuntu 13.10 and recent updates on 13.04 there have been some changes to pykde.
I currently don't have the time to properly test the plasmoid, but applying the patch below to ~/.kde/share/apps/plasma/plasmoids/currency-converter/contents/code/CurrencyConverter.py should fix it:

https://github.com/tanghus/currency-converter-plasmoid/commit/f0203c8858ca2fa1cf1b2482a7611931fbeb2e84

Report

fdservices

4 years ago

I use this all the time, and I only have one criticism. I have it set to an Update interval of 60 minutes. When I start up I think it tries to update before the connection is ready and then sits and waits for 60 minutes before the next update. Of course I can, and do, right-click and Update now, but if it could try the first update after a delay it would be better I think.

Andrew

Report

C

tanghus

4 years ago

Hi
Great to see someone's actually using this plasmoid :)
I haven't touched the code for like 2 years and am quite busy on other stuff. However the code is on github, and if you can patch it to do that, I will release an updated version https://github.com/tanghus/currency-converter-plasmoid

Report

fdservices

4 years ago

Thanks - wouldn't even know where to start :)

All the best

Andrew

Report

lemmy04

5 years ago

all i get is:
ImportError: No module named sipconfig
trying to use this on KDE 4.8.4 running on openSUSE 12.1.

any hints?

Report

C

tanghus

5 years ago

I believe sipconfig is distributed with PyQt4 and PyKDE4. Are you sure they are properly installed?

Report

lemmy04

5 years ago

yes, and i do have a sipconfig.py file on my system:
/usr/lib64/python3.2/site-packages/sipconfig.py

Report

lemmy04

5 years ago

I *am* noticing two things:

1. currency-converter appears TWICE in the output of "plasmapkg -l"

the error shows that stuff from python2.7 is used:

lemmy@sai:~/Downloads> plasmoidviewer currency-converter
Traceback (most recent call last):
File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 59, in init
self.module = __import__(self.pluginName+'.'+relpath)
File "/usr/share/kde4/apps/plasma_scriptengine_python/plasma_importer.py", line 107, in load_module
exec code in mod.__dict__
File "/users/lemmy/.kde4/share/apps/plasma/plasmoids/currency-converter/contents/code/main.py", line 40, in <module>
import PyKDE4.pykdeconfig
File "/usr/lib64/python2.7/site-packages/PyKDE4/pykdeconfig.py", line 25, in <module>
import sipconfig, PyQt4.pyqtconfig

Report

lemmy04

5 years ago

solved... i had the python3 qt and kde packages, but not the python 2.7 versions. works now.

Report

C

tanghus

5 years ago

Ah, glad it worked out :-)

Report

C

tanghus

5 years ago

Quote:1. currency-converter appears TWICE in the output of "plasmapkg -l"

I see that as well for several plasmoids actually. "plasmoidviewer --list" shows the right output.

Quote:the error shows that stuff from python2.7 is used:

lemmy@sai:~/Downloads> plasmoidviewer currency-converter
Traceback (most recent call last):
(...)
File "/users/lemmy/.kde4/share/apps/plasma/plasmoids/currency-converter/contents/code/main.py", line 40, in <module>
import PyKDE4.pykdeconfig


It seems the import PyKDE4.pykdeconfig isn't necessary. Can you try to comment it out and see if it still works for you?

Report

affan

6 years ago

it is really nice to see the currencies in the desktop. but i have a suggestions how about this:

1. just display the favorite currencies.
it is more neat i think. other currencies can be added from setting menu.

2. the currencies are from 2 or more sources and the results just like that either. for example:

1 Indian rupee V To: --- US Dollar V
1 AUS Dollar V To: --- US Dollar V
1 EURO V To: --- Swed. Krona V

V = is the drop down button
--- = is the result value

3. can be set to just display the actual result. for example:

--- USD (INR)
--- USD (AUD)
--- SEK (EUR)

4. the source is from multiple sources, such like IMF, oanda, and others.

5. can download a simple history graph just like yahoo finance but more plasmoid manner.

I got excited when see this plasmoid it's very future rich...:)
keep up the good work..

Report

C

tanghus

6 years ago

Thanks for the nice words and sorry for the late reply.

I have a new version of the Plasmoid which is almost ready to release. In that I have dropped the collapse/expand feature (didn't work properly) and instead it shows the latest result in a plasma tooltip on hover and the Applet on click (when it is docked in the panel).
I comment your suggestions below:

Quote:1. just display the favorite currencies. it is more neat i think. other currencies can be added from setting menu.
This is kind of how the new one will work, but only with one currency

Quote:2. the currencies are from 2 or more sources and the results just like that either. for example: (snipped)

It is my plan to have the most used currencies placed at the top of the drop down for easy access. This is about as far as I will go with this because I want to keep the Plasmoid as simple as possible.

Quote:4. the source is from multiple sources, such like IMF, oanda, and others.

This is definitely on my ToDo list allthough I hadn't written it down yet. Thanks :-)

Quote:5. can download a simple history graph just like yahoo finance but more plasmoid manner.

I'll have to think about this. I'm afraid it will be too complex especially when dealing with several web services. I could maybe provide a link to an online graph for the current currency pair.

Thanks for the comment and the good suggestions.

Report

ppenguin

7 years ago

I like it!

One feature however is necessary for usage with wireless: It should refresh when the link comes up (either automatically by notification or by polling, or on-click or something)

Now it blocks with "no network connection" as soon as I log in, before my wireless has come on line, and I have to remove the plasmoid and re-install it to be able to use it.

Report

C

tanghus

7 years ago

Thanks for the comment.
You are right about the refreshment on active link. I'd like to use Solid but not all of the signals are available in PyKDE (well, I haven't tested it on 4.4 yet).
I'll have a look at it sometime and see what I can do, and maybe I'll have to use polling though I'm not very pleased with that.

/Thomas

Report

ppenguin

7 years ago

thanks (and quick too ;)

Maybe the easiest (stop-gap) measure would be to refresh on-click then?

Report

gravy

7 years ago

Yes, it would be really nice to have a button refreshing it when connection goes up!

Report

Anywhere

8 years ago

It would be nice if I could "lock" the display. For example, when locked it would only display text of the last conversion (IE: "1 US Dollar = 46.8 Philippine Pesos"), but when unlocked the controls show and I can edit the amounts and change the currency types.

Report

C

tanghus

8 years ago

I'll have a look at it. For now I have no idea how to do this. The kde-bindings (scripting) is kinda limited, but maybe it's possible.
Please enter it as an issue at: http://code.google.com/p/currency-converter-plasmoid/issues/list

Report

4 years ago

- 0.6.1
- Use QDoubleValidator instead of KDoubleValidator which has been removed from pykde.
- 0.6
- The Plasmoid now finally docks in the panel using Plasma.PopupApplet.
- New icon! (cut'n'paste from other icons - hmmm).
- Only import required parts of the used modules. The functionalities such
as System Notifications and Network monitoring are now separate classes
which makes them reusable in my other Plasmoids.
- Fail gracefully on wrong KDE SC version.
- Fix for not detecting network on some distributions.
- Current/last conversion result is now shown in the tool tip when docked in the panel.
- Removed collapse/expand because it didn't work properly and current result can be seen in tooltip.
- Added context menu for updating current conversion.
- Added configuration for refresh/update interval.
- Improved KIO handling.
- Notification on network errors.
- Much improved error handling when no network connection using Solid. The Plasmoid
is now disabled until a connection is established instead of just giving up and dying ;-)
- Now using the KDE Currency classes (Only works from KDE SC 4.4.4).
- Showing Currency name first instead of currency code to make the easier to find in the list.

Changelog for earlier versions at https://github.com/tanghus/currency-converter-plasmoid/blob/master/Changelog


NOTE: If the download link doesn't work here's a direct link: https://github.com/tanghus/currency-converter-plasmoid/releases/download/v0.6.1/currency-converter-0.6.1.plasmoid

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.6.1
updated Nov 08 2013
added Oct 16 2009
downloads today
0
page views today 5