Page 1 of 24 12311 ... LastLast
Results 1 to 10 of 232

Thread: Conky Exaile Python Script

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

    Conky Exaile 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 Companions PPA. Any package updates will be provided by the team through this new ppa. The ppa can be found here: https://launchpad.net/~conky-companions/+archive/ppa. To use this ppa first delete the old ppa files using this:
    Code:
    sudo rm /etc/apt/sources.list.d/m-buck* && sudo rm /etc/apt/sources.list.d/conkyhardcore*
    Then follow the modified first post instructions for the scripts


    Intro

    This is a simple script to display what is current playing in Exaile. The script talks to Exaile using dbus, the same way the Exaile command line output options work but allowing more options and templates...

    There is a README with the install, I suggest you give it atleast a quick once over! It can be found in the installation folder, normally following the path of /usr/share/conky<scriptname>/

    Basic Install

    Method 1: Using apt

    1) Add the repository to your OS install:
    Code:
    sudo add-apt-repository ppa:conky-companions/ppa
    * Note if you are running 9.10 or below then refer to the PPA link at the end of this post for help on installing from the ppa, good guidance can be found on the launchpad site

    2) Now that is done simply run the following to update your repo cache and install the script:

    Code:
    sudo apt-get update && sudo apt-get install conkyexaile
    Method 2: Using deb file

    Run the .deb file available at the Conky Companions PPA site here: https://launchpad.net/~conky-compani.../ppa/+packages

    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 tar.gz file to an appropriate folder, and edit the conkyExaile script to point to the correct location where conkyExaile.py is. The tar.gz file is available at the Conky Companions PPA site here: https://launchpad.net/~conky-compani.../ppa/+packages

    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

    You can get the current help options at any time by running (change the path as necessary):

    Code:
    conkyExaile -h
    or

    Code:
    conkyExaile --help
    Code:
    Usage: conkyExaile [options]
    Options:
      -h, --help            show this help message and exit
      -t FILE, --template=FILE
                            define a template file to generate output in one call.
                            A displayable item in the file is in the form
                            [--datatype=TI]. The following are possible options
                            within each item: --datatype,--ratingchar. Note that
                            the short forms of the options are not currently
                            supported! None of these options are applicable at
                            command line when using templates.
      -d DATATYPE, --datatype=DATATYPE
                            [default: TI] The data type options are: ST (status),
                            CA (coverart), TI (title), AL (album), AR (artist), GE
                            (genre), YR (year), TN (track number), FN (file name),
                            BR (bitrate), LE (length), PP (current position in
                            percent), PT (current position in time), VO (volume),
                            RT (rating). Not applicable at command line when using
                            templates.
      -r CHAR, --ratingchar=CHAR
                            [default: *] The output character for the ratings
                            scale. Command line option overridden if used in
                            templates.
      -s TEXT, --statustext=TEXT
                            [default: Playing,Paused,Stopped] The text must be
                            comma delimited in the form 'A,B,C'. Command line
                            option overridden if used in templates.
      -n, --nounknownoutput
                            Turn off unknown output such as "Unknown" for title
                            and "0:00" for length. Command line option overridden
                            if used in templates.
      -S, --secondsoutput   Force all position and length output to be in seconds
                            only.
      -m LENGTH, --maxlength=LENGTH
                            [default: 0] Define the maximum length of any
                            datatypes output, if truncated the output ends in
                            "..."
      -v, --verbose         Request verbose output, not 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/~conky-companions/+junk/conkyexaile
    All packages available from me can be found here: https://launchpad.net/~conky-companions/+archive/ppa
    Attached Images Attached Images
    Last edited by kaivalagi; December 14th, 2010 at 11:08 PM. Reason: Script updated, see dev history

  2. #2
    Join Date
    Jun 2007
    Beans
    30
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Conky Exaile Python Script

    This is nice. I have a problem when there is nothing playing. It will just display "Unknown", which isn't really very nice. Is there a way of making it display nothing at all if Exaile is running?

  3. #3
    Join Date
    Jun 2007
    Beans
    30
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Thumbs down Re: Conky Exaile Python Script

    Also I get this when I close Exaile
    Code:
    File "/usr/share/conkyexaile/conkyExaile.py", line 270, in <module>
        conkyexaile.outputData()
      File "/usr/share/conkyexaile/conkyExaile.py", line 241, in outputData
        print output.encode("utf-8")
    AttributeError: 'NoneType' object has no attribute 'encode'

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

    Re: Conky Exaile Python Script

    Okay, I'm going to start updating the script.

    I like having the unknown output, so I think I'll add an option to switch output on or off when no data is available

    I've also found out why the script throws a wobbly when exaile isn't running

    Give me a day or so... edit: hour or so..
    Last edited by kaivalagi; September 22nd, 2008 at 01:10 AM.

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

    Re: Conky Exaile Python Script

    UPDATE

    Added --nounknownoutput option to turn off "Unknown" and "0:00" as default output for the unknown. This works in both normal and template modes

    The script will handle no Exaile running and stopped tracks much nicer too.

    The files in the first post have been updated, and the new package is available via apt.

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

    Re: Conky Exaile Python Script

    UPDATE

    I've updated the script to only call the dbus data retirevial once and reuse the data through template output. Also updated slightly to cope better with unknown output.

    The files in the first post have been updated, and the new package is available via apt.

    Note: this is now an equivalent script for Rhythmbox, see my sig for the link

  7. #7
    Join Date
    Aug 2008
    Location
    germany
    Beans
    857

    Re: Conky Exaile Python Script

    Thank you very much, Sir

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

    Re: Conky Exaile Python Script

    UPDATE

    I've updated the script as follows:

    • Updated to handle when no music is playing, no unnecessary dbus calls will be made
    • Updated rating output generation to use ljust string function


    The first post attachments have been updated, and the apt package is available

  9. #9
    Join Date
    Jul 2007
    Location
    Brugge, België
    Beans
    2,933

    Re: Conky Exaile Python Script

    Why not just use this in .conkyrc itself?

    Code:
    ${execi 10 exaile --get-title} - ${execi 10 exaile --get-artist}

  10. #10
    Join Date
    Aug 2008
    Location
    germany
    Beans
    857

    Re: Conky Exaile Python Script

    Because this will start exaile even if its not running? Just to state obvious...

Page 1 of 24 12311 ... LastLast

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
  •