Coder Social home page Coder Social logo

brpaz / ulauncher-currency Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 7.0 970 KB

Ulauncher Extension to convert an amount between currencies. Conversion rates provided by Fixer.

License: MIT License

Makefile 18.36% Python 81.64%
ulauncher ulauncher-extension

ulauncher-currency's Introduction

Ulauncher Currency Extension

Ulauncher Extension to convert an amount between currencies. Conversion rates provided by Fixer.

Demo

demo

Requirements

Install

Open ulauncher preferences window -> extensions -> add extension and paste the following url:

https://github.com/brpaz/ulauncher-currency

After installing the extension, go to the extension settings and input your Fixer Access Token. You can get one from Fixer website. The free plan is enough for this extension to work. It has a limit of 1000 requests per month which should be more than enough for you.

Example Usage

currency 20 USD TO EUR

currency 100 GBP TO XOF

Development

make link

To see your changes, stop ulauncher and run it from the command line with: ulauncher -v.

## Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ’› Support the project

If this project was useful to you in some form, I would be glad to have your support. It will help to keep the project alive and to have more time to work on Open Source.

The sinplest form of support is to give a โญ๏ธ to this repo.

You can also contribute with GitHub Sponsors.

GitHub Sponsors

Or if you prefer a one time donation to the project, you can simple:

Buy Me A Coffee

๐Ÿ“ License

Copyright ยฉ 2020 Bruno Paz.

This project is MIT licensed.

ulauncher-currency's People

Contributors

boris-petrov avatar brpaz avatar munim avatar noam09 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ulauncher-currency's Issues

Port extension to Ulauncher 5

Ulauncher 5 (of which development builds are already available) will ship the Python 3 version only. As a result, all extensions have to be ported to Python 3, and also the new Ulauncher Extension API v2.

See more details here

Ulauncher Currency Converter not working on laptop but working on desktop?

hi,

I've Ubuntu on my desktop and I have Ulauncher Currency Converter working, I tried the same API key on Pop OS! on my laptop and it gets stuck on loading when I try to convert a currency... I've tried uninstalling and re-installing

sudo add-apt-repository ppa:agornostal/ulauncher

sudo apt install launcher

If I get the API key and paste it into the browser a webpage loads with a list of currency so it must be working fine.

What could be the problem?

2021-06-29--10-51

Aliases for currencies

Feature proposal:
Wouldn't it be nice to match currencies' names as well, as given e.g. in https://fixer.io/symbols?
E.g. so that currency 20 yen to eur also works, instead of needing jpy
In some cases this might be undetermined, like e.g. currency 20 dollar to eur, but then you could show a list of possible currencies to select from as output.

[Bug]: Stopped working

Description?

Its not showing any results only showing "Loading" after entering the expression

Extension Logs

No response

API Key won't work

image

The extension won't accept the API key from my fixer.io account for some reason. I tried resetting the key and using a new one, only to get the same error.

Error to convert any currency to bitcoin

Hi, i found an error when you try to covent any currency to BTC (bitcoin), for example $20 usd to btc, allways show 0.0 BTC, i think its the decimal fractions in the code output, only happens whit BTC, i try to covert usd to other "low" currencies to compare and works perfect the output issue its only with BTC.

Thanks and your extension its fantastic!

[Bug]: Fixer has Currency API under a subscription now.

Description?

While using free api I always get the below error. Upon further investigation it seems like the pricing mode for Fixer has changed. Now currency conversion is paid. https://apilayer.com/marketplace/fixer-api#pricing

Extension Logs

traceback (most recent call last):
  File "/home/ishmeet1995/.local/share/ulauncher/extensions/com.github.brpaz.ulauncher-currency/main.py", line 85, in on_event
    value = extension.convert_currency(amount, from_currency,
  File "/home/ishmeet1995/.local/share/ulauncher/extensions/com.github.brpaz.ulauncher-currency/main.py", line 46, in convert_currency
    raise ConversionException(response['error']['info'])
ConversionException: You have not supplied a valid API Access Key. [Technical Support: [email protected]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/api/client/Client.py", line 54, in on_message
    self.extension.trigger_event(event)
  File "/usr/lib/python3/dist-packages/ulauncher/api/client/Extension.py", line 52, in trigger_event
    action = listener.on_event(event, self)
  File "/home/ishmeet1995/.local/share/ulauncher/extensions/com.github.brpaz.ulauncher-currency/main.py", line 101, in on_event
    description=e.message,
AttributeError: 'ConversionException' object has no attribute 'message'

Default currency

One of the main use-cases for me is checking how much some amount of money is in "my" currency. It would be nice if there was an option of "default currency". Then if you write 20 EUR and nothing else, it could assume you meant 20 EUR to ${default_currency}. It could also substitute 100 to EUR by 100 ${default_currency} to EUR.

Error click on link to get API Key

When it click on link to get a key to Fixer.io API, the website is opening in the same ULauncher's window.

screenshot from 2019-02-26 17-19-59

I was looking for in other links (eg.: link to repo) and every links to open in the browsers window.

[FEATURE] Cache results to avoid multiple requests

Hello,

I have implemented my own currency converter with an inspiration from this extension so that it caches results in order to avoid multiple requests and also speed up the results.
I thought maybe I can adapt my code to yours and make a pull request to support this feature.

  • There is an option in the preferences for
    • No caching, 1 day, 1/2 weeks, 1 month, 1 year
  • Allow multiple results like "10 EUR TO USD,CAD,AUD"
  • Fetch the 10 most common currencies (if caching enabled) in one request and store them for future use so no further requests are made.

Let me know if you are interested in something like that.

Cheers,
Here is my repo https://github.com/tchar/ulauncher-currency-converter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.