Page 1 of 1

Geektool

Posted: October 20th, 2011, 1:25 pm
by mynameislouie
I've been using the following code to output some data to the desktop

Code: Select all

curl --silent "http://localhost:8080/api?mode=qstatus&output=xml&apikey=APIKEY" | grep -e timeleft -e mb -e filename -e speed -e state| 
sed -e /'<jobs>'/s//''/ -e /'<job>'/s//''/ -e /'<timeleft>'/s//'Time Left: '/ -e /'<\/timeleft>'/s//''/ -e /'<mb>'/s//'Size: '/ -e /'<\/mb>'/s//' Mb'/ -e /'<filename>'/s//'File: '/ -e /'<\/filename>'/s//''/ -e /'<mbleft>'/s//'Size Left: '/ -e /'<\/mbleft>'/s//' Mb'/ -e /'<speed>'/s//'Bandwidth: '/ -e /'<\/speed>'/s//'Kb\/sec'/ -e /'<state>'/s//'State: '/ -e /'<\/state>'/s//''/
it works great, but i'd like to be able to customize it a little. The output at the moment is in the format:

Code: Select all

Time left:
Size:
File:
Size Left:
Time Left:
(overall)Size Left:
Bandwidth:
(overall)Time Left:
Size:
State:
I would like it to be in the format:

Code: Select all

File: "filename" (Time Left, Size Left)
Bandwidth:
Time Left:
Size:
State:
Would anyone be able to help me out with this ? I'd really appreciate it :)