Depending on how ambitious you want to be, you can probably run the calibre code directly within the embedded interpreter, you'll just have to add the calibre installation directory and the library.zip file to sys.path, then
Code:
from calibre.ebooks.lrf.web.convert_from import main
main(['web2lrf', '-u', 'http://mysite.com', '-o', '/pathto/output.lrf', default']+extra_options)
and this allow you to add things to the database directly, with a couple of lines of code