Search This Blog

Thursday, July 28, 2016

Tags

A feature of Blogger is the ability to assign one or more tags to a post. This allows you to extract, at the drop of a hat, all of the posts that have a similar tag. It has been a bone of contention that this has proven difficult to extract using the API provided by Google. Despite leaving queries on various forums (fora), the Gorse Fox has had no clues how to do this.

Applying a bit of lateral thinking, the Gorse Fox has come up with an alternate approach. He can make a simple list of all of the tags - then, butchering some code he already has tested, he can seek all of the posts associated with each, one by one. So this will give him the post-id of each posting with, say, the RPI tag. Having got this, he can then return to his code and insert the relevant tags in the existing private blog for each associated post. Base components of this are now in place, but the Gorse Fox still has to write the code to do this on a regular basis.

The frustrating part is that part of the code is dependent on the API provided for Python programs by Google. Because of the obscure way the API processes command line parameters, the Gorse Fox has spent several hours trying to insert three extra parameters. What a faff that was. He has, eventually, cracked it and his tests work. He does suspect, however, that some of the inherited (and previously unused) parameters may now be lost forever!

At least all of the remaining code can be written in Rexx or Rexx/SQL. This should accelerate development by several orders of magnitude.

No comments: