console info command cut off

Suggestions and discussion of future versions
Post Reply
boomclick
Member
Member
Posts: 22
Joined: Fri Jan 19, 2018 6:31 pm

console info command cut off

Post 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?
darkipod
New User
New User
Posts: 4
Joined: Sun Apr 01, 2018 4:53 am

Re: console info command cut off

Post by darkipod »

This would be really useful for me as well, there must be some way to do this.
DjLegolas
Member
Member
Posts: 35
Joined: Thu Oct 12, 2017 3:31 pm

Re: console info command cut off

Post 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.
darkipod
New User
New User
Posts: 4
Joined: Sun Apr 01, 2018 4:53 am

Re: console info command cut off

Post by darkipod »

Could you please write out the line you used to pipe it to a text file?
DjLegolas
Member
Member
Posts: 35
Joined: Thu Oct 12, 2017 3:31 pm

Re: console info command cut off

Post 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.
cipherox
New User
New User
Posts: 1
Joined: Thu Feb 28, 2019 3:51 pm

Re: console info command cut off

Post 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.
Post Reply