SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2009-08-02 19:41:56

geoisis
Member
Registered: 2009-08-01
Posts: 17

Re: Images in Conky (specifically rhythmbox album art)

i've just pmed you smile

one more thing, how do you call the script in conky?

${execi 1 ~/.albumc1.py}${image /home/geo/.album -s 240x240}

do i need -s ?

regarding the fonts, python can render truetype fonts ? cause the look really ugly.

Last edited by geoisis (2009-08-02 20:05:18)

Offline

Help fund CrunchBang, donate to the project!

#27 2009-08-02 20:15:27

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

I wouldn't use the -s, I may add an option to set the size of the image to the script...just gotta see if people are going to use it. I noticed the font rendering looks horrible, but I think it's something to do with PIL(python image library) I may have to switch to a different backend. All the other ones have really horrible documentation though, and it took me all afternoon to figure out PIL sad . The font I'm using is bitstream so it shouldn't look that bad.

edit: just thought about it and I should be able to switch to cairo pretty easily, maybe tomorrow


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#28 2009-08-02 20:34:33

geoisis
Member
Registered: 2009-08-01
Posts: 17

Re: Images in Conky (specifically rhythmbox album art)

it's really good work smile and i'll to try help out in anyway. i'll get rid of the -s then and try several fonts also to see better results. check this : http://www.leancrew.com/all-this/2008/1 … g-library/

sorry the link is nothing to do from what i read sad

Last edited by geoisis (2009-08-02 20:39:49)

Offline

#29 2009-08-02 20:59:09

geoisis
Member
Registered: 2009-08-01
Posts: 17

Re: Images in Conky (specifically rhythmbox album art)

iggykoopa wrote:

edit: just thought about it and I should be able to switch to cairo pretty easily, maybe tomorrow

big_smile amazing news keep it up big_smile

Offline

#30 2009-08-03 01:13:25

sirphobos
#! Member
Registered: 2009-07-23
Posts: 52

Re: Images in Conky (specifically rhythmbox album art)

I think last.fm wouldnt be a bad idea.

Now stupid question, for this to work with conky, i have to have it compiled with imlib support, correct?

Offline

#31 2009-08-03 05:41:09

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

yup, the way I'm writing it now is having everything written as one image, so you'll need imlib. I was planning on switching to last.fm for the good api it has and possibly adding scrobbling support sometime in the future for players that don't have it built in. If everyone thinks that's a bad idea let me know, if so I need a good site for artist pictures that's easy to scrape though, and maybe a good lyric site(if I do lyrics I'll just have it output as text, no point in adding that to a picture)


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#32 2009-08-03 12:23:20

geoisis
Member
Registered: 2009-08-01
Posts: 17

Re: Images in Conky (specifically rhythmbox album art)

you can always use google: http://images.google.com/images?hl=en&q=$replace(%artist%,' ','+')&btnG=Recherche+d%27images&gbv=2 , foobar2000 uses this to fetch cover and artist images.
but i don't see why you can't fetch them also from last.fm.
scrobbling would be nice but not necessary, since all major programms have that future built in smile.
there are a zillion lyric sites you can choose from.

Last edited by geoisis (2009-08-03 12:24:41)

Offline

#33 2009-08-03 15:44:05

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

Well after spending a while messing around with cairo I realized it wouldn't be an easy solution for this. But I messed around a little more and it turns out the crappy looking fonts had to do with the transparency and white text, changed it to black text and they look good. But playing around with it made me realize I should go back to outputting the text as text so it can be formatted in whatever font you choose, I'll just have it mirror the image. Should make things easier on me too big_smile


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#34 2009-08-03 16:01:25

geoisis
Member
Registered: 2009-08-01
Posts: 17

Re: Images in Conky (specifically rhythmbox album art)

big_smile great.
did you try anything with last.fm ?

Offline

#35 2009-08-03 19:24:43

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

ok I rewrote most of it http://crunchbanglinux.org/pastebin/295 . Now it has options, use -h when running it to see the available options
-s to specify size
-r for reflection(default false)
-p for player (rhythmbox and moc supported right now)
it just returns the image now and I haven't done last.fm yet, but the code is a lot cleaner and adding stuff later will be easier now. also now doesn't launch moc if it wasn't running before.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#36 2009-08-03 20:22:40

geoisis
Member
Registered: 2009-08-01
Posts: 17

Re: Images in Conky (specifically rhythmbox album art)

big_smile this just keeps getting better
could you add mpd support too please ?

nevermind i figured it out smile

Last edited by geoisis (2009-08-03 21:17:46)

Offline

#37 2009-08-04 01:06:43

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

Hi
I've got Rhythmbox into conky and it displays artist title album genre year position an length...but haven't been able to get an image it just ends up "nothing there"...tried about fifteen scripts...

then I'm not any good at scripts... just copying and pasting.

Kyte


Kyte: Always flittin' around with his head in the clouds!

Offline

#38 2009-08-04 06:32:16

rjd2k3
Member
Registered: 2009-07-18
Posts: 43

Re: Images in Conky (specifically rhythmbox album art)

Kyte wrote:

Hi
I've got Rhythmbox into conky and it displays artist title album genre year position an length...but haven't been able to get an image it just ends up "nothing there"...tried about fifteen scripts...

then I'm not any good at scripts... just copying and pasting.

Kyte

Which conky version do you have installed?


Lomo on...

Offline

#39 2009-08-04 06:53:38

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

