jeppestaerk / alfred-currency-conversion

Alfred 4 Workflow - See foreign exchange rates and currency conversion
MIT License
178 stars 23 forks source link

can not add favorite currency list #26

Open simlegate opened 2 years ago

simlegate commented 2 years ago

It's correct to setup base currency.

image

But it seem to can not recognize this command curcon LIST.

image

Is there some wrong operation for me?

Node: v17.9.0 Alfred: 4.6.4 Powerpack alfred-currency-conversion: 0.2.0

simlegate commented 2 years ago

It seems that the new feature Set your own favorite currency list is not included in version 0.2.0. Is there deadline to release new version?

MartinMalinda commented 2 years ago

Yes, when I install this it seems like the code is quite different from master. I don't get the favoriteCurrencies.

I hover made this change in the source:

const topCurrencies = process.env['CURRENCIES'] ?
  process.env['CURRENCIES'].split(',') :
  ["USD", "EUR", "JPY", "GBP", "CHF", "CAD", "AUD"];
const allCurrencies = ["AUD", "BGN", "BRL", "CAD", "CHF", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HRK", "HUF", "IDR", "ILS", "INR", "ISK", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PLN", "RON", "RUB", "SEK", "SGD", "THB", "TRY", "USD", "ZAR"];
const currencies = [...new Set([...topCurrencies, ...allCurrencies])];

And I set comma separated currencies in environment variables and that works for me. I guess I might lose this change on update but I don't mind that much.

lidoror commented 2 years ago

how can I paste it into the workflow?

MartinMalinda commented 2 years ago

Screenshot 2022-07-26 at 9 31 03 Screenshot 2022-07-26 at 9 31 46

There you can find the source. Good luck!

lidoror commented 2 years ago

did you replaced all three variable for it to work?

MartinMalinda commented 2 years ago

yes! I also set an environmenta variable

https://user-images.githubusercontent.com/9468793/180970315-a31fb71c-8e07-4b1a-9bdf-199705987c51.mov