An unexamined life is not worth living.

Showing posts with label google API. Show all posts
Showing posts with label google API. Show all posts

Sunday, July 27, 2008

Added "Replay Game" link - using powershell

Now every post under "Annotated Game" label is going to have a link to a separate page where you can replay through the game in the Palview viewer. Unfortunately Blogger does not allow javascript to be embedded into posts, so I have to generate one palview page with only diagrams, but no replay option, and then another palview html page with replay buttons, which gets uploaded to a separate site via FTP. I already had a way to automate the annoying process of creating two slightly different pages, but running some FTP GUI-ish tool to upload a single file every time I just want to post a couple of diagrams to the blog was too much for my lazy nature so I just stopped bothering generating re-playable pages ... until now! I used this FTP powershell script and finally even the FTP upload step is automated - one click creates both pages, uploads the static palview diagrams to the blog post via Google Blogger API, and a dynamic page to my FTP site. The process is somewhat fragile though, so I am still to see how well all this works over time. And yes, I still can't decide if I primarily created this blog so that I can post chess games, or just to be able to hack around with my little scripts.

Hit Counter