console info command cut off

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

console info command cut off

Postby boomclick » Mon Jan 22, 2018 7:36 pm

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

Postby darkipod » Sun Apr 08, 2018 2:28 am

This would be really useful for me as well, there must be some way to do this.

DjLegolas
Member
Member
Posts: 21
Joined: Thu Oct 12, 2017 3:31 pm

Re: console info command cut off

Postby DjLegolas » Sat Apr 14, 2018 10:26 pm

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

Postby darkipod » Thu Apr 19, 2018 1:26 am

Could you please write out the line you used to pipe it to a text file?

DjLegolas
Member
Member
Posts: 21
Joined: Thu Oct 12, 2017 3:31 pm

Re: console info command cut off

Postby DjLegolas » Sun Apr 22, 2018 7:12 am

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

Postby cipherox » Thu Feb 28, 2019 5:20 pm

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.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest