equal
deleted
inserted
replaced
9 |
9 |
10 from docutils import core as docCore |
10 from docutils import core as docCore |
11 |
11 |
12 conf_name = 'SciPy2009' |
12 conf_name = 'SciPy2009' |
13 |
13 |
14 current_dir = '/media/python/workspace/kiwipycon/project/kiwipycon/proceedings/booklet' |
14 current_dir = '/media/python/workspace/kiwipycon/project/static/proceedings' |
15 |
15 |
16 outdir = current_dir + os.sep + 'output' |
16 outdir = current_dir + os.sep + 'output' |
17 |
17 |
18 sourcedir = current_dir + os.sep + 'sources' |
18 sourcedir = current_dir + os.sep + 'sources' |
19 try: |
19 try: |
224 if not abstract.authors: |
224 if not abstract.authors: |
225 author_list = abstract.owners |
225 author_list = abstract.owners |
226 else: |
226 else: |
227 author_list = abstract.authors |
227 author_list = abstract.authors |
228 authors = [] |
228 authors = [] |
229 print dir(author_list[0]) |
229 |
230 for author in author_list: |
230 for author in author_list: |
231 # If the author has no surname, he is not an author |
231 # If the author has no surname, he is not an author |
232 if author.surname: |
232 if author.surname: |
233 if author.email_address: |
233 if author.email_address: |
234 email = r'(\email{%s})' % author.email_address |
234 email = r'(\email{%s})' % author.email_address |
370 preamble(outfile) |
370 preamble(outfile) |
371 render_abstract(outfile, abstract, start_page=start_page) |
371 render_abstract(outfile, abstract, start_page=start_page) |
372 outfile.write(ur'\end{document}' + u'\n') |
372 outfile.write(ur'\end{document}' + u'\n') |
373 outfile.close() |
373 outfile.close() |
374 |
374 |
375 return tex2pdf(os.path.splitext(outfilename)[0], remove_tex=False) |
375 error_file = tex2pdf(os.path.splitext(outfilename)[0], remove_tex=False) |
376 |
376 |
|
377 if not error_file: |
|
378 # Generate a preview image |
|
379 command = ('convert', '-thumbnail', 'x400', |
|
380 '%s[0]' % (outbasename + '.pdf'), outbasename + '.png') |
|
381 supervise_popen(command, timeout=10) |
|
382 |
|
383 return error_file |
377 |
384 |
378 ############################################################################## |
385 ############################################################################## |
379 # Code for using outside of the webapp. |
386 # Code for using outside of the webapp. |
380 ############################################################################## |
387 ############################################################################## |
381 |
388 |