Tuesday, 29 December 2015

RavenPlus Version 1.0.507 - Picture Uploads To PicasaWeb Via OAuth2

I know some of you have been waiting for this. So here it is: RavenPlus version 1.0.507, which contains the fix for uploading pictures to PicasaWeb via the Google OAuth2 protocol.

I have been testing this version out for over the last couple of weeks and I believe I have a stable version that is fit for release. Pictures in my last 3 blog postings (totalling 17 in all) were uploaded to PicasaWeb with this version and I did not notice anything out of the ordinary. They all went through smoothly as far as I could tell. Even my edited pictures were detected by RavenPlus and they got updated on PicasaWeb when I subsequently republish my blog post.

Not tested though is video uploads to PicasaWeb - simply because I do not have the bandwidth nor any videos to share.

If you do not upload pictures to PicasaWeb, you can safely ignore this version.

Version 1.0.507 only works for existing users of Raven and RavenPlus. New users will have to wait a little while as I haven't started work on making a clean import of blogs hosted on Google's Blogger/Blogspot yet. That's next on the to-do list.

What I Did

As I have said, I had problems interfacing between RavenPlus and Google GData Photo API previously.

After having spent many hours and getting nowhere, I decided in the end to modify the GData API itself (by creating a local copy within the RavenPlus source tree). I created a few new methods in the class GDataService (in gdata_service.py) and PhotoService (in photos/service.py) that return the PicasaWeb meta-data in the format that RavenPlus expects. To say the least, it works perfectly - luckily.

Change Log

