tchar / ulauncher-albert-calculate-anything

A ULauncher/Albert extension that supports currency, units and date time conversion, as well as a calculator that supports complex numbers and functions.
MIT License
103 stars 13 forks source link

[feature] Use the word "in" as alias for "to" in conversions #38

Open sebastian-65 opened 2 years ago

sebastian-65 commented 2 years ago

When 20 cm in inches is typed, I would expect the same result as for 20 cm to inches. (The same syntax is supported by Google search, so I'm used to it.)

Would be possible to add support for this as well? Thanks!

lgg commented 2 years ago

Really good idea, like it!

sebastian-65 commented 2 years ago

Also it would be nice to accept 20€ or 20 € same way as dollar sign, e.g. 20 $.

tchar commented 2 years ago

Hello,

Initially, the program took into account "in" as a keyword, but I opted to remove it because it was causing problems. The reason is that it can be interpreted as inches, so while you type if you write something like the following:

10 m in to kg: This can be interpreted as:

This might not be the best example but it is not easy to differentiate between in and to. I can try adding this back but I remember it was not a decision I liked but rather necessary to simplify things.

Because this project grew a bit and I don't have the time right now due to job requirements, I welcome anyone to do a PR with tests, etc if you want to contribute. In fact, I would be glad to have more people join this.

sebastian-65 commented 2 years ago

Thank you for your reply. I definitely see this might cause such issues. How about those euros?

I would love to contribute, however since I'm writing my first python scripts, you wouldn't be exactly pleased with results :sweat_smile: I hope I could write things like this in the future.

tchar commented 2 years ago

Thank you for your reply. I definitely see this might cause such issues. How about those euros?

I would love to contribute, however since I'm writing my first python scripts, you wouldn't be exactly pleased with results 😅 I hope I could write things like this in the future.

@sebastian-65 For the space in currency I have to check how to implement. I use pint for unit conversion and currency conversion. I have to check if pint can handle these.

However, this project is on hold for now. I am having a time shortage since I finished the main project and I don't know when I can continue the implementation.

github-actions[bot] commented 2 years ago

Issue has been marked as stale due to no activity