SlideShow Screenlet

Conky

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
Description:

A Screenlet that displays a slideshow from your folder or from the Flickr.com website . It also shows images in the screenlet frame .You can add new images by drag&drop them into the screenlet's window area

by Helder Fraga aka Whise

requirements python image module
Last changelog:

11 years ago

1 Added recursive folders , fixed flickr

0.9 added preserve aspect ratio thanks to Mike Peters

v0.8 added wide mode and fixed the lower case bug


v0.7 added button to set as wallaper and to open image
SlideShow 0.8
v0.6
added new resize quality select menu
added new frame skin


v0.5
added buttons on the screen
fixed some stuff

fixed a couple of stuff , now doesnt hang on startup if you dont have inet

khanhpt

11 years ago

i very like this screenlet. Can you put image into center of frame? In 1.0, if image is smaller than frame, it is put into lefe or top of frame?
Thanks.
Sory for bad english.

Report

khanhpt

11 years ago

to Whise:
I editted file SlideshowScreenlet.py to put image into center of frame.
Screenshot:
http://files.myopera.com/k51cc/files/screenshot1.png


Report

karnonas

11 years ago

wow, you really need to work on your coding skillz. I have had to change this screenlets code every single version. Good idea, but u have yet to release a working version.

Report

C

Whise

11 years ago

dont like it dont use it...

Report

vifsla

11 years ago

it's' a very nice screenlet, but it can't to scan directory with fotos recursively. could you add this into screenlet?

Report

khanhpt

11 years ago

you can set in Slideshow's properties.

Report

ghettosamson

11 years ago

can anyone point me in the right direction to get help for this screenlet to work. I am running gutsy gibbons 64 bit. I select the destination folder which contains pictures and the screenlet remains blank. Dont know what to try or do. I downloaded v.08

Report

C

Whise

11 years ago

shure i can help , read the part about dependecies

Report

ise

11 years ago

With this changes it will read all images from a directory and its subdirectories:

289,297c288,294
< for f in os.listdir(self.folders): #get all files in that folder
<
< try: #splitext[1] may fail
< if os.path.splitext(f)[1].lower() in self.use_types: #is that file of proper type?
< imgs.append(self.folders + os.sep + f) #if so, add it to our list
< #print f
< except:
< pass
< #print imgs
---
> for root, dirs, files in os.walk(self.folders): #get all files in that folder
> for file in files:
> try: #splitext[1] may fail
> if os.path.splitext(file)[1].lower() in self.use_types: #is that file of proper type?
> imgs.append(os.path.join(root,file)) #if so, add it to our list
> except:
> pass

Report

ise

11 years ago

Wired, why isn't it formatted?? Nevertheless, here is the correct output:

http://dev.archlinux.org/~daniel/file

Report

fab120

11 years ago

Thanks! It works fine!

Report

ise

11 years ago

Wired, why isn't it formatted?? Nevertheless, here is the correct output:

http://dev.archlinux.org/~daniel/file

Report

ise

11 years ago

With this changes it will read all images from a directory and its subdirectories:

289,297c288,294
< for f in os.listdir(self.folders): #get all files in that folder
<
< try: #splitext[1] may fail
< if os.path.splitext(f)[1].lower() in self.use_types: #is that file of proper type?
< imgs.append(self.folders + os.sep + f) #if so, add it to our list
< #print f
< except:
< pass
< #print imgs
---
> for root, dirs, files in os.walk(self.folders): #get all files in that folder
> for file in files:
> try: #splitext[1] may fail
> if os.path.splitext(file)[1].lower() in self.use_types: #is that file of proper type?
> imgs.append(os.path.join(root,file)) #if so, add it to our list
> except:
> pass

Report

enolive

11 years ago

sorry for the double-post :(

I've done another small modification that allows SlideShow to center the image when keep aspect ratio is on. it's really simple, I just add some borders to the image. There might be a better way to do this, but it works ;)


21c21
< import Image
---
> import Image, ImageOps
204,205c204
< h_offset = 0
< w_offset = 0
---
> border = 0
210c209,210
< h_offset = int((200-height)/2)
---
> border = int((200-height)/2)
> border = (0, border, 0, border)
215c215,217
< w_offset = int((200-width)/2)
---
> border = int((200-width)/2)
> border = (border, 0, border, 0)
> #print "Test: ", border
217c219,221
< width, height = (200, 200)
---
> border = 0
> width, height = (200, 200)
> image_new = image
230c234
<
---
> image = ImageOps.expand(image, border)
240c244
< print 'Failed to load image '
---
> print 'Failed to load image ', ex

Report

enolive

11 years ago

hello, I had some problems fetching images from flickr with 0.8 for some days. The frame allways stayed empty. I think they changed something about their site http://www.flickr.com/explore/interesting/7days/ (at least for german visitors).

However, I messed up a little bit with the code. I am an absolute Python newbie but it works again (I only had to change the find statements in fetch_image a little bit)

here is the diff output between original and patch

maybe it helps someone with the same problem!

250d249
< #print zodiacfd
254,255c253
< forecast = zodiachtml[zodiachtml.find("Photo" + chr(34)+ "><a href=" + chr(34))+16:]
< #forecast = forecast[forecast.find("<a href=" + chr(34))+9:]
---
> forecast = zodiachtml[zodiachtml.find("td class=" + chr(34) + "Photo" + chr(34))+62:]

