Someone mentioned that the photo uploads to Flickr from Raven+ is broken (here and here). Looks like it is not. Here is an excerpt from the log for this blog post for my Flickr upload for the picture above:
I thought I hit a dead-end when I couldn't find any Python API libraries for uploading my images to Google Photos via Raven+.
But a couple of hour search later via Google for "Google Photos Python Uploads" lead me to this:
Google's Blogger calls it a "jump break". But Raven/Raven+ calls it an "Extended Entry Marker". What it does, anyway, is to show a summary of your blog post at your Blogger blog's homepage, while providing a link, "Read more >>", to your entire post, which your audience can read in its entirety if s/he so desires.
I always include a "jump break" in every one of my blog post. Problem is, I always do it as the last thing after composing my post (sometimes even after publishing it) mostly because of my absentmindedness.
There is this problem with the Raven/Raven+ editor - it does not enabled the 'Save' button (if it was disabled previously) after inserting a "jump break"/"Extended Entry Marker". This is rather annoying as I then have to insert a 'junk' character to enable the 'Save' button, then delete this 'junk' character before saving my now modified post. A prime target for getting this bug fixed here.
There is this problem with us programmers. We will not complain and will happily chug along when confronted with the toughest programming challenge ever. But when it comes to documenting our work, we will make excuses, drag our feet and create various alibi. I remember this joke that I've heard about programmers some 20 years ago:
"if it is so hard to write, it must be even harder to describe"
Yes, we programmers understand this perfectly. But still there should be no excuses for not documenting one's work; and this is something that I should bear in mind - always.
Unfortunately, I do get sloppy sometimes. Case in point:
I briefly mentioned that I might be integrating the "Google API Client Library for Python version 1.2" into RavenPlus some 11 months ago. Well in the end, I actually did.
Problem is now I can't remember why I made this decision. I can faintly recall problems I had between 'py2exe' and the newly installed libraries needed for Google OAuth2 authentication (most of them is installed, by default, in the '.egg' format).
Is this the main reason? I can't remember. If only I have written the reason down earlier - somewhere.
Integrating the Google API Client Library for Python into RavenPlus is rather simple. All I did was to bung it under the blog publishing sub-system of RavenPlus at 'zoundry/blogpub'. Naming the new directory as 'blogger' seems appropriate and all Google Blogger's OAuth2 related modifications in RavenPlus (by me) are placed here and below its sub-directories; and this includes the picture uploading capabilities to Google's PicasaWeb ('zoundry/blogpub/blogger/gdataExtend' is where the modified gdata API resides).
The directories 'apiclient', 'oauth2client' and 'uritemplate', circled in RED in the picture above, are from the Google API Client Library itself. As mentioned previously, I only used a subset of this Client Library from Google.
Without going into details, I briefly mentioned that I added a few new functions into the class GDataService and PhotoService in order to get the interfacing between 'Google GData Photo API' and RavenPlus working with Google OAuth2 authentication.
Here are the technical details, plus the Python code.
As this is a rather long post, I have broken it down into two parts. In this post, I will only discuss the changes that I have made to the gdata library. In a future blog post, I will show how I used this customised gdata library for uploading pictures to Google's PicasaWeb from RavenPlus.
Since Python is an object-oriented programming language, the most obvious way to customised gdata is via 'inheritance'. I tried and failed because of some local private variables being referenced in the base class from my derived class. Like I have said before, I am no expert in Python. In desperation, I used what seems to be the easiest way out: I made local copies of what's needed from gdata and customised them to fit my requirements. The important thing here is it works.