Page 1 of 1

console info command cut off

Posted: Mon Jan 22, 2018 7:36 pm
by boomclick
when i use the info command from the console version of deluge, the display cuts out the top torrents in my list without a way to scroll up. to view all my torrents, i use deluge-console info | less. since this requires a seperate terminal, it is inconvenient if i want to make sure deluge is running. can you either allow scrolling in the console version, or allow us to pipe the output of info into less/more?

Re: console info command cut off

Posted: Sun Apr 08, 2018 2:28 am
by darkipod
This would be really useful for me as well, there must be some way to do this.

Re: console info command cut off

Posted: Sat Apr 14, 2018 10:26 pm
by DjLegolas
I tried what you wrote and was able to scroll through the entire list (162 torrents).
Tested on an ubuntu server, with pipe to less/more, redirection of output to a file and view it from the console-ui itself.
Also, from Windows version of deluge as a thin client to the ubuntu server and got everything redirected to a file.

Note: in both terminal and cmd there is a limit on the number of lines that can be shown as history, which can be configured but has a max limit as well.

Re: console info command cut off

Posted: Thu Apr 19, 2018 1:26 am
by darkipod
Could you please write out the line you used to pipe it to a text file?

Re: console info command cut off

Posted: Sun Apr 22, 2018 7:12 am
by DjLegolas
redirect stdout:

Code: Select all

deluge-console "connect localhost:8080; info" > deluge.info

pipe it to more/less:

Code: Select all

deluge-console "connect localhost:8080; info" | less
deluge-console "connect localhost:8080; info" | more


i used the connect command as my port is non-standard.

Re: console info command cut off

Posted: Thu Feb 28, 2019 5:20 pm
by cipherox
This might be stupid, but this might help:

Code: Select all

deluge-console info | head -120 > deluge-info.txt; cat deluge-info.txt

This will grab the output of info by the first 120 lines and replace the information in deluge-info.txt, then it will give you the output of this file, giving you the top of the .txt file or the head of deluge-console info.

If you want to do some command-fu :P use a loop every second showing the top of info:

Code: Select all

while true; do deluge-console info | head -60 ; sleep 1; done

sleep is important . . . for it to repeat, adjust it to your liking but it shouldn't be too fast, give it time to retrieve the information.

You could also add this to a bash script:

#!/bin/bash
while true;
do deluge-console info | head -80;
sleep 1;
done
exit 0

Probably not necessary, but you just have to run it instead of typing the whole command.