Page 45 of 58 FirstFirst ... 35434445464755 ... LastLast
Results 441 to 450 of 572

Thread: Conky Rhythmbox Python Script

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

    Re: Conky Rhythmbox Python Script

    Quote Originally Posted by yiannis66 View Post
    At the and I Put this in the conkyrc:
    Code:
    ${exec conkyRhythmbox --datatype=CA}${image /tmp/cover -n -p 0,0 -s 200x200}
    and the only proplem left to solve us u cn see at the photo is
    the text(tmp/cover) stays on the cover
    The --datatype=CA call will return the image path, there is no way around it doing that

    The best approach is to use a template and have something like this where the [--datatype=CA] will be replaced with the image path when it is called:

    Code:
    ${image [--datatype=CA] -p 0,0 -s 100x100}
    then when parsed by the execp/execpi call it will be render like so:

    Code:
    ${image /tmp/cover -p 0,0 -s 100x100}
    HTH

  2. #442
    Join Date
    Oct 2010
    Location
    rhodes,greece
    Beans
    54
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Conky Rhythmbox Python Script

    You are the best kaivalagi
    Thanks you very much for your help and for the scripts that I am using for all conkys.
    if you are in hurry you go slow

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

    Re: Conky Rhythmbox Python Script

    Careful my head will explode with too much praise

    Hope you get things working how you wanted, and please post what you've done for others

    Just in case the approach with templates and images is unclear, you need to cover the following off in any of my scripts that provide image paths and template options:

    1. have a main exec call in the conkyrc using execp or execpi (needed to parse content not actually written in the conkyrc in conky fashion)
    2. the scipt needs to support template files, use a template option to point at content as required
    3. the template file can have all the formatting methods you would expect in a conkyrc such as font / color etc etc
    4. the template file also needs requests via placeholders for data by the script, these are done like so: [--datatype=CA] or [--datatype=TI] etc. These should be mentioned in the scripts help content (call it with the -h option to see it)
    5. Note that conky 1.8.1 has problems with execpi/execp based formatting with the goto and offset functions producing silly squares, 1.8.0 has no such issues

  4. #444
    Join Date
    Oct 2010
    Location
    rhodes,greece
    Beans
    54
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Conky Rhythmbox Python Script

    I have from http://crunchbanglinux.org/forums/to...box-album-art/
    A script name albumart and I made a small change at the line 8
    I put the " /tmp/cover "
    So now is that :
    Code:
    #!/bin/bash
    artist=`rhythmbox-client --print-playing-format %ta`
    album=`rhythmbox-client --print-playing-format %aa`
    str="`echo "$artist $album" | sed -e s/\\ /+/g`"
    wget `wget "http://www.albumart.org/index.php?srchkey=$str&itempage=1&newsearch=1&searchindex=Music" -q -O - | 
    grep "http://www.albumart.org/images/zoom-icon.jpg" -m 1 | 
    sed -e 's/" border="0" class="image_border.*//' |
    sed -e 's/.*img src="//'` -q -O /tmp/cover
    Isave it in my home folder and I make my conkyrc after TEXT:
    Code:
    ${font Santana:size=12}${color FFFF00}${exec conkyRhythmbox --datatype=AR}
    ${exec conkyRhythmbox --datatype=AL}
    ${exec conkyRhythmbox --datatype=PP}%
    ${exec conkyRhythmbox --datatype=CA}${image /tmp/cover -n -p 10,100 -s 200x200}
    ${exec ~/albumart}
    And everythink is perfect.
    if you are in hurry you go slow

  5. #445
    Join Date
    Mar 2010
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Conky Rhythmbox Python Script

    Quote Originally Posted by kaivalagi View Post
    The --datatype=CA call will return the image path, there is no way around it doing that

    The best approach is to use a template and have something like this where the [--datatype=CA] will be replaced with the image path when it is called:

    Code:
    ${image [--datatype=CA] -p 0,0 -s 100x100}
    then when parsed by the execp/execpi call it will be render like so:

    Code:
    ${image /tmp/cover -p 0,0 -s 100x100}
    HTH
    Wow

    Thanks Mark, I had same question with conkyClementine and this answer solved my problem.

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

    Re: Conky Rhythmbox Python Script

    Quote Originally Posted by karmila View Post
    Wow

    Thanks Mark, I had same question with conkyClementine and this answer solved my problem.
    You could do it this way but you may not even need the --datatype=CA thing as if you run the conkyClementine-GetCoverart script it will create a file in a known path instead on track change (much more efficient)...not all players work with an alternative script like this but clementine does as it presents the event handlers in it's d-bus methods

  7. #447
    Join Date
    Mar 2010
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Conky Rhythmbox Python Script

    Quote Originally Posted by kaivalagi View Post
    You could do it this way but you may not even need the --datatype=CA thing as if you run the conkyClementine-GetCoverart script it will create a file in a known path instead on track change (much more efficient)...not all players work with an alternative script like this but clementine does as it presents the event handlers in it's d-bus methods
    That would be much better.

    This is CA part from my conkyrc
    Code:
    ${execp conkyClementine --template=/path/to/conkyClementine.template}
    And this is the template
    Code:
    ${image [--datatype=CA] -p 30,290 -s 62x62}
    I run GetCoverart.py script at terminal and see how it works but how to add the script to conkyrc?

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

    Re: Conky Rhythmbox Python Script

    Quote Originally Posted by karmila View Post
    That would be much better.

    This is CA part from my conkyrc
    Code:
    ${execp conkyClementine --template=/path/to/conkyClementine.template}
    And this is the template
    Code:
    ${image [--datatype=CA] -p 30,290 -s 62x62}
    I run GetCoverart.py script at terminal and see how it works but how to add the script to conkyrc?
    Posted a bit of the history and a reply in the conkyClementine thread where this discussion belongs
    http://ubuntuforums.org/showpost.php...9&postcount=33

  9. #449
    Join Date
    Sep 2010
    Location
    Aotearoa
    Beans
    59

    Re: Conky Rhythmbox Python Script

    Is it possible to convert %20 etc to the keyboard characters, when i run conkyRhythmbox --datatype=CA it outputs everything right it just has %20, %5 etc instead, i can't use this in my conky setup

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

    Re: Conky Rhythmbox Python Script

    Quote Originally Posted by vehemoth View Post
    Is it possible to convert %20 etc to the keyboard characters, when i run conkyRhythmbox --datatype=CA it outputs everything right it just has %20, %5 etc instead, i can't use this in my conky setup
    What version of conkyRhythmbox are you running, the latest should "unquote" all these character codes...%20 => space etc

    The current version is 2.17

    Code:
    conkyRhythmbox --version
    You're not using conky colors or something like that are you? If you are that will be why, always out of date those...

Page 45 of 58 FirstFirst ... 35434445464755 ... 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
  •