Jump to content

Search the Community

Showing results for tags 'xml'.



More search options

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

  1. Hey guys, Say I make a Script Filter and link it to 4 script actions that each perform a different function, but each action needs a different input from the Script Filter, and this is where the problem begins, because the "arg" attribute can hold only one value which will work with just 1 of the 4 actions Right now the only workaround to this problem is to give the "arg" attribute a separated list of multiple values, and then each action would need to parse the input and search for its piece of data, but it's too much parsing and splitting involved.. My opinion is that we should have some freedom in the XML attributes of the feedback results by letting us define our own attributes in a result and Alfred would automatically send those attributes as individual parameters to the "alfred_script" function, as well as individual {attribute_name} to other predefined actions. For example, script filter would generate this xml result: ... <item uid="rdioartist" arg="r96664" valid="yes" autocomplete="Incubus" artistiname="Bjork" track="All is full of love"> ... And we, the programmers, would then use the following in script action: on alfred_script(arg, artistname, track) -- we use the parameter that is needed for a specific action end alfred_script [later edit]: a big problem with the current design is when you link a script filter to multiple actions AND a Notification action, because inside the Notification action we can't split the separated list of values of the "arg" attribute, and setting the arg attribute to a single value would make the other actions useless So with my suggestion above we would type something like {aristname} or {track} inside the Notification action
  2. Hi, I'm working through my first script workflow and it works as I expect, but when I look at the debug in alfred, it outputs [ERROR: alfred.workflow.input.scriptfilter] Code 1 just before the output of the xml. I'm having a hard time finding any information regarding this. Maybe I'm just not looking in the right spot? Thanks for any advice.
  3. Hi, I have a Script Filter with a keyword "KC" that populates results (using php and xml) with items I defined. This is working fine, except the fact that it also shows some unwanted items among my defined results. For example "Key Codes.app" - it shouldn't be there, but Alfred still shows them, probably because this app has letters K and C in it's name. This doesn't make sense. That's completely fine with me if Alfred show other apps like Komodo, Key Codes, Keychain Access, etc. when I start typing my keyword by typing "K". But when I finish typing my keyword "KC" it switches to my Workflow and displays results I defined. So why I still get "Key Codes.app" among these results? Thanks in advance, Romans
  4. The title basically says what I'm trying to do. I have a python script using deanishe's alfred-workflow library that I'm using to build an ssh CLI string. Workflow is set up like this: The Script Filter runs "python jump.py {query}", or attempts to. jump.py looks like the following, and is meant to take args such as "9999,192.168.100.100,50.57.203.223", and buildout 'query', which should be passed to the Terminal Command action of "ssh {query} def main(wf): if len(wf.args): query = wf.args[0] else: query = None print query log.debug(query) arglist = query.split(',') randport1 = random.randint(5000,7000) randport2 = random.randint(5000,7000) port = arglist[0] srv1 = arglist[1] srv2 = arglist[2] query = "-A -t -L 9800:localhost:{0} -L {1}:localhost:{2} user@{3} ssh -L {4}:localhost:9800 -L {5}:localhost:80 user@{6}".format(randport1,port,randport2,srv1,randport1,randport2,srv2) wf.add_item( title = "Jump from %s to %s" % (srv1,srv2), arg = "-A -t -L 9800:localhost:{0} -L {1}:localhost:{2} user@{3} ssh -L {4}:localhost:9800 -L {5}:localhost:80 user@{6}".format(randport1,port,randport2,srv1,randport1,randport2,srv2), valid = True ) wf.send_feedback() # Mainloop if __name__ == u"__main__": wf = Workflow() log = wf.logger sys.exit(wf.run(main)) This is the debug output I get... I'm not terribly familiar with XML, so I don't know what's going on here. The confusing thing is I have another script that is identical in the way it takes the args passed through Alfred, splits them into a list, and then assigns it to key value pairs in a dict. It works fine.. <?xml version="1.0" encoding="utf-8"?> <items><item valid="no"><title>Error in workflow 'com.alfred.custconn'</title><subtitle>list index out of range</subtitle><icon>/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns</icon></item></items> [STDERR: alfred.workflow.input.scriptfilter] 15:18:37 jump.py:28 DEBUG 9999,11.48.54.65,11.11.11.1 [INFO: alfred.workflow.input.scriptfilter] 9999,192.168.100.100,50.57.203.223 [ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)'. Row (null), Col (null): 'Document is empty' in XML: 9999,192.168.100.100,50.57.203.223 <?xml version="1.0" encoding="utf-8"?> <items><item valid="yes"><title>Jump from 192.168.100.100 to 50.57.203.223</title><subtitle /><arg>-A -t -L 9800:localhost:6678 -L 9999:localhost:5025 user@192.168.100.100 ssh -L 6678:localhost:9800 -L 5025:localhost:80 user@50.57.203.223</arg></item></items>
  5. Hi, I am using Alfred v2.2(243) I am author of alfred-pinboard and other workflows. You can look up my workflow from github.com/jmjeong/alfred-extension I have some question about alfred workflow extension. I tried to find document about this, but I failed. 1. Is there any limit of items of workflow: the maximum number of items, and maximum size of string? 2. Is there any time lime for script to be executed? The result of of alfred-pinboard output is as follows when it is executed in the shell. - http://f.cl.ly/items/3n352G0Z0M0A302n0i1R/~DropboxAppsAlfredalfredprefer.txt When it is executed in the alfred shell, the error message is displayed. But it is random, sometime it is ok, but sometimes it displays error. Starting debug for 'pinboard' [ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)'. Row 1, Col 1: 'Document is empty' in XML: ></item><item arg="https://fnd.io/#/" uid="com.jmjeong.alfredv2.pinboard-33"><title>Experience the App Store and iTunes Anywhere | fnd</title><subtitle /><icon>item.png</icon></item><item arg="http://ludens.kr/741" uid="com.jmjeong.alfredv2.pinboard-34"><title>저작권 문제없는 고퀄리티 사진을 구할 수 있는 사이트 10곳 #Ludens</title><subtitle /><icon>item.png</icon></item><item arg="http://www.istockphoto.com/" To test if the result xml is wrong, I make simple workflow to display the first result. - pinboard-test.alfredworkflow The result is ok. The first result xml seems to be ok in this test. I don't guess why alfred-pinboard displays error. Most of the time, it is ok, but sometimes it displays error. If you need any resource to reproduce this error, I could provide it.
  6. Hi Alfred users. I'm not completely sure this is a bug so I'm posting it here first. I have written a script that outputs xml which some times contains special characters. It seems that the xml interpreter in Alfred does not know what to do with those and aborts the whole script filter without any error in the debug log. A simple example would be: <?xml version="1.0" encoding="UTF-8"?><items><item arg="http://www.glossed.it/highlights" valid="YES" type="file"><title>title Ð</title><subtitle>test</subtitle><icon type="fileicon"></icon></item></items> I've coloured the offending character red. Without it the script filter works fine. Am I correct in thinking this is a bug in Alfred? Best regards, Teo
  7. Bit of a funny one this. Basically, I'm posting here because I've been trying to debug an error that some users are having with a workflow I made but I've reached a point where I can't go make any further progress without assistance from "on high". I verified both users were using the latest version of Alfred, and had them run the workflow's script in the Terminal (no errors) and send me the generated XML. I can feed the XML back into my Alfred and the results show up just fine. There are also no non-ASCII characters in the XML which might have caused text encoding issues. I have been entirely unable to replicate the problem. I'd be happy to provide the XML via a non-public channel. I realise that filing this as an Alfred bug is somewhat tenuous, but as noted, my Alfred install accepts the same output, so I've exhausted the possibilities open to me, and Andrew is the only person who could possibly provide more insight, as he's the only one who can see what Alfred's doing with workflow output it doesn't like.
  8. I'm trying to generate a URL based on a query that I give to Alfred. I set up the XML the following way. It looks like the "arg" attribute doesn't like the ampersands in the URL. If I remove the ampersands it seems to work correctly and passes it to the next step in the workflow. <?xml version="1.0"?> <items> <item uid="sview" arg="http://maps.google.com/maps?q=&layer=c&cbll=37.33741330000001,-122.04509040&cbp=12,0,0,0,0"> <title>http://maps.google.com/maps?q=&layer=c&cbll=37.33741330000001,-122.04509040&cbp=12,0,0,0,0</title> </item> </items> Is there a way I can work around this? I'm trying to generate a Google street view URL based on a street address that I enter. I have a perl script that queries the Google Maps server to get the latitude and longitude for and address and generate the URL. I want to pass this URL to Google Chrome.
  9. I've created a workflow that allows me to create new stories in pivotal tracker (e.g, "pt this is the name of a new story") which has been fantastic to have. What I'd like to do next is to take the XML response and parse out the useful piece of information: namely the Tracker story number that's generated. So far, the work I've done has been purely through bash and no "real" language. I'm wondering how I would go about implementing the next step. Thanks! K
  10. I'm not used to deal with xml files but when i was developing one of my workflow (show google chrome tab) i couldn't see all of the suggestion it was supposed to be shown. And after a while i founded that putting the "&" character in the <title> or <subtitle> was making an error. For example this doesn't shows up in Alfred. <items> <item uid="suggest {query}" arg='plop'> <title> a tab </title> <subtitle> http://www.alfredforum.com/page/index.html?do=add&category= </subtitle> <valid> yes </valid> <icon> icon.png </icon> </item> <items> But this shows up: <items> <item uid="suggest {query}" arg='plop'> <title> a tab </title> <subtitle> http://www.alfredforum.com/page/index.html?do=add"and"category= </subtitle> <valid> yes </valid> <icon> icon.png </icon> </item> <items> Maybe i am doing things wrong but this is what i founded. I am using: - The latest beta build b105 - Mac osx 10.8.2 If you need more information just let me know i'll tell you more Have a nice day ps: sorry for the spelling or grammar mistakes -- The Lord Of The Loutre
×
×
  • Create New...