albertlauncher / albert

A fast and flexible keyboard launcher
https://albertlauncher.github.io
Other
7.22k stars 303 forks source link

Unit converter plugin? #134

Closed elcste closed 6 years ago

elcste commented 8 years ago

It would be great to have a unit converter, e.g. "200 g in oz" or "400 F in C". I miss it from Krunner. Currency (1 eur in usd) would be nice too, but that would need a live data source.

Just a suggestion. :-)

ManuelSchneid3r commented 8 years ago

Cool, for now try wolfram alpha with the '=' trigger

elcste commented 8 years ago

Thanks for the tip and for albert!

ManuelSchneid3r commented 7 years ago

Do you know a good library for this?

elcste commented 7 years ago

Speaking as a user, the one used by krunner is excellent: https://github.com/KDE/kunitconversion. If I'm reading it right it only requires KF5I18n beyond Qt5, but I could be missing something.

On Tue, Jan 17, 2017, at 17:04, Manuel Schneider wrote:

Do you know a good library for this?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/albertlauncher/albert/issues/134#issuecomment-273329458

kirkegaard commented 7 years ago

I could really use this! I need currency convertion a lot. Right now im using Albert along with dmenu. I have a little snippet that converts currency for me in dmenu but would really love to have this in Albert so i can ditch dmenu.

wget -qO- "http://www.google.com/finance/converter?a=$1&from=$2&to=$3" | sed '/res/!d;s/<[^>]*>//g';

ManuelSchneid3r commented 7 years ago

@kirkegaard What is $1 @Fuhrmann Didn't you try something similar?

ManuelSchneid3r commented 7 years ago

Ah amount I guess :D

kirkegaard commented 7 years ago

Oh yeah sorry! Forgot to add that :)

kirkegaard commented 7 years ago

Actually maybe a plugin that integrated with googles "i feel lucky" would be great since it understands statements like "10 usd in dkk" or "200 g in oz" like @elcste wrote.

I know that gg does a google search but if we could have the result inside albert, that would be amazing :)

ManuelSchneid3r commented 7 years ago

Not a good idea :D

Our systems have detected unusual traffic from your computer network. Please try your request again later.

ManuelSchneid3r commented 7 years ago

auswahl_002

https://github.com/albertlauncher/external/blob/master/org.albert.extension.external.currency.sh

ManuelSchneid3r commented 7 years ago

@kirkegaard I used your oneliner to make an extension. Its in the new script repo.

idkCpp commented 7 years ago

albertlauncher/external#10

This plugin can be easily extended by editing the UNITS dict. But I'd love to get these extended tables PRed to the repo please... Just for completeness reasons...

ManuelSchneid3r commented 7 years ago

I guess this one can be closed

elcste commented 7 years ago

Is there a trick to getting this to work? I've cloned the external repo*, but only some of the external plugins show up in Albert, most importantly here, not this one. I'm using v.0.12.0 from the Webupd8 PPA in case that matters.


* As an aside, when I run the suggested command o install the external plugins, it fails with these messages

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

but I got it work after changing it to use https:

git clone https://github.com/albertlauncher/external.git "$HOME/.local/share/albert/external/"

My git usage is basically limited to git clone, so it definitely could be something I'm doing wrong ;-)

ManuelSchneid3r commented 7 years ago

Run albert from the terminal. There should be thr error messages. V0.13 will improve this

elcste commented 7 years ago

Thanks! I didn't have units installed :-P

TheBlackKoala commented 6 years ago

Is there a new plugin in python? :D (The link was to the old discontinued repository).

ManuelSchneid3r commented 6 years ago

Check the python extensions