Report

enolive

11 years ago

hello, I had some problems fetching images from flickr with 0.8 for some days. The frame allways stayed empty. I think they changed something about their site http://www.flickr.com/explore/interesting/7days/ (at least for german visitors).

However, I messed up a little bit with the code. I am an absolute Python newbie but it works again (I only had to change the find statements in fetch_image a little bit)

here is the diff output between original and patch

maybe it helps someone with the same problem!

250d249
< #print zodiacfd
254,255c253
< forecast = zodiachtml[zodiachtml.find("Photo" + chr(34)+ "><a href=" + chr(34))+16:]
< #forecast = forecast[forecast.find("<a href=" + chr(34))+9:]
---
> forecast = zodiachtml[zodiachtml.find("td class=" + chr(34) + "Photo" + chr(34))+62:]

Report

limal

11 years ago

where can I get v0.7 ?

Report

limal

11 years ago

with screenlets 0.0.12 it works!

Report

SlugO

11 years ago

Version 0.7 of SlideShow worked fine but 0.8 just gives this error and doesn't start:

CachingBackend: Loading instances from cache
CachingBackend: Loading <Slideshow1>
Found a running session of Slideshow, adding new instance by service.
Error in screenlets.services.get_service_by_name: org.freedesktop.DBus.Error.ServiceUnknown: The name org.screenlets.Slideshow was not provided by any .service files
Loading instances in: /home/janne/.config/Screenlets/Slideshow/default/
File: Slideshow1.ini
Creating new instance:
/home/janne/.themes/MurrinaCool/gtk-2.0/gtkrc:50: Murrine configuration option "squaredstyle" is not supported and will be ignored.
UPDATING SHAPE
Traceback (most recent call last):
File "/usr/local/share/screenlets/Slideshow/SlideshowScreenlet.py", line 492, in <module>
screenlets.session.create_session(SlideshowScreenlet)
File "/usr/lib/python2.5/site-packages/screenlets/session.py", line 392, in create_session
session.start()
File "/usr/lib/python2.5/site-packages/screenlets/session.py", line 177, in start
if self.__load_instances():
File "/usr/lib/python2.5/site-packages/screenlets/session.py", line 314, in __load_instances
sl = self.create_instance(id=filename[:-4], enable_saving=False)
File "/usr/lib/python2.5/site-packages/screenlets/session.py", line 106, in create_instance
sl = self.screenlet(id=id, session=self, **keyword_args)
File "/usr/local/share/screenlets/Slideshow/SlideshowScreenlet.py", line 77, in __init__
self.theme_name = "default"
File "/usr/local/share/screenlets/Slideshow/SlideshowScreenlet.py", line 117, in __setattr__
screenlets.Screenlet.__setattr__(self, name, value)
File "/usr/lib/python2.5/site-packages/screenlets/__init__.py", line 521, in __setattr__
self.load_theme(self.get_theme_dir() + value)
File "/usr/lib/python2.5/site-packages/screenlets/__init__.py", line 772, in load_theme
self.theme = ScreenletTheme(path)
File "/usr/lib/python2.5/site-packages/screenlets/__init__.py", line 124, in __init__
self.loaded = self.__load_all()
File "/usr/lib/python2.5/site-packages/screenlets/__init__.py", line 247, in __load_all
if self.load_png(fname) == False:
File "/usr/lib/python2.5/site-packages/screenlets/__init__.py", line 222, in load_png
"/" + filename)
IOError: error while reading from input stream

What's wrong with it?

Report

limal

11 years ago

I have the same problem here.

Report

ticoon

11 years ago


An "png small thumbnail" is generated of the current image display in the home folder, can we change the folder location?

maybe the folder location can be the screenlets folder?
~/.screenlets

Report

fab120

11 years ago

I have solved the problem:

Close SlideShow Screenlet


Find in SlideshowScreenlet.py the that line:
use_types = ['.jpg', '.gif', '.png']


Replace with
use_types = ['.jpg', '.gif', '.png', '.JPG', '.GIF', '.PNG']


You can add extension of another image file!!

Now save and close.

Start SlideShow Screenlet

Report

mpeters

11 years ago

A better solution would probably be to make the check case insensitive. Find line 258 in SlideshowScreenlet.py:

if os.path.splitext(f)[1] in self.use_types:

And modify it to read:

if os.path.splitext(f)[1].lower() in self.use_types:

Report

fab120

11 years ago

Yes, you are right!

Report

nebedaay

11 years ago

Hmm, I can't get it to work with any kind of picture. Is there a secret?

Report

11 years ago

1 Added recursive folders , fixed flickr

0.9 added preserve aspect ratio thanks to Mike Peters

v0.8 added wide mode and fixed the lower case bug


v0.7 added button to set as wallaper and to open image
SlideShow 0.8
v0.6
added new resize quality select menu
added new frame skin


v0.5
added buttons on the screen
fixed some stuff

fixed a couple of stuff , now doesnt hang on startup if you dont have inet

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
1.0
updated Feb 29 2008
added Aug 11 2007
downloads 24h
0
mediaviews 24h 0
pageviews 24h 6