The New Picasa Settings Dialog Box

  • Picture uploads to PicasaWeb is now authenticated via Google's OAuth2.

  • I have removed the "password" field (now redundant with OAuth2) in the "Edit Picasa Settings" dialog box (in the Main Window under Tools -> Media Storage Settings -> New Storage). This dialog box now looks like in the picture above. The "Google Account Email" field is still required though - GData API actually uses it.

  • Error handling during the picture uploads is a little crappy. No error is reported (via a dialog box, for example) even though picture uploads failed. Because of this, I have made some changes so that errors during picture uploads, if any, is logged in the RavenPlus's background tasks log. You can be viewed this log file via RavenPlus's Tools -> Background Tasks ... in the main window. I can only think of two reasons that will cause an upload failure:

    • there is no Internet connection;
    • the "Google Account Email" address is incorrect (you will see a [404, 'Not Found', 'Unable to find user with email ... @gmail.com ] error in the log file);

    Also worth mentioning is some problems that I had, though not serious, when creating a new album while testing. The following error was registered in the background tasks log:

    sslerror instance has no attribute 'getMessage'

    I am not sure why? I can only speculate that perhaps I had been doing a repeated create-delete PicasaWeb album of the same name. By renaming the album to something else, the problem went away.

Backups

Changes will be made to your Picasa Media Storage registry when uploading pictures to PicasaWeb. So do remember to backup your Raven/RavenPlus data before you begin. The instructions for backing up your Raven/RavenPlus data is available at How To Backup Your Data at the Zoundry Raven development blog.

Download Link

I have uploaded RavenPlus Version 1.0.507 to my Google Drive and you can download the ZIP file here. Do read the Disclaimer below before downloading.

To install, just unzip the downloaded Zip file into a directory, and copy your existing RavenPlus's "profiles.xml" file into this new versions profiles directory.

Granting Access

Granting PicasaWeb Access To RavenPlus

Login credentials to PicasaWeb uses the user's Google Email Address and password previously. But with OAuth2 authentication, this no longer applies. Instead, Google login credentials now is contained in the file "client_secrets.json".

If you are now using an OAuth2 aware version of RavenPlus, you should already have this file in the Raven/RavenPlus data directory/folder - there is nothing for you to do.

Otherwise, you will have to download "client_secrets.json" from the Google Developer Console and save it in the Raven/RavenPlus data directory/folder.

On your first picture upload to PicasaWeb, your default web browser will get launched and you will be prompted to login to your Google account if you have not login previously. The screen above will then be displayed in your web browser. Just click on the "Allow" button, and the login credentials for PicasaWeb will then be downloaded and stored in the file "picasa.dat" in the Raven/RavenPlus data directory/folder - the place where "client_secrets.json" is located (see picture below). RavenPlus will then begin to upload your picture files to PicasaWeb.

The Location Of The File "picasa.dat"

Note:

  • In the "RavenPlus would like to:" screen above, I think you have to click on the "Allow" button within a certain time limit. If your picture upload failed or the "picasa.dat" file was not created, just repeat the process again i.e. just republish your blog post.

  • To upload pictures to PicasaWeb, you will need to have a Picasa Media Storage defined and assigned to your blog in RavenPlus. If you have been happily blogging and uploading pictures to PicasaWeb from Raven or RavenPlus prior to the introduction of OAuth2 authentication back in 28th May 2015, you should already have one defined. If what I am saying doesn't make sense, just leave a comment below and I will explain.

Happy Blogging.

Disclaimer:
This software is provided "as is" WITHOUT WARRANTY OF ANY KIND, either express or implied. You, the user, accept the full responsibility for the usage of this application RavenPlus, excluding the developer, ie. me the owner of this blog, from any liability and any consequence that may derive. Remember to do an Anti-virus scan of the downloaded ZIP file before unzipping it into a folder. You might want to consider doing a full backup of your computer hard drive with Acronis True Image or Norton Ghost before installing and running this application.









24 comments:

  1. THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Is perfect!!!!!!!!!!! I can upload my photos without any problem
    THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    You're a genious!!!!!!!!!!!!!!!

    ReplyDelete
    Replies
    1. I suppose I can stop biting my nails now. I'm a nervous wreck.

      Delete
    2. You did it T.C.! You´re the best. I can work again with my blog at 100%. Thanks

      Delete
    3. Thank you for your feedback Nancy Dorcys.

      Delete
    4. I can´t believe it!!! Picasa is working again!!! Thanks T.C.!!! I love you! You make me very happy.

      Delete
    5. Thanks for the feedback Laura.

      Delete
  2. There is an issue when attempting to edit an existing downloaded post. Raven uses the Metaweblog api 'getRecentPosts' call to get the list of posts which in many cases only provides a summary of the blog content, not the entire post. Apparently Raven uses this summary to edit that post instead of using a Metaweblog api 'getPost' call.

    ReplyDelete
    Replies
    1. Which blog server platform are you referring to?

      To be honest, on the blog publishing side, I have only looked at Google's Blogger API V3. I only fix what-I-need/what-I-have-to to get me going again, and share what I have patched on my blog here.

      Delete
    2. It is a custom Metaweblog integration for Exponent CMS. For the getRecentPosts call we only return a summary of the posts since some editors (MS Word) choke if the returned data set is too large. Both the MS Word blog post editor and Windows LiveWriter/OpenWriter make a specific call to 'getPost' when the blog post is edited.

      Delete
    3. Actually, never mind, I've updated our code and the other editors now seem to deal with large amounts of data where they errored out in the past.

      Delete
  3. Yupi! Is perfect! I love you! :)

    Please when you have time remember to do what we talk here in August: http://chuahtc.blogspot.com.ar/2015/08/ravenplus-version-10506-post-scheduling.html, you answer us "To all: Point noted"

    Align image icon: center like default
    Size icon: possibility to change the dafault size
    Download more than 5000 posts

    Thanks for your time and work

    ReplyDelete
    Replies
    1. Yikes. You are making me nervous. You are making me breaking out in cold sweat.

      Delete
  4. Thanks, thanks, thanks and thanks.....
    ......
    .....
    .....
    and more thanks!!!!!!!!! :)

    ReplyDelete
  5. Hi, Fantastic work on Ravenplus! I have a question about uploading images on Wordpress.com blogs. If an image in the post is clicked, nothing happens. A link to the full image needs to be included by changing a setting in the WP editor. I'm wondering if code in the Ravenplus editor could take care of this during the upload itself. Thanks!

    ReplyDelete
    Replies
    1. Thanks for the kind words.

      Fixes and customization of Raven+ are based on my needs. I am releasing the compiled version of the software as it is.

      Delete
  6. nice job @T.C. Chuah, may you add some feature or option to publish multiple post simultaneously

    many thanks and great job

    ReplyDelete
    Replies
    1. I don't have a need for such feature; so it's a no for the moment.

      Delete
  7. T.C.: Hi!!!

    I need your help, please. From January 26 I can not upload images with Picasa with Raven. In Picasa forum there are a lot of people with the same problem and they say that Picasa has not more support. Google still don´t give any answer.

    Please can you make something to upload images with Google photos???. I love your Raven+, it's the best and I need it for my work.

    Flickr has many problem and not make thumbnails for home or JSON scripts

    Please help us!!

    ReplyDelete
    Replies
    1. I had the same problem myself when I published my latest blog post on the 28th Jan 2017. It took me 3 tries before my 2 pictures were finally uploaded, which is what I suggest you do - just keep trying.

      Sorry but I can't do anything on my end. There is no Google Photo API when I last looked a few days ago.

      Problem seems to coincide with Google+ desktop going offline. I wonder if there is a connection?

      Delete
    2. Thanks T.C.! Yes! Was a problem connection and Google fix it!!!

      If you want can you read it in the forum https://productforums.google.com/d/msg/picasa/-6qGYNiNXKA/QzDyngOsBwAJ

      And is good to know that is not a Google Photo API

      Thanks for ypur time

      Delete
    3. Thank you for the updates Estevaniz.

      There is no announcements of any kind from Google but I sense that something is brewing on their end, possibly between the Google+ and Google Photo integration. If your livelihood depends on your blogs, it is not a bad idea of you to start planning now on moving off Google's Blogger and onto your own blog server where you have more control over your picture and blog post uploads.

      Time is a little tight on my end these days. If Google were to pull the plug again on Picasa Web uploads, and replace it with some new API, it would be months again before I could roll out a fix for Raven+.

      Delete
    4. I really prefer Blogger. I was in WP and I don´t like it. And I can not buy a server.

      I really prefer wait for you perfect work several months like the first time (fix Raven and fix Picasa) that moving off Google's Blogger.

      I hope for you and for me that Google don't make any API change

      Thanks a lot!!!

      Delete
    5. The Picasa API from Google is actually quite old - almost 10 years, if I am not mistaken. With Google having announced, not too long ago, about retiring Picasa, it quite obvious that a change in API is imminent in the future. The question is when.

      Delete

Note: Comments without a valid Blogger/Google+/WordPress/LiveJournal/TypePad/AIM/OpenID profile may be ignored.

Related Posts Plugin for WordPress, Blogger...