Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Cedric last won the day on June 22 2016

Cedric had the most liked content!

About Cedric

  • Rank

Profile Information

  • Location

Recent Profile Visitors

1,025 profile views
  1. Hey, Just wanted to say that it works perfectly for me. Thanks so much for the workflow and its beautiful documentation. Best, OSX 10.11.5 El Capitan Macbook Air mid-2011 Alfred 3
  2. Thanks so much for the response, it's so much clearer now. A lot of things weren't obvious to me, like the part about "modelled on the requests library" meaning that it worked exactly the same way. Because I didn't understand how Alfred worked, the part of the code about grabbing the query went over my head, as I didn't understand what the code was doing. Here is why I'm using the print function: my goal with the v0.1 of the workflow was to be able to display (print) very simply the answer to the question "male or female?" I naively thought that I could write a v0.1 my Python scri
  3. I've already read it twice before posting (along with Alfred-workflow documentation and the bundler code comments and documentation, and other forum posts), I do try to do my homework before asking for help! The tutorial does not do exactly what I'm trying to do, as I'm not trying to show a list of posts. It might be why the answer didn't seem so obvious to me. But I guess I'll take a small break and re-read it again, maybe taking a step back will help seeing the answers there. Thanks a lot for your help, sorry if it seemed like I was trying to make your write the tutorial again.
  4. Thanks for the quick reply! About the error in the code I'm not sure I understand what's happening: I tested the code in iPython, and it works. I then tested the worfklow while using fixed values ('Alice Nicolas' instead of '{query}') and it works. When I'm using it with {query} it doesn't work. Here is the error message, for reference: [ERROR: alfred.workflow.action.script] Traceback (most recent call last): File "genderize.py", line 36, in <module> proba = [float(r.json()[p]['probability']) for p in range(len(values))] KeyError: 0 About passing the query I'm not sure I
  5. Thanks a lot for the tips, and especially for the aliases. pip now works as it should and I successfully installed Requests in the worfklow. I do have a message about pip not being up to date, should I try to update it? It seems to be in the system folder. That said, my workflow still does not work. I tried using the script filter, but Alfred would display fallback options (Google...) before I'm able to finish typing the names. I then tried with the other script object, but nothing happens. If you could give it a look and tell me what's wrong, that would be really helpful. Here is the
  6. I'm trying to create a Python workflow that would work with the API of https://genderize.io In my Python code I use the "requests" and "collections" modules. The code works as intended when ran through the Python interpreter, but now I don't know how to actually finalize the worfklow and include the dependencies. I tried using the Python dependency bundler, but it didn't seem to work. I tried to pip install inside the workflow folder, but I have the Homebrew related bug with the pip install --target=url. I used a technique which did install requests in the workflow, but I'm not sure ho
  7. Hello, Thanks for this amazing worfklow. I'm a big pocket user (top 1% reader according to their stats) but both the mac app and the firefox extension were failing me (the firefox extension doesn't work when you don't save your history). I'm not sure how the "save link from clipboard" works though. I activated the global shortcut, but nothing much happens. How is it supposed to work? Should the link appear in alfred with the option to "save to pocket"? or does it work in the background with no feedback to the user? By the way, you should mention in the description that users have t
  8. Could you give me some pointer about how to set the language? I'm not sure where to start to make this happen. Thanks!
  9. I have completely rewritten my workflow to make it work even if the project name contains one or more space. The code doesn't care, and simply checks that a section number is correctly entered. I did as you said as well, and got the .sh script on a dedicated file, using /bin myscript.sh {query} to set the positional parameters. This workflow now works exactly as intended, thank you for your help! #!/bin/bash #code under MIT licence, modified from Stack Overflow, Unix.com and Ask Ubuntu answers, from the users below: #bashist http://stackoverflow.com/a/6968547 #Ignacio Vazquez-Abrams h
  10. You're right, my workflow was confused. I now edited the automator workflow and here is the script that Alfred runs. #!/bin/bash arr="{query}" set -- $arr automator -D project_name="$1" -D section_number="$2" /Users/.../Alfred.alfredpreferences/workflows/.../folder_cleanup.workflow And it's working beautifully! This is great, and all the files are in the worfklow so it will work on my other computers. This shows that with even with my limited coding knowledge, I can create interesting workflows, at least for my personal use. I'll definitly think about doing more of them in the future.
  11. This is great, thanks a lot! This is an example I will be able to tweak in the future for similar needs, which is awesome. What I wanted to do was: Be able to find an English function name, with the subtitle showing the description From there, be able to display the French translation of the function, and copy it in the clipboard Additionnaly I would have been able to open the English description webpage of the function using a modifier like ALT+ENTER What I tried to do was: Display the list of functions in Alfred (with their description as subtitle), so I could filter them Display t
  12. I resaved the app and saved it as a zip. Maybe Dropbox was doing something funny with it? I don't know why It said it was corrupted. I'm using El Capitan 10.11.3 btw. Did you successfullly use this automator line? I tried all combinations of capital or lower D and with and without quotes, and I had always the same result: The workflow DID skip the part for which I had entered an argument, and successfully started with the second question. But every time it sends me a feedback saying The action "Set Value of variable" wasn't given the correct data The second prompt that appears in the wor
  13. I did the initial app in Automator because I have a very limited knowledge of programming (copy/paste level). From there it seemed easier to try something in AppleScript, because they are somewhat related, and AppleScript. I have no special love for AppleScript, so maybe I can try to copy/past some python/ruby stuff. Or should I look at bash? Thanks!
  14. Thanks for your feedback! I'm not sure how the translation would fit there either. The simplest way I thought of would be to have the translation appear in the subtitle when pressing cmd while highligting a function. And pressing the CMD would copy the translated function. It appeared to me that it would be easy to encode this behaviour directly in the XML, which would mean that a CSV/XML converter would be all I needed, as long as I understood how Alfred expect its XML. The optimal way would be to have each function as a potential argument. It would look like: Step 1: Excel 1
  15. Hello, I managed to get a list of Excel functions with their translations in 15 languages I train people on spreadsheet usage in several languages, so I sometimes have to find the translated version of a function. My idea would be to have a workflow which would: 1. Display the full list of functions with their description 2. Display the translation for a given function in a user selected language 3. Copy the translation to the clipboard Of course, I have no idea on how to do that. I have a csv with all the data here. And I looked up the format Alfred works with, which i
  • Create New...