-
Posts
8,759 -
Joined
-
Last visited
-
Days Won
522
deanishe last won the day on September 28 2023
deanishe had the most liked content!
Contact Methods
-
Twitter
@deanishe
Profile Information
-
Location
Essen
-
Interests
Go, Python, beer
Recent Profile Visitors
deanishe's Achievements
Advanced Member (5/5)
1.7k
Reputation
-
Alan He reacted to a post in a topic: What's the difference between {query} and argv input modes?
-
csaborio reacted to a post in a topic: How to delete Safari bookmark from Alfred
-
gr8 reacted to a post in a topic: Add Event or Todo to BusyCal
-
devalias reacted to a post in a topic: FR: Markdown Snippets
-
devalias reacted to a post in a topic: FR: Markdown Snippets
-
devalias reacted to a post in a topic: Alfred env variable for keyword trigger
-
roosterboy reacted to a post in a topic: Workflows: Add QuickLook as an output action, or as a Browser for Open URL action
-
MattAndersen reacted to a post in a topic: How to exclude one app from Alfred default search
-
bongobong reacted to a post in a topic: Is there a way can fuzzy search the existing workflow in your alfred by name or keyword.
-
joshuadwagner reacted to a post in a topic: Write Text File to folder selected from list
-
juliosecco started following deanishe
-
Kristin Lynch started following deanishe
-
Problem with workflows that use Python –
deanishe replied to itsmevictor's topic in Discussion & Help
You should have searched the forum… Apple removed /usr/bin/python in the last minor release of macOS. The forum is full of messages about broken Python workflows. You can't symlink to /usr/bin unless you turn off the SIP security system (not recommended). The long and short of it is, you or somebody else will probably have to port the workflow to Python 3 -
Newbie question - Workflows relying on Python 2
deanishe replied to CWM's topic in Discussion & Help
The only people who think that are the ones who think developer convenience trumps user convenience. I do not. I think asking normal users to unnecessarily install developer tools is very poor practice. People should of course feel free to use whichever languages they want (it’s their time, not mine), but please do not minimise the huge inconvenience of asking regular, non-technical users to install developer tools. Go read any of the threads for Node-based workflows that aren't aimed at developers and see all the fun it leads to. A pretty minor change? No non-trivial Python 2 program runs unchanged under Python 3. The one, massive, break-the-world change in Python 3 was how text processing works, which is most of what workflows do. Yes, yes they did. But there was still nothing minor about the change. -
Alfred PDF Tools – Optimize, encrypt and manipulate PDF files
deanishe replied to xilopaint's topic in Share your Workflows
@xilopaint You should open an issue on the library's bug tracker. It claims to support 3.7+. Also, like Vítor says, there is no Python 3 on macOS by default, so I wouldn't sweat over using a Homebrew Python instead of an Apple one. The Apple one is slightly preferable, as the devtools are easier to install than Homebrew. -
Just google any porting guide. Python 3 has been around since 2008 (though I’d argue it wasn’t usable till a decade later…), so there’s plenty of material available. In most cases, you might need to change a couple of import statements, but the majority of the work will be rewriting the string processing. Seeing as this is the meat-and-potatoes of what most workflows do, many ports will end up closer to rewrites.
-
Newbie question - Workflows relying on Python 2
deanishe replied to CWM's topic in Discussion & Help
Python 3 isn't actually there on a normal system. It's part of Apple's developer tools. So you can't just add /usr/bin/python3 to the dropdown list. -
Newbie question - Workflows relying on Python 2
deanishe replied to CWM's topic in Discussion & Help
That's because Apple never bothered to include Python 3 with macOS. But sure, blame workflow developers for using the tools Apple gave them. -
solved Script Filter: How to specify multiple modifier keys?
deanishe replied to nlippman's topic in Workflow Help & Questions
Use a plus sign to combine modifiers: cmd+shift -
That's highly dependent. With a good connection and not too many files, sure. But if Dropbox just started up and is still scanning all your files, it can take some time for changes to sync. Using remote server-based software to sync between two local accounts seems highly sub-optimal, too. Or does LAN sync also work between two clients running on the same machine?
-
Hotkey to access the first link in a Google search page?
deanishe replied to adross's topic in Discussion & Help
Hi @adross, welcome to the forum. Your question isn't about Alfred, it's about your browser. It's possible that someone can help you, anyway, but you haven't even told us which browser you're talking about… -
It's not a standard package, so you should bundle it with the workflow. Asking non-technical users to install software libraries when you could easily bundle them isn't great. And, that's not a great way to install requests, either. You should always call pip via /path/to/python -m pip, so you know which Python you’re installing the packages in. There’s no telling what will get called if you just run pip because different Pythons all want to use /usr/local/bin/pip and will overwrite each other. Alfred also doesn’t use the same PATH as your shell, so python won’t be the same command in Alfred as in a shell. So use the full path to the Python executable. Finally, you shouldn’t install packages globally like that. Install them in your user-specific library folder, so you aren’t changing the system and don’t need admin rights: /path/to/python -m pip install --user requests
-
Help with getting output from AppleScript to JSON?
deanishe replied to Smpl's topic in Workflow Help & Questions
It's "JXA", not "JXE". JavaScript for Automation. To return JSON from a JXA script, you usually want return JSON.stringify(myResultsObject) in your run function. -
Making Script Filter `uid`s unique to each session
deanishe replied to vitor's topic in Workflow Help & Questions
PID is an ideal one for this case. Let the OS guarantee the uniqueness. I’d also recommend this technique (caching a value in an environment variable) for passwords stored in Keychain. Calling /usr/bin/security is slow, but you don’t want to store passwords in plaintext. So do password = get_env_var('varname') or get_and_export_keychain_password('account name', 'varname') to ensure /usr/bin/security is only called once instead of every time the Script Filter is run. -
Could you explain what problem this solves? I mean, it's trivial (and preferable) to truncate your array of results before sending them to Alfred if you only want to show N results. Why isn't that an acceptable solution? What's the issue with there being a lot of (possibly) unwanted results off screen below the top nine? Alfred can handle tens of thousands of items no problem, so performance can't be the issue.
-
solved External script using google zx
deanishe replied to sirris's topic in Workflow Help & Questions
As a rule, the solution Vítor suggested (altering PATH) is a much better one. Adjusting the local environment to a script is preferable to hardcoding a script to a specific environment.