22 Mar
2010
So, I've been thinking about how I might pull information out of a big database and convert it to iSilo format in an automatable way. The database is such that I can't get to the data directly; but I can use the clipboard to copy and paste. And there is a keyboard shortcut to select all the information in a section. So how might I do it?
Well, my plan so far is to use pywinauto
http://pywinauto.openqa.org/ to script the interaction with the database. I can send keystrokes to select information and copy it to the clipboard. Python pywin32 provides a clipboard object to get the data from the clipboard. It is in RTF format (ID 49298). So now I can get a section from the clipboard into RTF format. Then I might use pyth
http://github.com/brendonh/pyth to read the RTF and write XHTML out to a file. After that, I can use the iSiloX command line utilities to generate the iSilo database.
I think I've got it figured out, I just have to try out the details.