psistorm

Member
  • Content count

    16
  • Joined

  • Last visited

About psistorm

  • Rank
    Newbie
  • Birthday
  1. Thanks to Daniel Diekmeier there is a fix and new version of the workflow available on packal and github using the new Leo API.
  2. For me it's working. Have you tried the debug mode to see what happens?
  3. Updated the workflow and added it to Packal. See first post for detailed changes.
  4. Yes that's a pretty good question Perhaps you can open a ticket in the alfred bugs section with the same detailed description you provided for me. I guess Andrew is potentially better able to see if the error is within the workflow output or somewhere else. Well the speed depends on different factors from your internet connection speed to the workflow algorithm itself. How "fast" or "slow" is the workflow responding? Of course it will never be that fast like Alfreds program search. But I'll have a look if I can do optimisations if it's really so slow. It doesn't feel that slow here at my computer
  5. Ok, first, you're not supposed to still enter the keyword like 'de' when you assigned a shortcut. Just use the word you're searching for. As you told, this does not solve the problem. Thus, the constructed XML looks just like it should. Does this problem happen every time? Even when using no shortcut just the keyword 'de'? Sometimes there seems to be some sort of hickup in Alfred. Could you try to remove the last character of your input, wait for one second and type it again like "test" -> "tes" -> wait -> "test". Does the result show something? The shown error in the console.app suggests the workflow returned an empty XML (http://stackoverflow.com/questions/7304850/parser-error-error-domain-nsxmlparsererrordomain-code-4-the-operation-couldnt), but you showed it isn't empty...
  6. Any additional information would be really helpful: When does this happen? Does this happen everytime or just sometimes? Which search string did you use? See also: http://www.alfredforum.com/topic/1679-reporting-problems-with-workflows/
  7. If you go to http://leo.dict.org and click a language, there is an URL like http://dict.leo.org/itde/index_de.html for Italian-German or http://dict.leo.org/ptde/index_de.html for Portuguese-German. The important part is between dict.leo.org and index_xx.html. You would have to add a new scriptfilter with a keyword for that language. Then paste the code like require('leo.php'); $in = "{query}"; $leo = new Leo("{LANGUAGECODE}"); echo $leo->getTranslations($in); {LANGUAGECODE} is the part you'll have to fill in, for italien this would be itde for portuguese it would be ptde I think you can guess the further scheme for other languages like Russian or Polish. Just have a look at the URL and take that languagecode out of it. Then link the new scriptfilter with the two RunScript Boxes assigning Shift-Modifierkey to the upper box like I did. That's all. If you tell me which language you're interested in, I can add it for all others and upload it on github again. I just picked out the ones I thought were most common. But: This only works for Leo, if you want any other site, there would be the need to rewrite the site parsing. I'll think I'll start probably with dict.cc next week or on the weekend.
  8. I'm fine with that Thank you.
  9. I uploaded a fix for opening the leo page with the selected keyword, for each particular language. Locally everything works now, hopefully for you too Now and then Alfred does not show any results. I found out this is due to the fact, that Leo blocks an IP for a small amount of time if there are too many requests but this should be not exceeding 10 to 30 seconds. So you'll have to wait if you fire too many requests within a short time. I'm not really happy about this but as it happens rarely and I can not change anything about this, we'll have to live with it.
  10. Yes I recognized it right after committing the changes...It worked before fixing the Umlaut problem. Probably something broke then...I'll have a look at this but probably rather tomorrow.
  11. Thank you for this hint. For anyone having the same issues with PHP in the future, use: $string = iconv('UTF-8-Mac', 'UTF-8', $string); As there seems to be a Mac-"Special" UTF-8 version (NFD) and iconv helps to convert this into "real" UTF-8 (NFC). I've uploaded a new version of the workflow to github. And also reworked the workflow to the suggestions of DJay. There is now only one keyword per language. "de" for german-english, "df" for german-french and "ds" for german-spanish". The workflow "automatically" detects the language the keyword aims to be translated to by choosing the bold highlighted keywords of Leo as the native language of the input keyword. There could be some overlap, but I think this will work in the most cases.
  12. Yes I noticed that too, but I'm not sure why. I've tried all possible encodings and the one I'm using should definitely works. I'll do some debugging on the weekend. For now I haven't got any time at the moment. As a workaround you could use the ae, oe, ue writing. That works.
  13. Hi Adrianthomas, That's nice. But I think what doesn't work is to have the keyword "leo" and get a result feedback from their page depending on the key. This is what should work without pressing enter, displaying the suggestions.
  14. To play around with Alfreds new possibilities, I recently created a workflow (here) allowing the translation of german-english words using the online dictionary http://leo.dict.org and feeding back the results to Alfred. I am sure this approach could easily be used searching multiple dictionaries (XPath), when the sites that should be searched are known. Even better (easier) it would be if the sites provide an API or WebService. Perhaps I'll have time on the weekend to provide some sort of helper for parsing pages in this style.
  15. Hey there, I'm happy you like it. I had a look at how Leo "recognizes" what language it is. Apparently, I think, it doesn't recognize this. Try out "Parameter". Leo marks the german and the english words bold as well. But normally you know which language the word is Unfortunately Alfred workflows do not support some sort of modifier key, otherwise I could have used Enter for copying the first language and Shift+Enter for copying the second language, or something like this. Or why would you like to have just one word? I thought two keywords are good to be able to copy the translated word, depending on the language. But I'll try to think about other solutions. I could do a dict.cc Plugin but they don't show all results on the same page, so this makes it harder. And if there should be all results shown also slower, or the search would only show the results of the first page. Is there a general interest in other languages?