Giter Club home page Giter Club logo

Comments (7)

deefrawley avatar deefrawley commented on August 28, 2024 1

The general converter uses a hardcoded conversion table so doesn't download anything. For the currency one I think the best thing is to set the XML file timeout to longer with a setting so it uses the local file instead of downloading. I'll work on it over the christmas break and also see if I can optimise the code further as well..

from flow.launcher.plugin.currency.

rp1231 avatar rp1231 commented on August 28, 2024

Hi,
Also regarding the explanation you provided on the Flow github page regarding this plugin.
"The delay is the plugin going and downloading the XML file of currency rates. It won't do this if the file was downloaded within the last two hours (subsequent calls should be quicker). I can look at adding a windows notification through Flow of the download, extend the shelf life of the XML file or both"

Would it be possible to have the xml updated at regular intervals in the background so that it doesn't download it when called.

Also just a thought, but maybe an option could be added in the settings field to select the update rate for the currencies.
I don't need the currencies to be updated every two hours and would be ok with them being updated even every 12 hours.

Thanks.

from flow.launcher.plugin.currency.

deefrawley avatar deefrawley commented on August 28, 2024

Sure, I'll look in to regular background jobs. If not the setting is a great idea - python plugins having access to a settings page is relatively new so I haven't implemented that yet. Was thinking of having a setting where you can set your currency and if only one currency code is entered it defaults to that.

from flow.launcher.plugin.currency.

rp1231 avatar rp1231 commented on August 28, 2024

Just wanted to add that there is a minute delay even when the xml is updated.
I don't know if this is because the plugin starts calculating the difference between the two currencies
when the second currency is entered.

Here is the link for the plugin that I used on Wox and it has instantaneous results:
https://github.com/encyclist/CurrencyConversion
This one gives a list of results the moment the first currency is entered.

Not sure if you would be concerned with such a minute delay.
But have linked to the plugin for reference,
Just in case it would be something you would be interested in looking at.

Thanks

from flow.launcher.plugin.currency.

deefrawley avatar deefrawley commented on August 28, 2024

Hmmm, it would seem there may be something wrong with your install. The plugin takes 4 seconds to update the file on my PC and subsequent calls are near instantaneous. The plugin you listed also goes and downloads a rates file from the internet to convert.
Are other Flow python plugins slow for you? Are you using your own Python install or letting Flow download it?

from flow.launcher.plugin.currency.

rp1231 avatar rp1231 commented on August 28, 2024

I'm using my own Python install.

The difference I'm talking about is a very minute difference.
It's the difference between instantaneous and near instantaneous.
Even when the xml is updated, It takes a second for the converted value to show up.

I'm not really sure which of the other plugins are python ones.
but the general convertor works fine for me (Which I just realized is by you as well)
It's instantaneous.

from flow.launcher.plugin.currency.

deefrawley avatar deefrawley commented on August 28, 2024

The time it waits before refreshing the rates file is now configurable so you can have less downloading but with the current framework there is no way to update the rates file in the background so there is still the delay when it does. The new flox library I am using is being updated constantly so if this becomes possible, I'll add it in.

from flow.launcher.plugin.currency.

Related Issues (17)

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.