Help Needed: Script to create files for Material Repository

I recently decided to start uploading materials to the Blender Open Material Repository and found that the process is sort of lengthy. So I figured I’d try to automate it some, especially if I was uploading large libraries. I think I figured out a decent process, but I’m not sure if I can implement it in Python (My programing knowledge ends with TI-83 Basic).

So I guess I’d like to know if the process will work and if you have any tips or links to get me started. (The API Docs are informative, but not really beginner friendly)

Load material library file
Get list of materials in file

For number of materials in file {
     Load render.blend
     Append mat1
     Link mat1 to sphere
     Link mat1 to suzanne
     Link mat1 to complex
     Render layer 1
     Save image to /materialname/sphere.jpg
     Render layer 2
     Save image to /materialname/suzanne.jpg
     Render layer 3
     Save image to /materialname/complex.jpg

     Load upload.blend
     Link mat1 to object
     Save file to /materialname/upload.blend

Finally, and slightly off topic because it’s outside of Blender, does anyone know of something I could look into to for automating the actual upload process?