zefr0x / krunner-currency

A KRunner plugin for converting currency using DuckDuckGo spice API. You may also use a proxy, and you can use it as a python module.
GNU General Public License v3.0
2 stars 2 forks source link
converter currency currency-converter kde-plasma krunner python

Warning : This repository/project is no longer maintained. I'm no longer using KDE's KRunner. If you are interested in the plugin, it's free software under the GPL-3.0 license, so you can create a fork and do any thing you want with it.

If you want an alternative, Qalculate! is a good project, you can convert currencies using it.

Warning This plugin is not well tested and it should be improved. Don't use it for sensitive operations.

KRunner Currency

Get the runner from kde store

A KRunner plugin for converting currencies using DuckDuckGo spice API.

Installation

Dependencies

Install from the kde store

  1. Open system settings
  2. Go to search > KRunner
  3. Click on Get New Plugins...
  4. Search for the Plugin
  5. Click Install

    Uninstall

    Please run the uninstall script manually, because the GUI will remove the script before running it.

Usage

terms

You are able to use any type of the following terms:

Privacy

The amount to be converted will not be sent to the API, but it will query the value of 1 currency unit to get the rate, then it will do the conversion locally.

Using tor or any proxy

If i found a good reference for the Config method in KRunner i would've done this in a UI, but i didn't so you need to edit the source code for that feature.

Go to the source directory and open 'converter.py', then comment and uncomment the following lines:

Usage as a python module

import converter
convert = converter.Converter()

# Parsing the input then returning the result
term = "48.120 eur sa"
result = convert(term)
# Or giving direct data without the need te be parsed
# amount: float, from_currency: str, to_currency: str
result = convert.get_results(48.120, "EUR", "SAR")

Todo list