Jump to content

oulipo

Member
  • Posts

    22
  • Joined

  • Last visited

Posts posted by oulipo

  1. Okay, thanks for the answer

     

    However, in this case it is not directly the utility I use, but rather an utility (ffmpeg) used by the utility (youtube-dl) I use. Is there a way to load the user's default $PATH variable when launching Alfred script? (it seems that the PATH must not be the correct one since it had not found `ffmpeg` :)

  2. I've done it again in the shell and it works, I'm starting to believe that youtube-dl has not the same behavior when launching from the Alfred bash, perhaps because the youtube-dl script relies on ffmpeg and it does not find it in the PATH when launched from Alfred? How could I force this? :)

  3. 
    

    ~/tmp❯ url="www.youtube.com/watch?v=JllJTYrbn-w"

    ~/tmp❯ /usr/local/bin/youtube-dl --extract-audio --audio-format=mp3 -f 18 -o "%(title)s.%(ext)s" "$url"

    [youtube] Setting language

    [youtube] JllJTYrbn-w: Downloading video webpage

    [youtube] JllJTYrbn-w: Downloading video info webpage

    [youtube] JllJTYrbn-w: Extracting video information

    [download] Destination: We Were Evergreen - Penguins & Moonboots (2009).mp4

    [download] 100.0% of 12.96MiB at 199.16KiB/s ETA 00:00

    [ffmpeg] Destination: We Were Evergreen - Penguins & Moonboots (2009).mp3

    Deleting original file We Were Evergreen - Penguins & Moonboots (2009).mp4 (pass -k to keep)

    ~/tmp❯ ls

    ▕-rw-r--r--▏14 sec │ 3.1M│We Were Evergreen - Penguins & Moonboots (2009).mp3

  4. Perhaps this depends on the particular video that you are trying to download, or perhaps there was a problem with the download?

     

    I was trying with

     and it was working correctly in bash

     

    but indeed it would be nice that the workflow allows for errors to filter through to the Grunt notifications, do you know how this could be done?

  5. I slightly modified a youtube-dl workflow to add an action to download the audio, I used this script

    url="{query}"
    if [ -z $url ]
    then
    	echo "No url provided"
    else
    	/usr/local/bin/youtube-dl --extract-audio --audio-format=mp3 -f 18 -o "$HOME/Desktop/%(title)s.%(ext)s" "{query}"
    	echo "Completed"
    fi
    
    

    for some reason, if I type an equivalent command in a shell, this will result in an audio named "My Video.mp3" on my desktop, but if I use the Alfred Workflow, this will result in a video named "My Video.mp4" (and not only the audio)

     

    Someone sees where there might be a problem?

     

    As a reference https://dl.dropboxusercontent.com/u/70378973/Youtube%20Download.alfredworkflow

  6. I've tried to no avail to create a workflow using AppleScript that counts the number of words in the selection of the topmost window, I'd like it to work using a keyword rather than a hotkey in order not to clutter my hotkey, someone knows if this is possible? Or is it only feasible to count the number of words of the current clipboard for instance? (I'd rather have a script that counts the words without having to copy to clipboard)  

×
×
  • Create New...