did you try the one I just posted? the most recent version has support for rhythmbox. Also make sure your conky has imlib support to display the image.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#40 2009-08-04 15:29:09

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

here you go http://crunchbanglinux.org/pastebin/296 . Now with lastfm, mpd, and artist art support. For mpd you need to install python-mpdclient, for lastfm you need to install python-lastfm. Heres instructions for lastfm since I ran into an issue with it:
svn checkout http://python-lastfm.googlecode.com/svn/trunk/ python-lastfm
cd python-lastfm
sudo python setup.py install
cd lastfm
sudo cp -R mixin /usr/local/lib/python2.6/dist-packages/lastfm-0.2-py2.6.egg/lastfm/
sudo cp -R util /usr/local/lib/python2.6/dist-packages/lastfm-0.2-py2.6.egg/lastfm/

for artist art launch with -a and it stores the picture in ~/.artist

preview screenshot(I know my conky needs a little work):
350q5bd.png


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#41 2009-08-04 18:19:39

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

sorry to keep spamming the thread but heres another update http://crunchbanglinux.org/pastebin/297 . Should use a lot less cpu now.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#42 2009-08-04 19:00:45

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

rjd2k3 wrote:
Kyte wrote:

Hi
I've got Rhyth.....
Kyte

Which conky version do you have installed?

Sorry I missed the post...

As far as I can determine, 1.4.9

IGGYKOOPA

If that was meant for me, I don't have a folder or doc in usr/bin named "python", I have the blue boxes on a corner(executeables) for python and for pythons 2.5 and 2.6 and configs for python 2.5 and 2.6 but no "python" config document.  Are you suggesting that I make a "python" document and put the script from the pastbin in it?

If so, then am I correct to assume that I am not to place the line #!/usr/bin, but the rest of it.



Kyte

Last edited by Kyte (2009-08-04 19:11:37)


Kyte: Always flittin' around with his head in the clouds!

Offline

#43 2009-08-04 19:01:46

geoisis
Member
Registered: 2009-08-01
Posts: 17

Re: Images in Conky (specifically rhythmbox album art)

thank you thank you thank you big_smile
the images look ok to you? cause they look kind of ugly here.

Offline

#44 2009-08-04 19:12:44

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

another update http://crunchbanglinux.org/pastebin/298 . Now auto-detects what player your using (don't use -p anymore), only issue is if your running the mpd daemon but using a different player like moc it may detect mpd first and not display anything. Just make sure if your running something else mpd is turned off. Also changed the image preference from medium to large(to download from lastfm) should improve the image quality. I had it set to medium before to save on bandwidth but had noticed the images didn't look that great too.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#45 2009-08-04 19:15:55

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

Iggykoopa:

^^ two posts.

Kyte


Kyte: Always flittin' around with his head in the clouds!

Offline

#46 2009-08-04 19:34:05

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

kyte heres step by step instructions for my script:
download my script from here http://crunchbanglinux.org/pastebin/298 and save it as ~/scripts/conkymusic.py
chmod +x ~/scripts/conkymusic.py
sudo apt-get install python-mpdclient (only if you use mpd)
download this image http://ecx.images-amazon.com/images/I/11J2DMYABHL.jpg and save it as ~/.noalbum
svn checkout http://python-lastfm.googlecode.com/svn/trunk/ python-lastfm
cd python-lastfm
sudo python setup.py install
cd lastfm
sudo cp -R mixins /usr/local/lib/python2.6/dist-packages/lastfm-0.2-py2.6.egg/lastfm/
sudo cp -R util /usr/local/lib/python2.6/dist-packages/lastfm-0.2-py2.6.egg/lastfm/
now open your conkyrc and add something similar to this(changing the position how you want, and change eric to your username):
Now Playing${hr}
${offset 166}${voffset 50}${execi 5 /home/eric/scripts/conkymusic.py --artist}
${offset 166}${execi 5 /home/eric/scripts/conkymusic.py --album}
${offset 166}${execi 5 /home/eric/scripts/conkymusic.py --title}
${execi 5 /home/eric/scripts/conkymusic.py -a -r}${image /home/eric/.artist -p 0,12}${image /home/eric/.album -p 82,12}

that should be it, but if you have any other problems with it let me know. Also I need to get my own api key soon for lastfm, I "found" the one I'm using. So once I get a new one I'll put it up and ask anyone using the script to update.

edit: also if you want the images a different size call it this way(replace 100x100 with whatever size you want):
${execi 5 /home/eric/scripts/conkymusic.py -a -r -s 100x100}

edit agian: to check if your conky supports images do:
conky --version
under general it should say imlib2


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#47 2009-08-04 19:51:12

geoisis
Member
Registered: 2009-08-01
Posts: 17

Re: Images in Conky (specifically rhythmbox album art)

just amazing big_smile. can i post this threat over at archlinux ?

Offline

#48 2009-08-04 19:54:39

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

go ahead big_smile now I need to dig into the lastfm api and see if they have lyrics, can also add recommended artists and stuff like that as well.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#49 2009-08-04 20:02:43

geoisis
Member
Registered: 2009-08-01
Posts: 17

Re: Images in Conky (specifically rhythmbox album art)

thanx big_smile
and keep it up!

Offline

Be excellent to each other!

#50 2009-08-04 20:18:46

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

well dere's people who post....dat's me...and dere's people who do stuff....dat's da Iggykoopa man!! yikes

thanks!

Kyte


Kyte: Always flittin' around with his head in the clouds!

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo