Dreamstime

Showing posts with label Raven/RavenPlus Fixes. Show all posts
Showing posts with label Raven/RavenPlus Fixes. Show all posts

Wednesday, 21 December 2016

Extended Entry Marker (Jump Break) And The 'Save' Button

An Example Of A Jump Break At My Blogger Homepage

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.

The 'Extended Entry Marker' Button In The Raven+ Editor

A Bug

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.

Tuesday, 29 November 2016

Integrating Google's API Client Library Into The RavenPlus Source Code Repository

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.

New Sub-Directory

Google's API Client Library Within the Raven+ Source Code Repository

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.

Monday, 5 September 2016

Customized gdata For PicasaWeb Uploads

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.

Some Background Information

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.

Customized gdata Within RavenPlus Source Tree

Saturday, 18 July 2015

When Keystrokes Triggered Nothing In Raven/RavenPlus


I was suppose to publish this post on 28th May 2015. Little did I know then that Google had planned to shutdown the ClientLogin authentication protocol on that faithful day. Obviously, my attempts to publish this blog post failed. If only they had published a notification on my Blogger dashboard (something that I login to everyday) rather then at their developer blogs and forums (something that I did not access until recently).

But irrespective, I still maintain that this is still the most difficult bug fix in Zoundry Raven/RavenPlus for me, despite my work on OAuth2 over the last couple of weeks.

The blog post follows below.


This must have been the most difficult bug fix for Zoundry Raven/RavenPlus so far. With variables to track and multiple levels of inheritance for certain Python Classes, pretty soon I got confused while tracing through the code. I have to virtually see the code in my sleep before I finally figured out the root cause of this problem: variables not being reset correctly after clicking the "Save" button within the editor. A very common programming mistake, if I may add.

I can only think of 2 states that the Raven/RavenPlus editor could be in at any one time - "Content NOT Modified" or "Content Modified". In the "Content NOT Modified" state, the "Save" button is disabled. Make any changes, by keying something on the keyboard for example, will change the editor from the "Content NOT Modified" to the "Content Modified" state. This should trigger an event to enable the "Save" button. Click on the "Save" button and the state will change back to "Content NOT Modified" from "Content Modified" - and disabling the "Save" button at the same time.

However, I have encountered a number of times when keying in something on the keyboard triggered nothing while editing. The "Save" button remains disabled no matter how many times I banged on the keyboard.

Tuesday, 28 April 2015

The "Save" Button When Switching Tabs In RavenPlus?

I thought I had found the last remaining oddity with the "Save" button in the Raven/RavenPlus editor 3 months ago. Unfortunately, I found another one recently.

I am a bit paranoid while composing my blog post. So, not wanting to lose my work, I have this habit of regularly saving my post after every couple of minutes while editing. I also have a need to dive into the "XHTML" tab from time to time; to insert an Amazon affiliate ad, for example. So this means me regularly switching between the "Design" and "XHTML" tabs while composing my blog post.

Did I Just Modify My Content?

I got confused when I first encountered this flaw in Raven/RavenPlus: The "Save" button in the editor became enabled when I switched from the "Design" tab to the "XHTML" tab. It won't happen the first time round when I made the flip. But it definitely will from the second time onwards, even when there is NO content in either the "Design" or "XHTML" tab. This can't be right.