Jump to content

alpo

Member
  • Posts

    7
  • Joined

  • Last visited

Everything posted by alpo

  1. I feel that I have misconfigured something and I need your help figuring out what. I search for Music. Music app shows up. Then click return. Instead of the app starting, I get an extra Alfred panel "No matching recent documents". thank you
  2. I'm trying my hand on a new workflow that is supposed to perform a search in Evernote using AppleScript and return the results as XML for Alfred to display. (I am aware of the existing Evernote workflows, but I'm trying something specific) 1. I created a flow with a Run NSAppleScript action 2. In the script I'm doing something simple for now on alfred_script(q) -- your script here tell application "Evernote" set theResults to (find notes "tag:qq " & q) end tell if theResults = {} then set theOut to my empty_xml(q) else set theOut to my to_xml(theResults) end if -- display dialog theOut return theOut end alfred_script on empty_xml(query) set xml to "<items>" set xml to xml & "<item uid='notfound' arg='' valid='yes'>" set xml to xml & "<title>Unanswered quick question</title>" set xml to xml & "<subtitle><![CDATA[No answers found for question" & query & "]]></subtitle>" set xml to xml & "<icon>icon.png</icon>" set xml to xml & "</item>" set xml to xml & "</items>" return xml end empty_xml on to_xml(theResults) return "" end to_xml 3. The above returns a result in the form <items><item uid='notfound' arg='' valid='yes'><title>Unanswered quick question</title><subtitle>No answers found for question </subtitle><icon>note.png</icon></item></items> <!-- or --> <items><item uid='evernote:///view/2147483647/s112/bc3656b2-b355-4f7d-8347-126f00e37d4d/bc3656b2-b355-4f7d-8347-126f00e37d4d/' arg='evernote:///view/2147483647/s112/bc3656b2-b355-4f7d-8347-126f00e37d4d/bc3656b2-b355-4f7d-8347-126f00e37d4d/' valid='yes'><title><![CDATA[What the address of the Oracle office in Oakland?]]></title><icon>icon.png</icon></item></items> which to me look valid. This is not working in the sense that I don't see any errors or results. What am I doing wrong? thanks
  3. @deanishe: 1. why using ElementTree instead of templates? (I'm aware of the possible escaping issues) 2. the script doesn't throw errors... I've tested this repeatedly.
  4. @smarg19: I've tried escaping but made no difference. @deanishe: why? @David: I've checked the output multiple times and I cannot spot any errors (that's the reason I've posted here). I'll take an example output and `cat` it. What if it doesn't work? What would be the next thing to look into?
  5. Here's the main script: https://gist.github.com/al3xandru/e10547141f9e3c47179c I've added the workflow as a Script filter python $HOME/bin/qq.py "{query}"
  6. Hi guys, I've been trying to return some results from a Python-based workflow. While it kind of works, when selecting one of the items, the corresponding file doesn't open. What am I doing wrong? <?xml version="1.0"?> <items> <item arg="/Users/apopescu/Dropbox/ka/nvall/qq-Git tags.md" uid="Gittags" valid="yes" type="file"> <title>Git tags:</title> <subtitle>Find the closest tag related to the specific commit:</subtitle> </item> </items> Thanks a lot, :- a
×
×
  • Create New...