Results 1 to 10 of 268

Thread: Conky Deluge Python Script

Hybrid View

  1. #1
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Conky Deluge Python Script

    ArchLinux : Package support is present in the AUR. All my packages can be seen here: http://aur.archlinux.org/packages.php?SeB=m&K=kaivalagi

    Ubuntu/Debian : All the script packages have now been copied into the Conky Hardcore PPA. Any package updates will be provided by the team through this new ppa. The ppa can be found here: https://launchpad.net/~conkyhardcore/+archive/ppa. To use this ppa first delete the old ppa files using this: "sudo rm /etc/apt/sources.list.d/m-buck*". Then follow the modified first post instructions for the scripts



    Intro

    This is a simple script to display what is current downloading in Deluge. The script talks to Deluge using either xmlrpc or twisted and allows templates...

    This script (old or new versions) requires Deluge ~v0.9 upwards. The hardy repo's do not provide this version. The deb package for this is available at: http://deluge-torrent.org/downloads.php

    There is a README with the install and attached here, I suggest you give it atleast a quick once over!

    Basic Install

    Method 1: Using apt

    1) Create the necessary list file for access to the repository by running one of these.

    Lucid Lynx:
    Code:
    sudo wget -q http://www.kaivalagi.com/ubuntu/ppa/conkyhardcore-lucid.list -O /etc/apt/sources.list.d/conkyhardcore-lucid.list
    Karmic Koala:
    Code:
    sudo wget -q http://www.kaivalagi.com/ubuntu/ppa/conkyhardcore-karmic.list -O /etc/apt/sources.list.d/conkyhardcore-karmic.list
    Jaunty Jackalope:
    Code:
    sudo wget -q http://www.kaivalagi.com/ubuntu/ppa/conkyhardcore-jaunty.list -O /etc/apt/sources.list.d/conkyhardcore-jaunty.list
    Intrepid Ibex:
    Code:
    sudo wget -q http://www.kaivalagi.com/ubuntu/ppa/conkyhardcore-intrepid.list -O /etc/apt/sources.list.d/conkyhardcore-intrepid.list
    Hardy Heron:
    Code:
    sudo wget -q http://www.kaivalagi.com/ubuntu/ppa/conkyhardcore-hardy.list -O /etc/apt/sources.list.d/conkyhardcore-hardy.list
    2) Add the repository public key to your apt setup by running this:

    Code:
    wget -q http://www.kaivalagi.com/ubuntu/ppa/conkyhardcore-key.gpg -O- | sudo apt-key add -
    3) Now that is done simply install a package from the ppa, however there are 2 alternative packages to choice from:
    • conkydeluge (script version 2.13+) - the latest version of the script, to be used with Deluge v.1.2.0 onwards.
    • conkydeluge-pre120 (script version 2.12) - the old version of the script, to be used with Deluge 1.9 or lower.

    The 2 packages can't be installed together as they ultimately result in the same file names being installed

    To actually install run the following in the terminal, remember the text in blue below can be either "conkydeluge" or "conkydeluge-pre120":
    Code:
    sudo apt-get update && sudo apt-get install conkydeluge
    Method 2: Using deb file

    Download and run the attached .deb file

    Warning, this will not ensure you are kept up-to-date. Only method 1 will do that

    Method 3: Using tar.gz file

    Extract all the contents of the attached tar.gz file to an appropriate folder, and edit the conkyDeluge script to point to the correct location where conkyDeluge.py is.

    Unless you are using a non-Debian based OS I don't suggest this. Users of Debian/Ubuntu flavour OS's should ideally use method 1.

    Again will will not receive updates using this method. ONLY method 1 can do this for you

    All further details on setup are orientated around the deb package based install, so may differ from what you choose your setup to be, if done using the tarball.


    Usage Help

    To use the script in conky in it's simplist form, you'll need an exec statement like this:

    Code:
    ${exec conkyDeluge}
    To use a template for custom output, I suggest you read the README attached, and take a look at the example conkyrc and template files that are installed to "/usr/share/conkydeluge/example".

    You can get the current help options at any time by running:

    Code:
    conkyDeluge -h
    or

    Code:
    conkyDeluge --help
    Code:
    Usage: conkyDeluge [options]
    Options:
      -h, --help            show this help message and exit
      -s SERVER, --server=SERVER
                            [default: 127.0.0.1] The server to connect to where
                            the deluge core is running
      -p PORT, --port=PORT  [default: 58846] The port to connect to where the
                            deluge core is running
      -S, --showsummary     Display summary output. This is affected by the
                            --activeonly option.
      -H, --hidetorrentdetail
                            Hide torrent detail output, if used no torrent details
                            are output.
      -t FILE, --torrenttemplate=FILE
                            Template file determining the format for each torrent.
                            Use the following placeholders: [name], [state],
                            [totaldone], [totalsize], [progress], [nofiles],
                            [downloadrate], [uploadrate], [eta], [currentpeers],
                            [currentseeds], [totalpeers], [totalseeds], [ratio].
      -T FILE, --summarytemplate=FILE
                            Template file determining the format for summary
                            output. Use the following placeholders: [notorrents],
                            [totalprogress], [totaldone], [totalsize],
                            [totaldownloadrate], [totaluploadrate], [totaleta],
                            [currentpeers], [currentseeds], [totalpeers],
                            [totalseeds], [totalratio].
      -a, --activeonly      If set only info for torrents in an active state will
                            be displayed.
      -l NUMBER, --limit=NUMBER
                            [default: 0] Define the maximum number of torrents to
                            display, zero means no limit.
      -b SORTTYPE, --sortby=SORTTYPE
                            Define the sort method for output, can be "progress",
                            "queue", "eta", "download", "upload" and "ratio". Also
                            note that a torrent's state supersedes anything else
                            for sorting, in the order, from top to bottom:
                            downloading, seeding, queued, paused, unknown)
      -v, --verbose         Request verbose output, no a good idea when running
                            through conky!
      -V, --version         Displays the version of the script.
      --errorlogfile=FILE   If a filepath is set, the script appends errors to the
                            filepath.
      --infologfile=FILE    If a filepath is set, the script appends info to the
                            filepath.
    Development History

    Development history going forwards can be seen here https://code.launchpad.net/~m-buck/+junk/conkydeluge

    All packages available from me can be found here: https://launchpad.net/~conkyhardcore/+archive/ppa

    I have also created a new website, for now it is relatively sparse, but it does details my conky scripts to a certain degree. You can find it here: http://www.kaivalagi.com
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by kaivalagi; April 27th, 2010 at 08:55 PM. Reason: Updated script, see development history

  2. #2
    Join Date
    Jun 2007
    Beans
    638
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Conky Deluge Python Script

    Could you also make one for Transmission? That'll be great!
    Ubuntu User # 17490
    Currently: Fisheye 2, Diana F+, Viv UWS
    Lomografix

  3. #3
    Join Date
    Jun 2007
    Beans
    49

    Re: Conky Deluge Python Script

    Works great here, you might want to put here you need ${exec conkyDeluge} in your conky. oh and any possibility that you'll add a "time left" to the output?
    Funny thing: it seems to know the dl speed even before that is being displayed in deluge.


  4. #4
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    Quote Originally Posted by tromort View Post
    Works great here, you might want to put here you need ${exec conkyDeluge} in your conky. oh and any possibility that you'll add a "time left" to the output?
    Funny thing: it seems to know the dl speed even before that is being displayed in deluge.

    Yeah, I realised the ETA was missing, there is no direct info for this from the api, I'll need to calculate it in the script based on the amount left to download and the current download speed...if I get bored tonight at some point I'll take a look...

    Added the "how to" for conky execution too...

    Glad you like it

  5. #5
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    UPDATE

    Added eta output

    It will be in the default output to the right of "state", it can also be used in a template with <eta>

    I formatted the eta output in the same way as Deluge does it, e.g. "1d 12h" or "1w 2d" or "12h 44m" or "2m 32s" etc, you get the picture

    The first post has been updated with new deb, tarball and readme, and my personal repo has the new package for apt/synaptic too, so should update the script automatically for those who added it to their sources.

    Chimo

  6. #6
    Join Date
    Jun 2007
    Location
    North London; England
    Beans
    697
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Conky Deluge Python Script

    any chance of making one for torrentflux?
    Desktop:i7 875k|4gb OCZ platinum ddr3 2000|Evga P55 LE mobo|OCZ RevoDrive 50gb|ATI 5850 Black Edition|Silverstone FT02|corsair tx650
    Portable: 13" Macbook Pro 2.8ghz i7 16gb RAM | Asus EEE TF101 | Samsung Galaxy S2

  7. #7
    Join Date
    Apr 2008
    Beans
    33

    Re: Conky Deluge Python Script

    this has probably already been said (haven't checked) but step 2 can be simplified to:

    sudo add-apt-repository ppa:conkyhardcore/ppa
    (your version didn't actually work for me)

  8. #8
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    Quote Originally Posted by maniaq View Post
    (your version didn't actually work for me)
    Read above................

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •