Jump to content


Community Hero
  • Content Count

  • Joined

  • Last visited

  • Days Won


deanishe last won the day on January 4

deanishe had the most liked content!

About deanishe

  • Rank
    Workflow Expert / Moderator

Contact Methods

  • Twitter

Profile Information

  • Gender
  • Location
  • Interests
    Python, beer

Recent Profile Visitors

16,674 profile views
  1. deanishe

    calendar help

    FWIW, Alfred's file search is not good for searching ICS files if you have many repeating events. The way it works just isn't a good fit for calendar data. It doesn't understand event dates, so it can't show dates in the results and it can't order the events in a way that makes sense for calendar data.
  2. deanishe

    calendar help

    Unlike contacts, Alfred doesn't read your calendars database. If you want to view calendar events in Alfred, you need to point it to .ics files for those events (and add the corresponding file types to Alfred). If you use Calendar.app, it should export all its events as files under ~/Library/Calendars. So add that folder to your Search Scope and add the following filetypes under Advanced… com.apple.ical.ics.event com.apple.ical.ics
  3. deanishe

    Yeoman generator to create python workflows

    Handy. You should probably change it to use the Workflow3 class, not Workflow. Workflow is for Alfred 2 and doesn't support Alfred 3's new features.
  4. That's a good way to test if a website is online. ping is a better choice for checking your own connection, imo. ping -c 1 google.com should succeed much more quickly than loading a webpage. If you're offline, I suppose the speed would be determined by the command's timeout.
  5. That's caused by echo. It adds a newline to its output so the next echo is on the next line. Use echo -n "online" to suppress the additional newline. Out of interest, is there a particular reason you're using netcat instead of cURL or ping to tell if you're online?
  6. You're doing the encoding yourself in the workflow: That's not a good way to URL-encode a query: spaces aren't the only characters that need replacing. Here's a fixed version that shows the query in the notification and properly URL-encodes the query.
  7. deanishe

    Paste with indent?

    On GitHub you can use fenced code blocks instead of indenting. It’s a lot easier that way, imo, because you don’t have to change the code. Otherwise, I dare say you can’t find a workflow to do the indenting because people just use their code editor to do it, or didn’t think it was worth sharing such a trivial workflow.
  8. deanishe

    Foot Pedals / Udemy

    Also, it's seems like a good idea to page @nikivi. This pedal sounds right up his street.
  9. deanishe

    Foot Pedals / Udemy

    I don't follow you. How would Alfred generating keystrokes help with the pedal? It seems to me, you want to use the pedal to generate keystrokes and then create a corresponding Hotkey in Alfred that is activated when you hit the pedal. Connect that Hotkey to the script you want to run and you're there. One potential problem with this is that when you activate an app via AppleScript, it works like command-tabbing to the app, i.e. all its windows are brought to the front. So you'll have to be careful that none of the browser/editor (or whatever app you're working with) windows overlap. You might want to consider using something like Epichrome to create a site-specific browser for Udemy. That way you won't have to close or re-arrange all your regular browser windows so they don't cover anything important when you switch focus to the Udemy window. Is it not possible to watch Udemy videos in a regular video player like VLC or mpv? youtube-dl apparently supports it, which means mpv does, too. That's why videos suck for a lot of kinds of tutorials: they're basically impossible to follow in real time. Text (with images and short videos/animations as necessary) is waaay better. There's no stop-rewind-repeat. You just read along at your own speed. Or just re-read the previous paragraph in the text(book)… ¯\_(ツ)_/¯
  10. deanishe

    Foot Pedals / Udemy

    Hi Chris, welcome to the forum. Your question doesn't really have anything to do with Alfred. Alfred is a launcher, not an automation application. It runs things, and you're wanting to use a foot pedal to perform the role that Alfred would normally perform. It may well be possible to do what you want, but I can't say for sure. Firstly, you'd need to know whether it's at all possible to control a Udemy video from outside your browser. It sounds like you'd need to inject some JavaScript into the Udemy page that tells the video to skip. You can also simulate keypresses via AppleScript if the video player supports any keyboard shortcuts, but that's probably not suitable for your case because it means bringing the browser to the front, which will interfere with the other window you're working in. Secondly, once you've figured out the scripts you need, you need to know how to run them from your foot pedal. But you haven't explained at all how that works. Does it have its own software? Does it just simulate keypresses (in which case Alfred could help to connect the pedal to the scripts)? It's possible that some forum member is also a Udemy and/or pedal user and can help you. But I think you would have a better chance of success asking on a more relevant forum, such as one related to Udemy, your pedal, or a general Apple scripting/automation forum like [Ask Different](https://apple.stackexchange.com).
  11. So you just don't want the data to stay on the clipboard? You can simulate typing text with AppleScript: tell application "System Events" to keystroke "your text goes here"
  12. Snippets actually use the clipboard. Alfred just restores the old clipboard content after the snippet has been expanded. What is your objection to using the clipboard?
  13. Change the echo line to echo -n "{query}"
  14. And what exactly do you want to see in the notification? I think I just added a note or three called "deans-test" to your thing. I've tried messing with the URL/query, but it doesn't seem to make much difference to the API response. From my reading of the API docs, however, a bad call should return a 4xx response. I can't get it to, but you're not checking for failure in any case. Changing your Run Script to the following should help (replace success with whatever you want to be shown in the notification body): curl -sSL $ZAP_URL?note="{query}" >/dev/null echo -n "success" That sends whatever curl returns to /dev/null (i.e. a blackhole) and you'll only see what's echoed in the notification. If that's okay for you, delete the above workflow from your Dropbox, so Internet randos can't spam your Zapier with stuff.
  15. I'm not saying that it's an ideal solution. But it does work right now. This feature request is over 2 years old, and I have no idea if or when it may ever be implemented. So while you wait for official support, you can still actually have the feature via the somewhat clunky-to-set-up method of downloading, editing and running the linked Python script once (you don't need the bash script).