parrado Posted December 28, 2023 Share Posted December 28, 2023 i am creating a workflow that returns an array of items but there is always an empty option on top of all the results with an A icon there, is this norma? ow can I get rid of this? Link to comment
vitor Posted December 28, 2023 Share Posted December 28, 2023 Welcome @parrado, Please share your workflow (transfer.sh is good temporary storage) as it’s impossible to say without looking at your code. Link to comment
parrado Posted December 28, 2023 Author Share Posted December 28, 2023 1 hour ago, vitor said: Welcome @parrado, Please share your workflow (transfer.sh is good temporary storage) as it’s impossible to say without looking at your code. Sure, it is here https://file.io/ViyugQnRU8Do Link to comment
vitor Posted December 28, 2023 Share Posted December 28, 2023 I do mean the workflow. Preferably stripped down to just the necessary parts to reproduce. That’s just a JavaScript file, it doesn’t allow proper inspecting. Also, what’s the debugger output from your case above? Link to comment
parrado Posted December 28, 2023 Author Share Posted December 28, 2023 2 minutes ago, vitor said: I do mean the workflow. Preferably stripped down to just the necessary parts to reproduce. That’s just a JavaScript file, it doesn’t allow proper inspecting. Also, what’s the debugger output from your case above? Sorry, This would be the workflow exported https://file.io/SsCbwBP0sXsa, the output of that js would be this one: Link to comment
vitor Posted December 28, 2023 Share Posted December 28, 2023 That link says the transfer has been deleted. From that debugger output I see nothing wrong. The most likely explanation is that you have another Keyword/Script Filter/something which also uses vs as the keyword and you’re seeing output from both workflows. Link to comment
SamEdwardes Posted December 28, 2023 Share Posted December 28, 2023 I am working on a very similar workflow. If it helps, here is my filter script: import json import sys from pathlib import Path try: query = sys.argv[1] except IndexError: query = None data = { 'items': [] } dirs_to_check = [ '~/projects/personal', '~/projects/work', ] for dir in dirs_to_check: for i in Path(dir).expanduser().iterdir(): if i.name in ['.git', '.DS_Store']: continue if query: if query.lower() not in i.name.lower(): continue data['items'].append({ 'title': i.name, 'subtitle': f"Open: {str(i)}", 'arg': str(i) }) sys.stdout.write(json.dumps(data)) Link to comment
parrado Posted December 28, 2023 Author Share Posted December 28, 2023 12 minutes ago, SamEdwardes said: I am working on a very similar workflow. If it helps, here is my filter script: import json import sys from pathlib import Path try: query = sys.argv[1] except IndexError: query = None data = { 'items': [] } dirs_to_check = [ '~/projects/personal', '~/projects/work', ] for dir in dirs_to_check: for i in Path(dir).expanduser().iterdir(): if i.name in ['.git', '.DS_Store']: continue if query: if query.lower() not in i.name.lower(): continue data['items'].append({ 'title': i.name, 'subtitle': f"Open: {str(i)}", 'arg': str(i) }) sys.stdout.write(json.dumps(data)) I had another workflow overlapping with the same keyword as @vitor suggested, I am reading folders inside a Path to open them on VSCode when clicked. I think it can be very powerful when dealing when lots of different repos. Do you know how can it get published to appear in alfred workflows page @vitor ? Link to comment
vitor Posted December 28, 2023 Share Posted December 28, 2023 3 hours ago, parrado said: Do you know how can it get published to appear in alfred workflows page See the Submit page. 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