Jump to content

_oho

Member
  • Posts

    30
  • Joined

  • Last visited

Everything posted by _oho

  1. Hello David, Thank you for your finding! It's a shame for me that you had to spend time on such kind of easy/stupid issue. Unfortunately it's the week-end and I can't really test much on integration with ldap request. I'll have to wait for monday to play around (space with name, deal with special char, etc.). But before leaving the office yesterday, I could quickly check that I can indeed get ldap result from Alfred and display them as a list with contact icon. For some reason I couldn't get it right from Script Filter and I had to dome something as you propose in your sample with: 1) "Script Filter" (get the keyword) + 2) "Action" -> "Run Script" (process {query} with Python and write an xml formatted result to a file + 3) call via "Output -> Run Script" oascript a new "Alfred 2" search + 4) "input" -> "Script Filter" that display xml file content (list of result). I'll check this week-end if I can do something less "complicated". I still have now to figure out how to display a full page when I click on a name from the list (like contact detail page does). I hope this is possible ? It would be great to create a new email if clicked on email detail, launch SIP call if it's a fix line, call iMessage if it's a mobile number, etc. Also, It might even be possible to display person picture as I believe I can get this info from ldap ... Once I'll have the all workflow working I'll post it there for those that have ldap directory at the office. Thank you again David for your support. O.
  2. I have tried this already. And the sample (with bash) work well (no error in console either). I have actually started by playing around from this sample. But I did not succeed in achieving requesting ldap and parsing the result with bash so I changed to python. And this is were I start having problems ... Did you ever succeed in providing feedback (even simple) using python script (or perl) ? Could you try my provided with first python sample workflow (see if it works in your mac environment) ?
  3. I feel like I should sleep more as I can't get things fast ... :)

  4. Unfortunately, it does not help at all ... I had tried this already (but just double checked and did again - cf. new sample workflow). Actually, I don't know if it's a good news or not (might be good), but I can't even generate feedback using perl as well (see bellow): print "<?xml version=\"1.0\"?>\n"; print "<items>\n"; print "<item uid=\"id1234\" arg=\"{query}\" valid=\"YES\"\n"; print "<title>Olivier HO-A-CHUCK</title>\n"; print "<subtitle>tel: +33 123456789 - email: its.me@gmail.com</subtitle>\n"; print "<icon type=\"fileicon\">/Applications/Contacts.app</icon>\n"; print "</item>\n"; print "</items>\n"; I should do something wrong !!! but what can this be ... Edit: It's look like, I'm getting closer but not there yet fixed ... Consol say it's an NSXMLParserErrorDomain error 68. This might be an encoding issue. 21/11/13 15:57:17,756 Alfred 2[1754]: [ERROR] Script XML Parse Error occured Error Domain=NSXMLParserErrorDomain Code=68 "The operation couldn’t be completed. (NSXMLParserErrorDomain error 68.)" UserInfo=0x600000472580 {NSXMLParserErrorColumn=1, NSXMLParserErrorLineNumber=4, NSXMLParserErrorMessage=error parsing attribute name } I'm french and my mac is in French ... I don't know is there is a link (or if this could even be linked to the issue ...). I'm still open to any ideas ... O.
  5. Ok, I found a way to query ldap and get some results formated to generate feedbacks. But I'm trying to achieve this with Python and I'm currently stuck with what should be a basic! I can't generate feedback using python. I saw some library out there that ease this phase, but I would like to have a full integrated script that does not need extra import or module install. So just trying basic XML generation from within workflow. But without success ... Any idea why the following "Run Script" bloc (/usr/bin/python) does not work ? print("<?xml version=\"1.0\"?>") print("<items>") print("<item uid=\"id1234\" arg=\"{query}\" valid=\"YES\"") print("<title>Olivier HO-A-CHUCK</title>") print("<subtitle>tel: +33 123456789 - email: its.me@gmail.com</subtitle>") print("<icon type=\"fileicon\">/Applications/Contacts.app</icon>") print("</item>") print("</items>") If I link to a notification bloc, the query is passed ok, but I can't get feedback generated from it while using python. I might not doing it right in term of how workflow does work ? Any help would be appreciated. Here is a sample Workflow I was expecting to work, but does not ... Olivier.
  6. Hello, this would indeed be an awesome feature. Let's assume we could find a way to query LDAP using a script (python for instance, may be bash), 1) is there a way to display a list of result based on keyword ? like when indexed files are being listed for instance ? We would then need to be able to 2) clic on a item out of the full list to call the script again (or an other) passing as query the person we would need the full detail from ? I'm new to Alfred and I'm trying to play around, but I don't see so far how to achieve 1) and 2) ... Is it possible to do this ? I would love to have a full integration of search results within Alfred nice designed lists. O.
×
×
  • Create New...