Pages

Wednesday, 28 September 2011

Scripting gets a home on github.com

I have just figured out how to export my scripts from my Android tablet.

I like Git version control so wanted to useit to back up my scripts. However there was nothing I could find to perform commits from Android to somewhere like GitHub.

Enter Dulwich - git written in Python. I installed this to the phone (had to do it over USB unfortunately). I then found a code sample integrating it with Paramiko - SSH written in Python. That had a dependency on PyCrypto which is helpfully compiled as an egg on the Py4A page.

Now all I had to do is write a script to do the commit. Easier said than done. I've been spending all of my commute time on it and have only just got the first pushed commit into the repository.

Of course I wouldn't have had a chance of doing this on my iPhone! Three cheers for Android Scripting!

You can visit the fruits of my labour here. But don't expect much - I still have to learn how to push a diff'd second commit!