Idea: Currency converter

Would be great to be able to highlight a currency and get a popup of conversion into your preferred currency. Just like how the default translate works. :smiling_face_with_three_hearts:

3 Likes

Great suggestion, thank you!

1 Like

Iā€™m interested in gathering examples of the kind of input that might be fed to a Currency converter extension. Iā€™m thinking symbols, number formats, etc. Can you post examples of any specific texts you might select and want to convert?

Hey Nick, sure. Iā€™ll just add some here:

$2,000
$2000
2,000 USD
2000 USD
15ā‚¬
15 ā‚¬
ā‚¬15
ā‚¬15,50 (the use Commas in Europe, where we use Full stop in UK)
15,50 EUR
12.50 NOK
12.50 AED
Ā£8.50

Iā€™ll add more when I can think of them. Hope this helps.

1 Like

Perfect, this stuff really helps. Getting the intended behavour right is really the hardest part of these things. Actually making it work is the easy part, usually.

Some working notes:

As I thought, there is an ISO standard for currency codes: ISO 4217 - Currency Codes

Also it seems this JS library might be some help: currency-symbol-map - npm

Just need to figure out a data source for the exchange rates. Ideally a public API with a reasonable free tierā€¦ there seem to be loads of them: https://openexchangerates.org/ is one.

This looks nice: money.js / fx() - javascript currency conversion library
As does this: https://currency.js.org/

1 Like

Hi Nick,

@bobacks examples look good.

Iā€™m just adding cents example: $8.80
I extracted it from amazon.com, where I often need to convert before buying.

1 Like

Yeah, Iā€™m pretty sure every currency has a decimal point (could be wrong). I just listed a few different currency types.

This would be super useful.

As an input, this kind of thing would be helpful:
20USD in yen
Ā£5 in yen
CAD199.99 in yen
EUR50 in yen
15,000円 in USD

Here in Japan we actually donā€™t have a decimal point in the currency (except in currency trading and the stock market), so some rounding might be handy. Although Iā€™m used to doing it myself. :sweat_smile:

How about a user specification as a fallback if thereā€™s no ā€˜toā€™ currency specified?
Like, if mine is set to yen, this:
USD20
ā€¦would always result in a conversion to yen (hopefully with rounding), whereas this:
Ā„2000 to USD
ā€¦would convert to the specified ā€˜toā€™ currency.

Hmm, it would also need to know that when I say Ā„ I mean yen and not yuan (RMB)ā€¦

Or even sweeter:
2000 to USD
ā€¦understanding that I want to convert from yen, because thatā€™s my specified default.

1 Like

Indeed, my thinking is that the extension will have an option with a drop-down to select a ā€œtargetā€ currency. All conversions would be performed to that target currency.

Adding the ā€œinā€ / ā€œtoā€ I hadnā€™t actually though of, but makes sense as a tool to assist writing.

it would also need to know that when I say Ā„ I mean yen and not yuan (RMB)

Good point. The same would apply to $ which could be canadian dollar or australian dollar. Iā€™m sure there are other examples.

Thanks for the input @cfryal, and @vinicius !

1 Like

Hi @nick thank you for considering to build this into PopClip. Has there been any updates on this currency converter PopClip extension?

Keep up the great work :pray:

1 Like

Nope but this thread will be the first to know!

3 Likes

Some other examples it could use:

ā‚¹69.91 billion

US$930 million

1 Like

Please add my vote to this idea.
I expected this to be in the extensions list already.

Edit: I made it work with the help of Raycast Snippet you posted. But a dedicated currency extension will be nicer.

2 Likes

hi! I was wondering whether there was any update on this one!
If not, I would try to develop something quick and rough, for a fixed conversion rate (my use case is converting miles to money). What would be your suggestions on how to it? Which language should I use?

cheers!
M

Hi @cfryal,

This solution isnā€™t for Popclip, but I had a similar issue and found Raycast useful. With Raycast (free tier, no subscription), I can quickly type commands like ā€œ2 yuan to yenā€ and get the conversion, with the option to copy it by hitting Enter.

Other examples:

"2 USD yen" ā†’ Ā„298
"one million USD to yuan" ā†’ Ā„7,066,204
"2 cents to pound" ā†’ Ā£0.01

Hope this helps!
JB