You are not logged in.
i've just pmed you 
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
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
. 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
it's really good work
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 
Last edited by geoisis (2009-08-02 20:39:49)
Offline
edit: just thought about it and I should be able to switch to cairo pretty easily, maybe tomorrow
amazing news keep it up 
Offline
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
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
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
.
there are a zillion lyric sites you can choose from.
Last edited by geoisis (2009-08-03 12:24:41)
Offline
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 
I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.
Offline
great.
did you try anything with last.fm ?
Offline
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
this just keeps getting better
could you add mpd support too please ?
nevermind i figured it out 
Last edited by geoisis (2009-08-03 21:17:46)
Offline
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
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
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
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):
I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.
Offline
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
Kyte wrote:Hi
I've got Rhyth.....
KyteWhich 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
thank you thank you thank you 
the images look ok to you? cause they look kind of ugly here.
Offline
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
Iggykoopa:
^^ two posts.
Kyte
Kyte: Always flittin' around with his head in the clouds!
Offline
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
just amazing
. can i post this threat over at archlinux ?
Offline
go ahead
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
thanx 
and keep it up!
Offline
well dere's people who post....dat's me...and dere's people who do stuff....dat's da Iggykoopa man!! 
thanks!
Kyte
Kyte: Always flittin' around with his head in the clouds!
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.