It has been another very successful day for the Gorse Fox. He escaped to the study to look at the current method he employs for getting tags/labels from blogposts to the private blog on "peregrine". This was always clunky and somewhat of a bodge. The new code he prepared a few weeks ago which manages the transfer of blog-posts themselves, also carries the tags as part of the payload (the original Google-API based system did not). With some judicious changes to his existing code he was able to fork relevant tags/labels into a small holding file. This holding file is then processed by the original tag-merge program he had written several years back. Et Voila! It all works.
The Gorse Fox thinks that, bar some daily monitoring, all of the work is now finished on the Raspberry Pis. Next little project will probably be some more video editing.
The Silver Vixen is enjoying time on her sewing machine. She's now making some masks for herself (having made them for the rest of the family). In fact, as Urban-Cub has gone to meet Cousteau-Cub (in the open, of course) she has taken Cousteau-Cub's mask(s) along with her.
Search This Blog
Showing posts with label Coding. Show all posts
Showing posts with label Coding. Show all posts
Saturday, May 16, 2020
Monday, April 08, 2019
1900 lines
Well that's it. It is done. More about that in moment.
It was late start to the morning for the Gorse Fox... nearly eight before he woke up. On a work day too! Oh no, he lies... it's not a work day. Retirement is such a pleasure.
There were some domestic chores to get out of the way first thing, but they didn't take too long and all the floors are gleaming again now. Then there were several phone calls to complete. One to the airline regarding access to the planes - now sorted; and one to the Travel Insurance company.
The thing about insurance, and travel insurance is a case in point, is that the insurers seem to find so many ways to avoid paying out. With travel insurance, the common get out clause is regarding medical conditions. It is not really a matter of whether the condition is relevant to your claim, it is the fact that you went to the doctor for some treatment and didn't inform them. The Gorse Fox was not going to fall foul of this so called up and informed them of anything in which they might have an interest. To be fair they asked if anything was relevant when we actually booked the holiday - and the Gorse Fox said no, it's been booked for a year now. They said it was no problem - we're fully covered as we were unaware of any conditions when the holiday was booked. Fair enough.
Back to the code. It has taken over 1900 lines of code - none of which is likely to be re-used. The code now extracts and reformats all of the old Google Plus posts, links to any relevant photos (where Google actually extracted them), and embed any check-ins or maps. The second stage of the code runs through the extract and plugs the relevant information into the databases. Et Voila... over a thousand new entries have been added to the test version of the private blog - and in 30 minutes time, they should similarly have been added to the production version.
There is some tidying up required where GPlus generated some daft titles or failed to extract the photos - but that can be handled over time.
It was late start to the morning for the Gorse Fox... nearly eight before he woke up. On a work day too! Oh no, he lies... it's not a work day. Retirement is such a pleasure.
There were some domestic chores to get out of the way first thing, but they didn't take too long and all the floors are gleaming again now. Then there were several phone calls to complete. One to the airline regarding access to the planes - now sorted; and one to the Travel Insurance company.
The thing about insurance, and travel insurance is a case in point, is that the insurers seem to find so many ways to avoid paying out. With travel insurance, the common get out clause is regarding medical conditions. It is not really a matter of whether the condition is relevant to your claim, it is the fact that you went to the doctor for some treatment and didn't inform them. The Gorse Fox was not going to fall foul of this so called up and informed them of anything in which they might have an interest. To be fair they asked if anything was relevant when we actually booked the holiday - and the Gorse Fox said no, it's been booked for a year now. They said it was no problem - we're fully covered as we were unaware of any conditions when the holiday was booked. Fair enough.
Back to the code. It has taken over 1900 lines of code - none of which is likely to be re-used. The code now extracts and reformats all of the old Google Plus posts, links to any relevant photos (where Google actually extracted them), and embed any check-ins or maps. The second stage of the code runs through the extract and plugs the relevant information into the databases. Et Voila... over a thousand new entries have been added to the test version of the private blog - and in 30 minutes time, they should similarly have been added to the production version.
There is some tidying up required where GPlus generated some daft titles or failed to extract the photos - but that can be handled over time.
Sunday, April 07, 2019
Nearly there
It's been a lovely day again today. The Gorse Fox had some football to play this morning so headed out at his usual time. The game was 6-v-5 then 5-v-6 in the second half. It was pretty even in the end, with a final score of 7-6 to the yellow bibs. The Gorse Fox scored his first goal for a couple of weeks having ridden a couple of fairly agricultural tackles and, overall, played pretty well throughout the game.
Back home he returned to the code face. (Did you see what he did there?). The code is coming along well now and as he writes this, he thinks the basic extract and mashup is just about done. What he has realised is that he spent a huge amount of time debugging a problem that he hadn't got. Well, that's not quite true - he has got the problem, but the source of the problem was Google and there's nothing he can do about it. In the extract of Gplus, they have linked to various photos - the problem is that they have failed to download some of the photos so the code points to nothing. There's nothing that can be done, so the Gorse Fox will just have to manually check the few posts affected and add a comment to explain.
One of the features that the Gorse Fox used to use in GPlus was "check-in" where he could drop pin on a map to show where he was. This creates a link to Google maps and this opens up in a new window. The Gorse Fox is considering whether to change this and create an imbedded map instead. He'll sleep on this before deciding, then run a full test run on the test system (tawnyowl).
Just for the record, the Gorse Fox is doing all of this by writing directly to the underlying SQL databases for Wordpress rather than trying to manipulate Wordpress itself. It took quite a while to get an understanding of the data model... but he now has some fairly robust and well-tested code that does this on a daily basis.
Back home he returned to the code face. (Did you see what he did there?). The code is coming along well now and as he writes this, he thinks the basic extract and mashup is just about done. What he has realised is that he spent a huge amount of time debugging a problem that he hadn't got. Well, that's not quite true - he has got the problem, but the source of the problem was Google and there's nothing he can do about it. In the extract of Gplus, they have linked to various photos - the problem is that they have failed to download some of the photos so the code points to nothing. There's nothing that can be done, so the Gorse Fox will just have to manually check the few posts affected and add a comment to explain.
One of the features that the Gorse Fox used to use in GPlus was "check-in" where he could drop pin on a map to show where he was. This creates a link to Google maps and this opens up in a new window. The Gorse Fox is considering whether to change this and create an imbedded map instead. He'll sleep on this before deciding, then run a full test run on the test system (tawnyowl).
Just for the record, the Gorse Fox is doing all of this by writing directly to the underlying SQL databases for Wordpress rather than trying to manipulate Wordpress itself. It took quite a while to get an understanding of the data model... but he now has some fairly robust and well-tested code that does this on a daily basis.
Saturday, April 06, 2019
Pots
The Silver Vixen has been over with Urban-Cub and Ellie today. Urban-Cub wanted some advice and guidance regarding the various shru=bs she has potted up and planted round the garden. The Gorse Fox was (and still is) expecting a delivery from Amazon, so stayed put.
The Gorse Fox got through some domestic chores then focussed on his code for transposing the old GooglePlus entries into his private blog. Today he ran the first tests against the test database. Most of it seems to be working as designed, but he is still having some problems with the inclusion of media. This is proving to be a little sticky at present, but he's sure he'll crack it soon.
The Gorse Fox got through some domestic chores then focussed on his code for transposing the old GooglePlus entries into his private blog. Today he ran the first tests against the test database. Most of it seems to be working as designed, but he is still having some problems with the inclusion of media. This is proving to be a little sticky at present, but he's sure he'll crack it soon.
Monday, January 30, 2017
Flushed with success
The engineer called. He was exactly on time, he was polite, and he removed his shoes as he entered. The tap that had been causing the occasional leak had been dormant for a few days, but exactly on cue it started to leak copiously this morning. As the tap was moderately expensive and still under the 5 year warranty, the Gorse Fox had called the manufacturer. Hence the arrival of the engineer.
He took one look at the problem and explained that it the o-rings, not the valve. It it had been the valve, the tap would drip; but as it's the o-rings the barrel leaks. It didn't take him long to rectify the situation and his diagnosis was that the water pipes hadn't been flushed through properly when the house was built and small bits of grit had got in to the mechanism. Seemed plausible, particularly when he dug out just such a piece of grit. All sorted now - just in time to have the worktops fitted tomorrow.
Most of the rest of the day has been spent writing code. There are a few things that the Gorse Fox wanted to tidy up in the blog and it is easier to write a program than to go through each relevant entry and make manual changes.
He took one look at the problem and explained that it the o-rings, not the valve. It it had been the valve, the tap would drip; but as it's the o-rings the barrel leaks. It didn't take him long to rectify the situation and his diagnosis was that the water pipes hadn't been flushed through properly when the house was built and small bits of grit had got in to the mechanism. Seemed plausible, particularly when he dug out just such a piece of grit. All sorted now - just in time to have the worktops fitted tomorrow.
Most of the rest of the day has been spent writing code. There are a few things that the Gorse Fox wanted to tidy up in the blog and it is easier to write a program than to go through each relevant entry and make manual changes.
Saturday, January 21, 2017
Engineer
After some to-ing and fro-ing this morning the Gorse Fox has managed to secure the visit of a Neff engineer to try and sort out the failed oven. As we are likely to be without our hob for a week or so (while the worktops are replaced, it would have been nice to have a working microwave).
Meanwhile, the rest of the morning was spent coding. An existing program has been radically extended so that it fulfils a much wider brief than its original design requirement. Merging code from several routines made it a lost easier, and the fact that the Gorse Fox always follows a particular style and standard makes the merger very simple. Code is now running and has triggered a whole slew of further ideas. In its own right the code added a further 186 entries into the Gorse Fox's private blog - so progress is being made.
Meanwhile, the rest of the morning was spent coding. An existing program has been radically extended so that it fulfils a much wider brief than its original design requirement. Merging code from several routines made it a lost easier, and the fact that the Gorse Fox always follows a particular style and standard makes the merger very simple. Code is now running and has triggered a whole slew of further ideas. In its own right the code added a further 186 entries into the Gorse Fox's private blog - so progress is being made.
Wednesday, January 11, 2017
Code again
Wednesday started early, thanks to Jasper. It was 6:30 when he finally dragged the Gorse Fox out of bed. Being Wednesday there would be football to play... but before all the Urban-cub appeared (she had an early appointment at the hospital for her scheduled scan), then the Silver Vixen emerged - so we were all up and about by 7:30.
Pistole Pete arrived for Urban-cub soon after eight and they headed off to the hospital. The Silver Vixen got her stiff together and headed off to Pilates. That just left the Gorse Fox and Jasper. Jasper had, by then, retired to the bed for his morning sleep. The Gorse Fox grabbed his kit and headed to Worthing for football.
It was a good game - very close indeed. In fact there was some debate at the end as to whether it finished 1-1 or 2-1 (the debate centred on whether Concrete John was in or out of the box when he scored). The Gorse Fox was no better than yesterday. He played ok, but that's about it. Let's hope he improves on Sunday.
Back home he prepared a beef casserole that would bubble away quietly all afternoon. The Gorse Fox retired to the study. There was code to write. He wanted a mechanism for doing bulk updates to the categories and labels in the private blog. A few hours later the code is beginning to look good. Early tests seem to show that all the conditions tested to date are working as designed. There are, however, still some test conditions to work through.
Pistole Pete arrived for Urban-cub soon after eight and they headed off to the hospital. The Silver Vixen got her stiff together and headed off to Pilates. That just left the Gorse Fox and Jasper. Jasper had, by then, retired to the bed for his morning sleep. The Gorse Fox grabbed his kit and headed to Worthing for football.
It was a good game - very close indeed. In fact there was some debate at the end as to whether it finished 1-1 or 2-1 (the debate centred on whether Concrete John was in or out of the box when he scored). The Gorse Fox was no better than yesterday. He played ok, but that's about it. Let's hope he improves on Sunday.
Back home he prepared a beef casserole that would bubble away quietly all afternoon. The Gorse Fox retired to the study. There was code to write. He wanted a mechanism for doing bulk updates to the categories and labels in the private blog. A few hours later the code is beginning to look good. Early tests seem to show that all the conditions tested to date are working as designed. There are, however, still some test conditions to work through.
Sunday, July 31, 2016
Smashed it
The Gorse Fox is delighted. He's smashed it. He has completed the coding and testing and can (and indeed has) applied all of the tags/labels that have been used over the years in this blog to the private blog. This was no mean feat.
The Gorse Fox needed a program to extract the tags and the post ids of the posts labeled with each tag, then another to import the tags into the WordPress blog and then update the relationships for all of the posts (and the counts for each tag). Lots of code and lost SQL... but done.
Happy bunny.
The Gorse Fox needed a program to extract the tags and the post ids of the posts labeled with each tag, then another to import the tags into the WordPress blog and then update the relationships for all of the posts (and the counts for each tag). Lots of code and lost SQL... but done.
Happy bunny.
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.
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.
Monday, July 25, 2016
Coding again
The Gorse Fox has spent some of the day coding, again.
He used to use Flickr quite a lot, but hasn't made any use of it for several years. His photos are now shared through Google Photos. This leaves an account with lost of photos - many of which are referenced in the blog. The Gorse Fox wanted to know the extent of the problem so wrote some code. There are 574 posts that reference Flickr. Now he needs to determine if he is going to do anything about it!
Oh yes. HMRC wrote to the Gorse Fox. It appears that the tax rebate that so thrilled him last year should not have been paid. Without going into details - it was partly Starlet's fault, partly the fault of HMRC and partly the fault of the Gorse Fox. It looks like the Gorse Fox has an unexpected tax bill.
He used to use Flickr quite a lot, but hasn't made any use of it for several years. His photos are now shared through Google Photos. This leaves an account with lost of photos - many of which are referenced in the blog. The Gorse Fox wanted to know the extent of the problem so wrote some code. There are 574 posts that reference Flickr. Now he needs to determine if he is going to do anything about it!
Oh yes. HMRC wrote to the Gorse Fox. It appears that the tax rebate that so thrilled him last year should not have been paid. Without going into details - it was partly Starlet's fault, partly the fault of HMRC and partly the fault of the Gorse Fox. It looks like the Gorse Fox has an unexpected tax bill.
Subscribe to:
Posts (Atom)