conduit r1444 - in trunk: . conduit/dataproviders conduit/datatypes conduit/modules/FlickrModule conduit/modules/GoogleModule conduit/modules/ZotoModule



Author: jstowers
Date: Mon May  5 11:18:59 2008
New Revision: 1444
URL: http://svn.gnome.org/viewvc/conduit?rev=1444&view=rev

Log:
2008-05-05  John Stowers  <john stowers gmail com>

	* NEWS: Mention new zoto module
	* conduit/dataproviders/Image.py:
	* conduit/datatypes/Photo.py:
	* conduit/modules/FlickrModule/FlickrModule.py:
	* conduit/modules/GoogleModule/GoogleModule.py: 
	* conduit/modules/ZotoModule/ZotoModule.py: Add captions to photos
	when uploading. Fixes #521810 and #530979.



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/conduit/dataproviders/Image.py
   trunk/conduit/datatypes/Photo.py
   trunk/conduit/modules/FlickrModule/FlickrModule.py
   trunk/conduit/modules/GoogleModule/GoogleModule.py
   trunk/conduit/modules/ZotoModule/ZotoModule.py

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Mon May  5 11:18:59 2008
@@ -1,6 +1,6 @@
 NEW in 0.3.11:
 ==============
-* 
+* Support ZOTO Photos
 
 NEW in 0.3.10:
 ==============

Modified: trunk/conduit/dataproviders/Image.py
==============================================================================
--- trunk/conduit/dataproviders/Image.py	(original)
+++ trunk/conduit/dataproviders/Image.py	Mon May  5 11:18:59 2008
@@ -12,7 +12,7 @@
     and keep the _upload_info method on the ImageSink retain
     its api
     """
-    def __init__ (self, url, mimeType, name=None, tags=None, caption=None):
+    def __init__ (self, url, mimeType, name="", tags=(), caption=""):
         self.url = url
         self.mimeType = mimeType
         self.name = name

Modified: trunk/conduit/datatypes/Photo.py
==============================================================================
--- trunk/conduit/datatypes/Photo.py	(original)
+++ trunk/conduit/datatypes/Photo.py	Mon May  5 11:18:59 2008
@@ -54,9 +54,6 @@
         return self._caption
 
     def set_caption(self, caption):
-        """
-        Sets the tags of the datatype
-        """
         self._caption = caption
         
     def __getstate__(self):

Modified: trunk/conduit/modules/FlickrModule/FlickrModule.py
==============================================================================
--- trunk/conduit/modules/FlickrModule/FlickrModule.py	(original)
+++ trunk/conduit/modules/FlickrModule/FlickrModule.py	Mon May  5 11:18:59 2008
@@ -116,6 +116,7 @@
         ret = self.fapi.upload( 
                             filename=uploadInfo.url,
                             title=uploadInfo.name,
+                            description=uploadInfo.caption,
                             is_public="%i" % self.showPublic,
                             tags=' '.join(tag.replace(' ', '_') for tag in uploadInfo.tags))
 

Modified: trunk/conduit/modules/GoogleModule/GoogleModule.py
==============================================================================
--- trunk/conduit/modules/GoogleModule/GoogleModule.py	(original)
+++ trunk/conduit/modules/GoogleModule/GoogleModule.py	Mon May  5 11:18:59 2008
@@ -573,7 +573,7 @@
             gphoto = self.pws.InsertPhotoSimple(
                                 self.galbum,
                                 uploadInfo.name,
-                                '',
+                                uploadInfo.caption,
                                 uploadInfo.url)
             for tag in uploadInfo.tags:
                 self.pws.InsertTag(gphoto, str(tag))
@@ -640,6 +640,7 @@
         f.set_open_URI(url)
         f.set_UID(LUID)
         f.set_tags(tags)
+        f.set_caption(gphoto.summary.text)
         return f
 
     def delete(self, LUID):

Modified: trunk/conduit/modules/ZotoModule/ZotoModule.py
==============================================================================
--- trunk/conduit/modules/ZotoModule/ZotoModule.py	(original)
+++ trunk/conduit/modules/ZotoModule/ZotoModule.py	Mon May  5 11:18:59 2008
@@ -80,17 +80,13 @@
         """
         Adds a photo to the album. 
         """
-        caption = uploadInfo.caption
-        if not caption:
-            caption = ''
-
         f = open(uploadInfo.url,'r')
         buf=f.read()                
         f.close()
         fotoId= md5.md5(buf).hexdigest()
 
         self.server.images.add(self.zapiKey, self.zotoAuth, uploadInfo.name,
-                               uploadInfo.name, caption, xmlrpclib.Binary(buf))
+                               uploadInfo.name, uploadInfo.caption, xmlrpclib.Binary(buf))
         self.server.albums.multi_add_image(self.zapiKey, self.zotoAuth,
                                            albumId, [fotoId])
         tags = []



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]