-
Posts
8,525 -
Joined
-
Last visited
-
Days Won
712
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by vitor
-
-
17 hours ago, John H said:
Making an assumption you speak Portuguese
I do, yes, though that expression is Brazilian and I’m Portuguese. We would say “És o maior!” (literally “you’re the biggest”).
17 hours ago, John H said:it's chugging along now.
Great! The clue was that ls worked for you in a Terminal but the diagnostics wasn’t finding any paths. This is a good example of why it’s useful to always send it.
-
Just now, John H said:
ls -R in /Volumes/GoogleDrive works fine and dumps thousands of listings
Change google_drive_path back to /Volumes/GoogleDrive and run diagnostics again.
But first, is Alfred listed and selected in System Preferences → Security & Privacy → Privacy → Full Disk Access?
-
As far as the system can see, there are no paths in that directory. If you do ls -R /Volumes/GoogleDrive, you’ll only find the top directories. Are you sure you can see the files in the Finder? That looks something exclusive to your Google Drive setup. You’ll have to figure out what is different/wrong with it.
-
Change google_drive_path to /Volumes/GoogleDrive/My Drive and try again.
-
4 hours ago, Travis Schmeisser said:
It can't find the python command after installing it…?
What’s the output of ls -la "${HOMEBREW_PREFIX}/bin/python"?
1 hour ago, Larrikin said:That's easy to remove as you can even just type pyenv uninstall 2.7.18
No, that just uninstalls the package itself, it does not remove the changes made by it.
-
Welcome @John H,
4 minutes ago, John H said:What's pasted in the clipboard doesn't really provide any information - the cache file is empty.
It doesn’t matter that the cache file is empty, the diagnostics provides information to try to figure out why that is. You need to provide all requested information for me to be able to help.
In addition, I’ll need the output of ls /Volumes/GoogleDrive (in a terminal).
-
6 hours ago, rlocker said:
or how one would develop one for copying a OneDrive sharing URL to my clipboard?
That depends mostly on Microsoft. Do they provide a way for you to get a OneDrive share link programatically, via some API or command-line tool? From a quick search it seems they may not, so it’s not possible for other apps to automate the process either. If you find a tool which makes it possible, we can help you integrate it in an Alfred Workflow.
-
5 minutes ago, 2pilvic said:
Is it possible to make this work too ?
It also had some Alfred 3 specific calls which were updated. -
Welcome @Chip T,
17 hours ago, Chip T said:Are there any reputable apps that can be used to ID where this keyboard shortcut is actually being used?
I’ve never used it, but ShortcutDetective (scroll down a bit) is made for that exact use case.
-
Welcome @CJJJJ,
20 hours ago, CJJJJ said:I can't find files on my laptop when using Alfred.
See Troubleshooting File Indexing Issues for possible causes and fixes.
20 hours ago, CJJJJ said:I'm using Google Drive for file storage
In that case, the situation changes. Are those mirrored files found by Spotlight? Because if they’re not, Alfred can’t see them as well as it relies on the same index. If you search online, you’ll find there is a long-standing problem of Google Drive not being indexed on macOS. That is why there is a Workflow specifically for it.
-
14 minutes ago, tbrown said:
I had lots of problems with Migration Assistant not transferring various permissions
Migration Assistant in Monterey is particularly problematic. See Troubleshooting File Indexing Issues on macOS Monterey.
-
-
-
On 3/21/2022 at 11:33 PM, Larrikin said:
I don't know how to remove python2 later
In a terminal:
export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}" eval "$(brew shellenv)" osascript -e "tell application \"Finder\" to delete (POSIX file \"${HOME}/.pyenv\")" osascript -e "tell application \"Finder\" to delete (POSIX file \"${HOMEBREW_PREFIX}/bin/python\")"
-
When configuring a Run Script or Script Filter, Alfred provides a Language dropdown listing the runtimes which have historically been included with macOS. But what if you want to run a script from another language which you have installed on your system? Be it Node.js, Lua, or something else, it’s dead-simple to call them. Either:
- Save your script with a proper shebang (examples: #!/usr/bin/env node; #!/usr/bin/env lua) and use External Script as the Language, pointing to your script.
- Use /bin/zsh (or /bin/bash) as the Language and tell the runtime to call your script (examples: node MY_SCRIPT.js; lua MY_SCRIPT.lua).
The first executes (marginally) faster but the second allows you to send preset arguments to your script. They work as they are assuming the languages were installed with Homebrew, as Alfred includes its directories in its PATH.
-
5 minutes ago, bob113 said:
Network locations workflow still does not run
That one needs an update to work after the instructions. It’s already in the repo. Are you the same Bob? If so, please don’t split the conversation. If you need further help, you can ask in the GitHub issue.
-
If Obsidian is capturing the shortcut, you’ll have to change it in its preferences. Hopefully they’ll have a way to do it, and if not you should ask for it because that’s too simple of a shortcut to take globally.
-
@Serge @JamieKeene See the Updated Third-Party Python 2 Workflows GitHub page. It explains the situation, links to instructions on regaining access to Python 2 and includes a fixed version of this Workflow.
- JamieKeene and Serge
- 2
-
1 hour ago, giovanni said:
but the JSON content is served to Alfred after the delay.
It’s served when the script ends, so the position of the delay does not make a difference. That is why in your World Cheater you can echo (in your case, cat a heredoc) sequentially and it works.
1 hour ago, giovanni said:How do I serve the 2 JSON strings sequentially?
You can’t serve two JSONs, only one. The reason you’re getting an error is that while you are spitting out two valid JSONs individually, what Alfred is seeing is the concatenated text of those. Two valid JSONs stuck together are not a valid JSON string.
You can either add all your data at once (which I recommend; fewer moving parts) or you create a variable to hold your data as you modify it and print it at the end (which I do in the example, due to the timeout):
#!/usr/bin/env python3 import time import json result = [] result.append({ "title": "Testing!", "subtitle": "testing script order of execution" }) time.sleep (5) result.append({ "title": "Testing again!", "subtitle": "testing script execution" }) print (json.dumps({ "items": result }))
Or perhaps what you’re thinking is:
#!/usr/bin/env python3 import time import json result = [{ "title": "Testing!", "subtitle": "testing script order of execution" }] time.sleep (5) result = [{ "title": "Testing again!", "subtitle": "testing script execution" }] print (json.dumps({ "items": result }))
But that will only show the second one, which is expected.
If what you’re looking for is to show one JSON then wait and show a different one, you don’t sleep in your code but tell Alfred (via the JSON) to rerun it after a number of seconds. You may also need variables to hold some data (e.g. so the script knows if this is the first run or a subsequent one). The Getting Started → Advanced Script Filters Workflow which comes bundled with Alfred has examples of both.
-
Welcome @Larrikin,
10 hours ago, Larrikin said:So if I select from the dropdown in Alfred with /usr/bin/python and then point my script with /usr/bin/python it does not work.
I don’t understand what that means. Could you share the Workflow?
-
13 hours ago, Preemo said:
just checking I posted this in the right place?
You have. -
6 hours ago, skydiver said:
what should i do on this scenario?
-
Welcome @RubyGoodbody,
See Troubleshooting File Indexing Issues for ways to identify and fix the issue.
-
26 minutes ago, stephan420 said:
I was able to fix it in my workflow by using the explicit path of php. not sure if there is a better way to do it but for now it works.
That is a good way. It’s “Method 1” in Understanding the scripting environment and perfectly appropriate for fixing it locally. I have sent a pull request with Method 3.
ZotHero — Generate Zotero citations in Alfred
in Share your Workflows
Posted
Welcome @damagekko,
The error means that particular action requires the Objective-C bridge. There’s a very small subset of Python 2 Workflows who do. At the moment it’s not viable to support those because the required Python packages fail (for me?) to build under Apple Silicon. If you’re on Intel, you may be able to do so ("${HOME}/.pyenv/versions/2.7.18/bin/python2.7" -m pip install PACKAGE_NAME) but the build failure makes it impossible for me to support it.