I have it working well and all, but it is not really efficient because of all the needed parsing of transmission-remote -l.
What I am requesting is the option of deciding what transmission-remote should output via arguments.
I made an external program that I run with a script. here is some sample code:
Code: Select all
/usr/bin/transmission-remote -l > /tmp/transmission.info
DONE= `/home/transmission/trans_mkstatus "$TORRENTNAME" "%done" < /tmp/transmission.info`
RATIO= `/home/transmission/trans_mkstatus "$TORRENTNAME" "%ratio" < /tmp/transmission.info`
ETA= `/home/transmission/trans_mkstatus "$TORRENTNAME" "%eta" < /tmp/transmission.info`
STATUS=`/home/transmission/trans_mkstatus "$TORRENTNAME" "%status" < /tmp/transmission.info`
NAME= `/home/transmission/trans_mkstatus "$TORRENTNAME" "%name" < /tmp/transmission.info`
/usr/bin/transmission-remote -t $TORRENTNAME -l "%id %done whateverwhatever"
So.. -t should work on both ID and the torrentname, and should be able to output just exactly the info you need.
In my example script I would want to use it like this:
Code: Select all
DONE= `/usr/bin/transmission-remote -t "$TORRENTNAME" -l "%done"`
RATIO= `/usr/bin/transmission-remote -t "$TORRENTNAME" -l "%ratio"`
ETA= `/usr/bin/transmission-remote -t "$TORRENTNAME" -l "%eta"`
STATUS=`/usr/bin/transmission-remote -t "$TORRENTNAME" -l "%status"`
NAME= `/usr/bin/transmission-remote -t "$TORRENTNAME" -l "%name"`
The problem with current output is the difficulty of parsing(I solved that by writing a c program to reformat the whole output) and finding the correct torrent (since the name listed is not the same as the actual torrent filename)
Even if you are not willing to make this exactly, please atleast give us the option to select what torrents to list when using -l . preferably by using torrentname as input.
some examples of my idea..:
Code: Select all
$ transmission-remote -t "MGMT - Oracular Spectacular [2008].2134569aac5b754f.torrent" -l
ID Done Have ETA Up Down Ratio Status Name
4 87% 67.6 MB 17 min 0.0 6.7 0.00 Downloading MGMT - Oracular Spectacular [2008]
Code: Select all
$ transmission-remote -t "MGMT - Oracular Spectacular [2008].2134569aac5b754f.torrent" -l %eta
17 min
$ transmission-remote -t "MGMT - Oracular Spectacular [2008].2134569aac5b754f.torrent" -l %name
MGMT - Oracular Spectacular [2008]
Thanks for reading. Hope you will consider this.
EDIT: Just wanted to add one thing..: When using the -l %some_stat please print the true value. Like. %eta would be '1020' (seconds) and have would be '70883737' (bytes)
That will make things a whole lot easyer when wanting to make stats out of the output.
I myself update folder names to look like this: [####46%][NAME](ETA||STATUS) every minute.