Jump to content

Starting a command-line tool (aria2)


Recommended Posts

Hi all, 

I've been trying to turn into a workflow a script I wrote to start the super-nice and useful command-line downloader aria2. For some reason I don't seem to be getting any result, so maybe someone can help me? 

The script is placed in a bin/bash sheet, and goes as follows: 

aria2c --enable-rpc --rpc-allow-origin-all \
  --conf-path $HOME/Library/Preferences/aria2.conf \
  --load-cookies $HOME/.aria/cookies.sqlite3 \
  --daemon \

As a script, it works perfectly, but in a workflow no dice.

Any ideas?

Thanks in advance!

 

Edit: after seeing all those fantastic workflows some people are creating, if anybody wants to make one with more commands than just launch aria2 (hint: pasting a url directly from the clipboard), I would be more than grateful! Even though I try to do my best, I'm not at all command-line savvy myself unfortunately…

Edited by bhanquier
Link to comment

Why, it seems my "problem" doesn't interest much  :)

Anyways, after much tinkering, I've found out a solution: apparently you need to specify the whole path to the command-line tool in question… command-line will elude me for the rest of my life I guess! So in my case (YMMV) it gives:

/usr/local/bin/aria2c --enable-rpc --rpc-allow-origin-all \
  --conf-path $HOME/.aria/aria2.conf \
  --load-cookies $HOME/.aria/cookies.sqlite3 \
  --daemon \

or you can bundle the utility in the workflow, in which case it will be: 

./aria2c --enable-rpc --rpc-allow-origin-all \
  --conf-path $HOME/.aria/aria2.conf \
  --load-cookies $HOME/.aria/cookies.sqlite3 \
  --daemon \

If it can be of help to someone else…

Link to comment

Why, it seems my "problem" doesn't interest much  :)

Anyways, after much tinkering, I've found out a solution: apparently you need to specify the whole path to the command-line tool in question… command-line will elude me for the rest of my life I guess! So in my case (YMMV) it gives:

/usr/local/bin/aria2c --enable-rpc --rpc-allow-origin-all \
  --conf-path $HOME/.aria/aria2.conf \
  --load-cookies $HOME/.aria/cookies.sqlite3 \
  --daemon \

or you can bundle the utility in the workflow, in which case it will be: 

./aria2c --enable-rpc --rpc-allow-origin-all \
  --conf-path $HOME/.aria/aria2.conf \
  --load-cookies $HOME/.aria/cookies.sqlite3 \
  --daemon \

If it can be of help to someone else…

 

The reason it's like this is because by default, Alfred doesn't import your profile settings. I believe by default that Alfred only has /sbin, /bin, /usr/sbin, and /usr/bin. This obviously would exclude the path that your file is installed in so it would indeed require the full path to run this application.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...