Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Bhishan

  1. I have a very simple File Action workflow which reads the filename and also needs two user given inputs. The workflow I have work done so far is shared here. I was successful to get the name of the input file, but reading the arguments is giving a problem. I apologize in advance, this is a noob question, but it is taking me more than one hours and still no luck.
  2. @deanishe @vitor Big THANKS guys, Finally I fixed the problem with your help. I had just quoting problem for shell variables: Bad: $bash_variable # This does not escape characters Good: "${bash_variable}" # This escapes characters in variables itself
  3. @deanishe @vitor Getting aside from the actual youtube-dl command, the command needed is this: cd ~/Google\ Drive/Music/Downloaded touch "this file had space and @ # etc.webm" filename=$(ls *.webm) echo $filename >> output.txt # This works good touch $filename # This fails, creates multiple files for each space-separated name of the input file How can we get a shell escaped variable in Alfred by reading the filename in bash?
  4. @deanishe @vitor Thanks folks, now I can get two variable but again have the shell escaping problem. The workflow does not work still. The updated workflow with youtube-dl and ffmpeg commands is uploaded in github link . In bash script it can be done in very few lines: # initial x seconds trimmed mp3 song # mytrim 36 https://youtu.be/f1qz8vn3XbY?list=RDYuXLN23ZGQo&t=219 mytrim() { local downloaded_file /opt/local/bin/youtube-dl --extract-audio --embed-thumbnail --audio-format mp3 -o "%(title)s.%(ext)s" $2 downloaded_file=$(/opt/local/bin/yout
  5. @vitor My bad, that was just an example case how I want to use the variable, I have no problem with that code, I just need to get the value of the argument. For example, How can we write following things in the text file '~/Downloads/hello.txt' ? 25 https://www.youtube.com/watch?v=kJQP7kiw5Fk I have updated both the question here and the workflow in GitHub. My apologies for unnecessary complications.
  6. @vitor, Thanks for the response, I have given the link of workflow in the question. The link opens github page and we can download the zip file and look at the workflow.
  7. I am learning how to use the Alfred to make some interesting workflows. I was modifying a workflow so that it takes a user argument, and passes that variable to the last part of the workflow. Alfred command: trim 25 Last part of Alfred gives: the youtube link How can we get the user given argument : eg. 25 Required output in ~/Downloads/hello.txt: 25 https://www.youtube.com/watch?v=kJQP7kiw5Fk The link of the workflow is shared in github alfred two arguments . Its a noob question, but, I would appreciate your help. Thank
  8. Can we expand snippets only after hitting the delimiter keys such as space, tab, enter? For example, I want to assign: \\a expands to \alpha \\a2 expands to \alpha^2 Problem: Whenever I type \\a it expands to \alpha and can not type \\aa2 so that the second one works. This is possible in in another text expanding app called aText. There we can expand the snippet at the delimiter. If we type \\aa and hit space or tab or enter, it will expand the snippet and keep (or not keep) the delimiter, can we do same in Alfred?
  • Create New...