import pango
import gobject

try:
    import Image
except:
    print "Error - Please install python image module"
import os

# import re
# from  urllib import urlopen
import commands
import random
from screenlets import Plugins

Flickr = Plugins.importAPI("Flickr")


class SlideshowScreenlet(screenlets.Screenlet):
    """A Screenlet that displays a slideshow from your folder or from the Flickr.com website.You can add new images by drag drop them into the screenlet's window area. You need a package called Python imaging"""

    # --------------------------------------------------------------------------
    # meta-info, options
    # --------------------------------------------------------------------------

    __name__ = "SlideshowScreenlet"
    __version__ = "1.3"
    __author__ = "Helder Fraga aka Whise(+David Lyons+Ross Adamson)"
    __desc__ = __doc__

    # attributes
from screenlets.options import StringOption, IntOption, BoolOption, FontOption, ColorOption
from screenlets.options import AccountOption

import gobject
import threading
import cairo
import pango
import socket
import math
import poplib
import imaplib
import os
from gtk import Tooltips
from screenlets import Plugins

mail = Plugins.importAPI('Mail')

# error messages

#MSG_CONNECTION_FAILED	= _("Error while connecting to server.")
#MSG_FETCH_MAILS_FAILED	= _("Unable to retrieve mails from server.")
#MSG_AUTH_FAILED = _("Error on login - invalid login data given? Some hosts \
#may block connections for a certain interval before allowing reconnects.")              #maybe these error messages are not used


# superclass for new backends (could be improved, I guess - currently only
# designed for retrieving the number of mails in the backend because some
# backend do not support counting of new-mails)


Ejemplo n.º 3
0
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# 
# Weather plugin to obtain weather information. 
# All info is obtained from weather.com.
#
# Rastko Karadzic <*****@*****.**>
#

from urllib import urlopen
import socket	
import ast
from screenlets import Plugins
proxy = Plugins.importAPI('Proxy')





def getZipCode(cityName):
	""" Finds ZIP code for a given city name from http://www.weather.com .
		Returns dictionary (or array of dictionaries if multiple cities from different countries/states found) in format:
		{'name':'cityName','country':'countryShorName', 'countryName':'countryFullName', 'state': 'state', 'key': 'cityZIP', 'type':locationType, 'class': '??'}
		example:
		{'name': 'Belgrade', 'country': 'US', 'countryName': 'UNITED STATES OF AMERICA', 'state': 'ME', 'key': 'USME0025', 'type': 1, 'class': 'location'}
	"""
	proxies = proxy.Proxy().get_proxy()
	try:
		data = urlopen('http://wxdata.weather.com/wxdata/ta/'+cityName.replace(" ","+")+'.js?max=10&key=2227ef4c-dfa4-11e0-80d5-0022198344f4',proxies=proxies).read()
Ejemplo n.º 4
0
# Thank you for using free software!

#  StarCalendarScreenlet (C) 2010 Saeed Rasooli
#  ClearCalendarScreenlet (C) Whise aka Helder Fraga


import screenlets
from screenlets.options import StringOption, BoolOption, ColorOption
import cairo
import pango
import gtk
import gobject
import datetime
import locale
from screenlets import Plugins
iCal = Plugins.importAPI('iCal')
import sys


class StarCalendarScreenlet(screenlets.Screenlet):
    """
       Screenlet version of StarCalendar, a perfect calendar program
    """

    # default meta-info for Screenlets
    __name__ = 'StarCalendarScreenlet'
    __version__ = '2.0.0'
    __author__ = 'Saeed Rasooli'
    __desc__ = ''

    # internals
Ejemplo n.º 5
0
from screenlets.options import StringOption, IntOption, BoolOption, FontOption, ColorOption
from screenlets.options import AccountOption

import gobject
import threading
import cairo
import pango
import socket
import math
import poplib
import imaplib
import os
from gtk import Tooltips
from screenlets import Plugins

mail = Plugins.importAPI('Mail')

# error messages

#MSG_CONNECTION_FAILED	= _("Error while connecting to server.")
#MSG_FETCH_MAILS_FAILED	= _("Unable to retrieve mails from server.")
#MSG_AUTH_FAILED = _("Error on login - invalid login data given? Some hosts \
#may block connections for a certain interval before allowing reconnects.")              #maybe these error messages are not used

# superclass for new backends (could be improved, I guess - currently only
# designed for retrieving the number of mails in the backend because some
# backend do not support counting of new-mails)

#use gettext for translation
import gettext