I wrote a small introduction to SharePoint scripting with Python a while back and this weekend I didn’t have anything better to do (well actually I did, but I’m an addict - what can I say) so I decided to expand on it. I’ve started putting together a small Python library for working with SharePoint using IronPython. It’s called - amazingly - sp.py.
So far the library if pretty small - although it does include a nice little module for workign with stsadm commands. I’ll be adding to it as necessary. I’ve decided that although adding custom stsadm extensions is nice and does fit into the “way to do things in SharePoint”, it’s just too much overhead when you want to do something simple. So at this point when things come up that need automation, I’ll be adding new sp.py scripts.
In addition to the sp.py library I’ve added three scripts:
- applytheme.py - apply a theme to all webs in a web application
- backupsites.py - backup all site collections in a web application
- setprofileprop.py - set a property on all user profiles based on a dynamic pattern
So where can you get this awesomeness? Well, actually you can get it on github. Github??? You mean that totally web 2.0 site for hosting Git repositories? Yeah - that’s the place. If you’re wondering why I’m using git for source control, well I guess Subversion just wasn’t “edge” enough anymore. Git’s actually pretty cool - and if you need to use Windows you can download a Windows version here.
At some point I’ll figure out how to post it as a zip or something instead of a tarball. But until that point, you can grab the tarball here.
Post a Comment