Jump to content

Search the Community

Showing results for tags 'scriptfilter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 11 results

  1. User can copy content when select item and press ⌘ C, I want to post a notification. how? Any trigger to achieve it.
  2. How do I return multiple items as output of a script filter? Upon execution of the script, I'd like to output something immediately. After let's say 5 sec/successful network call, I'd like to append some more results. I'm trying to run something like this: This is what's happening: After 5 sec, I see Desktop in alfred search results. This is what's I'm expecting to happen: Desktop should be appearing immediately in alfred search results. After 5 sec, Downloads should appear below Desktop. import time xml1=""" <?xml version="1.0"?> <items> <item uid="desktop" arg="~/Desktop" valid="YES" autocomplete="Desktop" type="file"> <title>Desktop</title> <subtitle>~/Desktop</subtitle> <icon type="fileicon">~/Desktop</icon> </item> </items> """ print(xml1) time.sleep(5) xml2 = """ <?xml version="1.0"?> <items> <item uid="downloads" arg="~/Downloads" valid="YES" autocomplete="Downloads" type="file"> <title>Downloads</title> <subtitle>~/Downloads</subtitle> <icon type="fileicon">~/Downloads</icon> </item> </items> """ print(xml2)
  3. to create Alfred ScriptFilter results in Swift. the code: https://github.com/godbout/AlfredWorkflowScriptFilter if you care about the why, a bad blog post: https://sleeplessmind.com.mo/news/alfred-workflow-scriptfilter-another-one/ it's probably missing some stuff as it's built mainly for my current needs, so don't hesitate to bitch and i'll see what i can do!
  4. for example "quicklookurl":"file:///Users/qhe/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cn.alanhe.giphy/1.png" but it's ok in /Users/qhe/Pictures/1.png Alfred Version: 4.3 Mac Version: 10.15.7
  5. https://www.alfredapp.com/help/workflows/inputs/script-filter/json/
  6. Hello there. To build cleaner workflows I needed to use some of the new fields found in Alfred 3.4.1 and 3.5. I usually use the fantastic package from Joe Tannenbaum to build my workflows but it's not updated and its fluent api is starting to show its limitation with the new nested fields. So I build my own. I started using it to build the v2 of my Alfred Time package and I'm quite pleased with it so I'm thinking, if you need to build workflows that handle the new nested field, you might want to have a look at my workflow. If not, Joe's package might have a nicer API. https://github.com/godbout/alfred-workflow-php Have fun, and be productive with Alfred!
  7. I'm working on a script to play music using MPD. I want to list available albums and have Alfred filter them rather than doing the filtering myself in a script filter. But when I check the "Alfred filters results" check box, the result is an empty list regardless of what I type: If, on the other hand, I uncheck that box, I get a list of albums as expected, but I can't type to filter them: Here's my code, in Python. It's really not very complicated: from __future__ import unicode_literals from __future__ import print_function import json import os import subprocess import sys MUSIC_DIR = '/Users/Shared/iTunes/iTunes Media/Music' FIND_CMD = [ '/usr/local/bin/mpc', 'list', 'album' ] def make_item(album_name): return dict( title=album_name, uid=album_name, valid=True, arg=json.dumps({'album': album_name}), icon='icon.png', autocomplete=album_name, ) def main(): print(json.dumps({ 'items': [ make_item(item) for item in subprocess.check_output(FIND_CMD).decode('utf-8').split('\n') if item.strip() ] })) if __name__ == '__main__': sys.exit(main()) Can anyone tell me what I might be doing wrong?
  8. Hello, Im rewriting my old alfred 2 workflows using great alfred 3 json api and it is difficult to understand what icon types I can use - https://www.alfredapp.com/help/workflows/inputs/script-filter/json/- it is not clearly described there(( "icon": { "type": "fileicon", "path": "~/Desktop" } - What other icon types I can use? Can I load icons using url? (I know that was impossible in alfred 2) or I should use something like https://github.com/sananth12/ImageScraper ? this is my old workflow preview I use it not only for movies but for parsing dynamic web content and an ability to load images using url and dynamicly resize them would make my life much easier - If it is not possible it is ok - I just wanted to check in case I missed it
  9. Newbie question, and maybe I'm missing something, but does Alfred not filter the results of a script filter based on arguments? I have a fully functioning filter, but it seems odd that Alfred doesn't filter the results based on the value of the argument. For example, if I have a script filter with the keyword "Press", requiring an argument, and the items "one","two","three", I'd expect that typing "Press o" would limit the results to "Press one", where typing: "Press t" would limit the results to "Press two" and "Press three" I've tried both populating and omitting the uid field, to no effect, though I do understand that this field is primarily for "learning". Am I doing something wrong, or is this expected behavior?
  10. Hey Guys, I was playing around with the Script Filter XML a bit and now I have the following script, which does not work, but I cant tell why: cat << EOB echo "<?xml version='1.0'?>" echo "<items>" for line in $(gpg --list-keys | grep -E -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+\b") do echo "<item uid='$line' arg='$line'>" echo "<title>$line</title>" echo "</item>" done echo "</items>" EOB Strange thing is: When I execute the script in my bash an copy the output as xml in the ScriptFilter, everything works fine. I suspect escaping to be the problem, but can not get it to work... Any ideas?
  11. Is it possible to have the text '{query}' as part of a title in Alfred's results? I have a test worflow, that uses the ScriptFilter to output items. Keyword is test and no arguments are required. The XML is being generated via a sh call to a file called XML.sh, which just cats out an XML. There are two items in the result, each with a title of "this is a test for '{query}'" The first item has an arg value = 'hello', and second item has arg value = 'world'. I want to have two items shown in Alfred with the text this is a test for '{query}' but {query} gets replaced with the text of the arg of each item. Is there no way to print out '{query}' as text? Also, if I just cat out the XML directly in the ScriptFilter, '{query}' will be replaced by '', because the script filter itself does not need any arguments. Sample workflow
×
×
  • Create New...