dfay Posted June 28, 2014 Posted June 28, 2014 (edited) A simple RPN calculator that works like the built-in calculator. Requires spaces as delimiters between elements in the expression. Built using deanishe's Alfred python library. e.g. 19 2.14 + 4.5 2 4.3 / - * produces an Alfred result: 85.2974418605 Action this item to copy this number to the clipboard There is a single keyword: rpn Download link: https://www.dropbox.com/s/9ay1z2mubifcun6/RPN Calculator.alfredworkflow?dl=0 2018-07-10: updated with working link 2020-07-26 updated with latest version of deanishe's Alfred python library. Edited July 26, 2020 by dfay FroZen_X and cands 2
curmudgeon Posted July 9, 2018 Posted July 9, 2018 Does this workflow still work on Alfred3? Link is broken. Would love to get a copy! Thanks!
dfay Posted July 10, 2018 Author Posted July 10, 2018 Haha it only took four years for someone to take an interest in this I've updated the link -- hope you find it useful. JimmyTheSaint and Vookimedlo 1 1
JimmyTheSaint Posted July 24, 2020 Posted July 24, 2020 I think it needs another update. I get this warning.
deanishe Posted July 24, 2020 Posted July 24, 2020 6 hours ago, JimmyTheSaint said: I think it needs another update. I get this warning. And why don't you follow the instructions to fix the workflow?
dfay Posted July 24, 2020 Author Posted July 24, 2020 (edited) No worries I’ll sort it out and post updated version. @done(2020-07-26) Edited July 26, 2020 by dfay JimmyTheSaint 1
mmazour Posted August 31, 2020 Posted August 31, 2020 @dfay Thank you, thank you! I am in your debt. I literally upgraded Alfred just for this. When I'm on Slack and need to complete a sentence like "we frobnicated 6,122,849 doodads between 8:28 and 12:49, a rate of one million every..." – which seems to be a lot of my life the past few weeks – there is nothing so useful as a good RPN calculator, and none so close to hand and fast to use as yours. Thank you. dfay 1
iApple Posted May 25, 2021 Posted May 25, 2021 @dfay, thanks for this workflow. FYI workflow needs "0" in front of decimal for it to work - for example "RPN 100 .1 *" would end up with wrong result, it needs "RPN 100 0.1 *". Is it by design or potential bug?
dfay Posted May 25, 2021 Author Posted May 25, 2021 I'd like to say it's by design but it's actually an artifact of the crazy regular expression in rpn.py line 42: ops = map(lambda y: y.replace(' ',''), re.split('\s|(?<!\d)[,.]|[,.](?!\d)',query)) deanishe 1
iApple Posted May 25, 2021 Posted May 25, 2021 Ok. Just have to be careful when entering decimal numbers, habit of keying without leading "0". Only discovered this "issue" when result came out too big. It interprets ".10" as "10" 😲
iApple Posted June 13, 2023 Posted June 13, 2023 Hi Updated OS to Ventura, now RPN workflow doesn't work. I have installed Python 3 so that could be reason? My technical skill is 2 out of 100, playing around with settings trying to make it work. Error message each run of RPN workflow ERROR: RPN Calculator[Script Filter] Code 127: /bin/bash: python: command not found Changed "language" to /usr/bin/python3 but getting this error ERROR: RPN Calculator[Script Filter] Code 1: xcode-select: note: No developer tools were found, requesting install. If developer tools are located at a non-default location on disk, use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, and cancel the installation dialog. See `man xcode-select` for more details. Do I need to install developer tools? Where do I download if it is required? Don't want to end up mindlessly installing if not required. Thanks
dfay Posted June 16, 2023 Author Posted June 16, 2023 HI I just updated it and posted it at https://github.com/derickfay/AlfredRPN this should work out of the box on Ventura. best Derick
iApple Posted June 16, 2023 Posted June 16, 2023 19 minutes ago, dfay said: I just updated it and posted it at https://github.com/derickfay/AlfredRPN Thanks Derick! Unfortunately link doesn't work
dfay Posted June 16, 2023 Author Posted June 16, 2023 Sorry - I hadn't changed the repo to be public - it is now. iApple 1
iApple Posted June 16, 2023 Posted June 16, 2023 42 minutes ago, dfay said: Sorry - I hadn't changed the repo to be public - it is now. Thanks Derick! Not many appreciate the efficiency of RPN calculators.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now