Jump to content

Search the Community

Showing results for tags 'json'.

  • 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 19 results

  1. Hi all, I am working on a workflow which 1) loads a large (43MB) JSON object and then 2) uses Alfred to filter results (with word matching). Alfred currently takes ~3 sec to load the object. Here's my question: given that I am not fetching anything over the web or local network, would it still be beneficial (i.e. would make it faster) if I learn how to cache the JSON object? Or perhaps I should search via script and only serve the results to Alfred? Thanks!! Giovanni
  2. I have a very basic python question that I was hoping to get a little help with that involves filtering out list items in a script filter. At the moment, the script filter works great except that it includes a few items I'd prefer not to see in Alfred's output. Is there any easy way to remove items whose titles can be found in another list? Admittedly, I normally do these sorts of things in AppleScript - which is pretty easy to do in this case - except that I’ve been trying to learn a little python, given all of the limitations with AppleScript (which @deanishe and @vitor have righ
  3. I’m struggling to get a script filter to work which outputs a variable containing a mixture of text and emojis. In the output, Alfred just spits out empty characters for the emojis (⍰ question mark in a box). There’s obviously an encoding issue I’m overlooking, and I haven’t been able to quite put my thumb on it. To explain, I’ve created a script filter with AppleScript that’s supposed to let the user select a playlist from their Apple Music library (to play it, move it, etc). I recently moved over from Spotify to Apple Music, and I have a ton of playlists (put that's a separate proble
  4. I have a very basic question about how script filters work that I haven’t been able to find a direct answer to on this forum or on Alfred’s support page. To be fair, there’s a ton of fantastic information on both, but I simply haven’t found one dumbs its explanation down enough for me to follow it. I've been using Alfred for quite some time, but have never been able to understand much about script filters. In short, I was wondering how to get items from an AppleScript list to show up as JSON formatted items in a script filter’s output (so that I can select one of them, and have it
  5. Hello,everybody! I write a javascript in alfred workflow, try to return the json and copy the result to clipboard at the same time. Could anybody tell me how to make it?Thanks~ function run(argv) { var temp = argv[0]; var num; num = temp * 1000; return JSON.stringify({items: [ {title: "The number is :", subtitle:num } ]}) //return num;//It dosn't work. }
  6. I'm starting out trying to make workflows and have to this point just managed to do web searches on a specific website by using Alfred's buildt inn function with the {query} option. This has worked out perfectly with sites that displays a HTTP address for a search, but how can i tackle pages that does not do this? ATM i'm trying to make a search for this page http://www.magnusli.no/ifirooms/. I tried to inspect the getRoom() function and stole a link from there include/get_room.php?id= and tried to use the {query} on that (with eg. 'Caml' as a search) and that worked to a point where
  7. This is my error : [ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON: input the {"items":[]} "input the" is the result of code "echo $userInput This Alfred node, runs a script called search.rb. I've screen shotted it below as well. The script calls all redbooth API's(a project management app) Projects, Tasklists and tasks. It then runs a loop through each item and looks for titles that match the user input/ARGV. I have run the script locally in my terminal and the script re
  8. I'm new to creating Workflows. I'm trying to create a workflow that will pull the data via API to JSON and show results directly in Alfred without the need to visit the website to look at the response. API REQUEST GET https://api.website.com/?domain=test.com&apikey=yourapikey&output=output_type So, what I'm trying to do is this: type "dns test.com" then request is: GET https://api.website.com/?domain=test.com&apikey=123123123123123&output=json The response will be: JSON response will look like this:
  9. I'm new to writing workflows. I'm having a trigger that launches a php script, I have a loading text for that trigger, but the items returned by my script will also take time when the user chooses them, so I'd like to change also the subtitle once it's chosen, so that the user knows something is being worked on after his choice. Is there a way? Or am I missing something in how the script filters work? I am not launching another script once the user selects an option, and I don't post anything (just grabbing data from an API, and injecting the results in Alfred items at the final st
  10. Working on Workflow...Script Filter Alfredv3.1.1 (737) Mac O SX 10.12 Dropbox Link <removed> Trying to get the results displayed as choices in Alfred. Error [ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON With (bash) base_uri="https://xyz.execute-api.us-west-2.amazonaws.com/prod/listfromalfred?user=${user}&task=${data}" post_result=$(/usr/local/bin/curl -X GET ${base_uri}) post_success=`echo ${post_result} | grep items` echo
  11. A tiny thing, really. In the documentation for the JSON feedback format, the term "array" is used for JSON objects. text, mod and icon are objects. items is an array (inside an object). In JavaScript, and thus JSON, "arrays" are ordered lists: ["this", "is", "an", "array"], while dictionaries/mappings are called "objects": {"this": "is", "an": "object"} (In JS, thing["key"] is equivalent to thing.key) http://www.json.org
  12. Currently, if I output the following: {"items": [ { "title": "Foo", "arg": "unicorn" } ]} I have to handle the `unicorn` arg in a connected output action in the workflow. It would be useful to be able to dynamically handle it without needing to create an output action. This can be useful for very dynamic results and creating reusable modules that create output with different actions. I propose adding a `script` property to the JSON format that when specified makes it not pass the output to any connected output action (like `valid: false`) and instead executes the `script` and
  13. Hi, I'm using Alfred 3's Script Filter + JSON format to return a list. However, I found that despite I output a static ordered list, the ordering that display on Alfred is dynamic. That is, Alfred seems to alter the ordering. It looks like Alfred tend to put the most recent used item to the top. I'm wondering if there is any way to configure this behavior or turn it off? Thanks.
  14. Good morning, I'm currently trying to create a simple Script Filter Alfred 3 Workflow using Python. I found an earlier example which demonstrated how to pass XML results to a Python workflow: xmloutput = """ <?xml version="1.0" encoding="utf-8" ?> <items> <item arg="testitem"> <title>FooBar</title> <subtitle>foo bar is a test item</subtitle> <icon>icon.png</icon> </item> </items> """ print(xmloutput) My question is, what is the syntax for doing the same with the new JSON data structure? regards, A
  15. Is it possible to use a JSON Config block to affect the keyword of a connected block? I've tried copying the copy the config of a Script Filter block into a JSON Config block and changing the keyword, but it appears to have no effect. Overall, can anyone provide any details on how the JSON Config blocks are intended to be used?
  16. 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
  17. Hi, For my Spotify Mini Player workflow, I need to parse a library.json file which contains all spottily playlists of the user. The json data looks like: [ { "data" : { "discNumber" : 1, "album" : { "artist" : { "portrait" : "", "type" : "artist", "name" : "J-Boogie's Dubtronic Science", "uri" : "spotify:artist:76MRWSA9TZZg6s3Ijy7mxW" }, "availableForPlayback" : true, "availability" : 0, "cover" : "spotify:image:b9346fb9030ede38617e42eafd553d17fa7cf307", "year" : 2009,
  18. Hi, (among other starter problems) I have the following problem: The below script runs fine in the Mac OSX terminal. But as an "run script" action (type "python") it hangs. When I delete the urlopen line the script runs to the end (but of course without a JSON result). The small workflow is here: http://d.pr/f/K3t So something seems to be wrong with the line "response = urllib2....": import urllib2 import urllib import json url='{query}' endpoint='http://api.longurl.org/v2/expand' params = {'url':url, 'title':'1','format':'json'} response = urllib2.urlopen(endpoint+'?'+ urllib.ur
  19. Workflows' JSON API (new) (Recommended) API on Github: https://raw.github.com/hzlzh/AlfredWorkflow.com/master/workflow-api.json API backup: http://www.alfredworkflow.com/workflows-api/ -- API info -- Download Link by Author = workflow-download-link (Important!) Backup download link on Github = https://raw.github.com/hzlzh/AlfredWorkflow.com/master/Downloads/Workflows/ + workflow-file Everyone can load all the workflows' download links by using this API, mybe @phyllisstein can add this in Alleyoop.
×
×
  • Create New...