Jump to content


Community Hero
  • Content Count

  • Joined

  • Last visited

  • Days Won


vitor last won the day on August 21

vitor had the most liked content!

About vitor

  • Rank
    Workflow Expert / Moderator

Contact Methods

  • Twitter
  • Website URL

Recent Profile Visitors

14,996 profile views
  1. There is plenty wrong with Bash, but nothing wrong with you using it. It’s an idiosyncratic but capable glue language that I still use regularly. You can find it pretty much everywhere and be sure it will work with some consistency. But the way you’re writing it could indeed be improved upon. It makes little sense to keep escaping double quotes when you can use single quotes. Also, there’s no need for printf '%s\n' or so many of them. A single echo (or a Here Document) suffices. Your code isn’t working because Dynamic Placeholders aren‘t meant to be used in Alfred’s non-code areas. It wouldn’t be wise for Alfred to replace them everywhere and risk breaking your code. As a workaround, you may connect a Keyword Input to an Argument and Variables Utility that saves the clipboard contents as variables to be used in the Script Filter. Be aware that there is bound to be some breakage when the raw clipboard contents interact with the code, such as when you have a quotation mark in the clipboard. That is why raw Bash is not a good choice in this case — you need to sanitise your input beforehand, and libraries are good for that. Here’s a ready-made Workflow. I’ve kept and fixed the Bash example so you can still reference how your code could have been, but the end result uses Ruby. Finally I’ll ask that in the future, when asking for help with a Workflow, please upload it somewhere as it’s hard to help without access to it. Debugging can already be hard with access to the code, even harder to do so by guessing from a description. There are multiple places where the code or Workflow setup can be wrong. Without looking at it we’re mostly shooting in the dark. The Reporting Problems with Workflows topic gives a nice overview on how to build an effective report.
  2. Welcome @llanito, Further information will be required to diagnose your problem. Please read the following post on how to write an effective bug report.
  3. I was away for a few days, but I’m looking at this again. That’s on purpose and won’t be changed any time soon. There’s a discrepancy between what youtube-dl reports it will download and what it really does given best. I’ve decided on downloading “the best mp4” because in my tests it was a more common format and more useful on macOS (can be previewed with QuickLook). audio_format only affects audio-only downloads. That’s a good point. For everyone with an issue, do you have custom download_dir or watchlist_download_dir values (Workfow Environment Variables)? What are they? If you delete them, does the issue go away? Paths should be absolute or use ~ to represent the home directory (e.g. ~/Downloads). It may be worth to delete and redownload the Workflow but tell Alfred to not import the previous settings. DownVid won’t auto-update without telling you, but the underlying youtube-dl might. After this post, who still has an issue?
  4. The one I linked previously. When you add an External Trigger, Alfred shows you the sample AppleScript code you need to invoke. How you call the AppleScript is up to you. If you were doing it in a Terminal, you’d do something like osascript -e 'CODE HERE'.
  5. I should’ve been clearer — there’s no URL scheme you can use, the only way to do it is via AppleScript.
  6. Welcome @Uhnnohn, What you’re looking for are External Triggers.
  7. Welcome @BlitzKraft, How are you opening Alfred? That isn’t the standard window where you can input commands.
  8. Alfred Preferences → Features → Snippets → Auto expansion options → Tweaking → Simulated key event speed (make it slower).
  9. Welcome @and1, Could you please clarify your request? I have no idea what you’re asking about.
  10. Thank you. The app always show the remaining timer in the menubar, a notification would be repeated information. Unless, I guess, if you’re using an app in full screen. I’ll think about it, but make no promises.
  11. This isn’t a bug in Alfred, but in the Workflow. It’s at its source that you need to report it.
  12. _sharedresources exports the PATH inside the script it runs as /usr/local/bin:"${shared_resources_bin}":"${PATH}". In theory, if the original PATH was empty the new one would lack /usr/bin/, where sed and friends live, and possibly other important system paths. Which is why I suggested looking for the tools via which in a terminal. But I see no reason why Alfred would be passing an empty PATH, and to only a few people. Either way, the problem would still lie outside the Workflow. I could check what PATH Alfred uses and set it directly in _sharedresouces, but I dislike that solution from a coding and future-proofing perspective.
  13. Update. When opening bookmark in Pinboard, remove the protocol from the search. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.
  14. Try deleting the directory, not the files inside.
  15. I may be wrong, but at least sed’s message should include the path, that being the case (sed: /some/path: No such file or directory). I don’t know, but two people experiencing it has me on alert that the error may not be where I think it is. I have an idea where the problem may be, but not the cause. @jwz @s95hc8 If you open a terminal and try: which sed which awk which youtube-dl What are the results?
  • Create New...