diff -r 34e28994fec5 -r 3ece0de11641 project/kiwipycon/proceedings/booklet/mk_scipy_paper.py --- a/project/kiwipycon/proceedings/booklet/mk_scipy_paper.py Tue May 11 03:47:41 2010 +0530 +++ b/project/kiwipycon/proceedings/booklet/mk_scipy_paper.py Tue May 11 03:48:47 2010 +0530 @@ -11,7 +11,7 @@ conf_name = 'SciPy2009' -current_dir = '/media/python/workspace/kiwipycon/project/kiwipycon/proceedings/booklet' +current_dir = '/media/python/workspace/kiwipycon/project/static/proceedings' outdir = current_dir + os.sep + 'output' @@ -226,7 +226,7 @@ else: author_list = abstract.authors authors = [] - print dir(author_list[0]) + for author in author_list: # If the author has no surname, he is not an author if author.surname: @@ -372,8 +372,15 @@ outfile.write(ur'\end{document}' + u'\n') outfile.close() - return tex2pdf(os.path.splitext(outfilename)[0], remove_tex=False) + error_file = tex2pdf(os.path.splitext(outfilename)[0], remove_tex=False) + if not error_file: + # Generate a preview image + command = ('convert', '-thumbnail', 'x400', + '%s[0]' % (outbasename + '.pdf'), outbasename + '.png') + supervise_popen(command, timeout=10) + + return error_file ############################################################################## # Code for using outside of the webapp.