May 15, 2008
filed mid-afternoon by DrScofield in: from the grid, hacking, void
technorati tags:
QR code for this entry · average time to read 2:22 minutes

our lab “owns” an island on the LindenLab grid and we’ve created a “lab” avatar who is the estate owner. as the island is paid for by the lab, we need to have monthly account statements on file for the bean counters. so far, i had to remember to log in to the lab avatar’s account page, copy the account statement and mail it our friendly lady in accounting taking care of these things (yes, we are a small lab)…

…the only problem with that is that i tend to forget these things and our friendly accounting lady has to be rather patient and usually ends up sending reminder notes.

so, after another one of these notes and as it was becoming rather embarrassing that i kept forgetting, i decided to tackle it once and for all and write a python script to do this automatically. the very excellent mechanize python package turned out to be an invaluable tool.

here’s the script in all its glory:

it reads the avatar name, password and so forth from a configuration file:

[lindenlab]
url = http://www.secondlife.com
firstname = Foo
lastname = Bar
password = secret

[mail]
subject = %Y-%m LindenLab monthly account statement for Foo Bar
to = accounting@foo.bar.com
cc = me@foo.bar.com
from = me@foo.bar.com

adapt the config file to your taste and invoke as follows:

sl-account-statement --config config.cfg

voila!

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.

1 comment »

  1. dude, you rock!

    comment by Matthias Hub — May 16, 2008 @ 10:09

RSS feed for comments on this post. TrackBack URI

Leave a comment