Acidham Posted April 26, 2019 Share Posted April 26, 2019 (edited) Dependencies Default App uses duti to change assigned apps. You need to install duti first before you execute the Alfred Workflow brew install duti Usage dapp ext 1. ext you can type any extension, the workflow will ask for confirmation to change the assigned app 2. Choose one of the Apps to assign the extension to. Download on Git https://github.com/Acidham/alfred-default-app Edited April 26, 2019 by Acidham xilopaint and deanishe 2 Link to comment
Acidham Posted April 26, 2019 Author Share Posted April 26, 2019 (edited) Finally fixed a bug that joined the code and added OneUpdater! Edited April 26, 2019 by Acidham vitor 1 Link to comment
xilopaint Posted April 27, 2019 Share Posted April 27, 2019 Why don't you use a Script Filter for the second step? Link to comment
Acidham Posted April 27, 2019 Author Share Posted April 27, 2019 7 hours ago, xilopaint said: Why don't you use a Script Filter for the second step? Because it was too late yesterday. 😂 Version 1.0 is now available and ported to Python 🤗 I hope there is no new bug 🤨 ... let me know how it goes... Link to comment
deanishe Posted April 27, 2019 Share Posted April 27, 2019 3 hours ago, Acidham said: ported to Python Where did you get Alfred.py from? That's some really old-school looking code. Link to comment
Acidham Posted April 27, 2019 Author Share Posted April 27, 2019 4 minutes ago, deanishe said: Where did you get Alfred.py from? That's some really old-school looking code. Thanks 😢 I created for my own once I started with Python&Alfred. Since it does the Job I never touched it...even if I am not sure if I ever can write high-polished code 😕 Link to comment
deanishe Posted April 27, 2019 Share Posted April 27, 2019 (edited) 19 minutes ago, Acidham said: Thanks 😢 I didn't say, and certainly didn't mean, "bad". I just asked because of the old-style classes. I think most Python programmers these days don't even know they exist. There's absolutely nothing wrong with the code. The style is just kinda old-school (old-style classes, camelCase). Edited April 27, 2019 by deanishe Link to comment
Acidham Posted April 27, 2019 Author Share Posted April 27, 2019 Just now, deanishe said: I just asked because of the old-style classes. I think most Python programmers these days don't even know they exist. 😳 really? can you point me to newer-style format or at least what old-style is in my class? Now you made me curious ...and, no worries, every feedback is welcome hand helps...thx for that! Link to comment
deanishe Posted April 27, 2019 Share Posted April 27, 2019 (edited) 25 minutes ago, Acidham said: can you point me to newer-style format or at least what old-style is in my class? New-style classes inherit from object, e.g. class Item(object):. I don't remember what difference it actually makes (other than Python 3 doesn't support old-style classes), just that in about 2002 they said "you should use new-style classes from now on." Here are the technical details. Similarly, PEP 8, the official Python style guide came out in 2001 and said that we should all use PascalCase for class names and snake_case for everything else. So you tend to only see camelCase in very old code (like plistlib.readPlist from the standard library, or the Twisted library, which has also been around forever). Edited April 27, 2019 by deanishe Link to comment
Acidham Posted April 27, 2019 Author Share Posted April 27, 2019 Ok got it, but this is mostly based coincidences. For class Item(object) I did not saw the need therefore I ignored it I started with snake_case but then I felt a bit lost aka I was not able to see the differences between variables and methods so I switch to PascalCase. But now I am on the way to switch to snake_case. Furthermore PyCharm always notified me about my old style 😕 Thank you for your pointers! I made now the decision to take care of the new_style in the future! Link to comment
Dave_H Posted May 1, 2019 Share Posted May 1, 2019 Hey, It doesn't seem to work by my side. Entering dapp just returns a contact that I've saved as such, but entering a file extension ater it does nothing. Am I missing a step ? Link to comment
Acidham Posted May 1, 2019 Author Share Posted May 1, 2019 (edited) Did you install duti ? Any WF debug Info when executing ? Edited May 1, 2019 by Acidham Link to comment
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