--- a/project/kiwipycon/proceedings/booklet/mk_booklet.py Tue May 11 03:47:41 2010 +0530
+++ b/project/kiwipycon/proceedings/booklet/mk_booklet.py Tue May 11 03:48:47 2010 +0530
@@ -5,20 +5,6 @@
import codecs
import re
-try:
- from sanum import model
-except:
- root_dir = os.path.abspath(os.getcwd() + '/../../')
- os.chdir(root_dir)
- sys.path.append(root_dir)
- from sanum import model
-
-import sanum
-
-import turbogears
-turbogears.update_config(configfile="dev.cfg",
- modulename="sanum.config")
-
from mk_scipy_paper import tex2pdf, current_dir , copy_files, preamble, \
render_abstract, addfile, sourcedir, outdir, outfilename
@@ -59,24 +45,24 @@
#outfile.write(ur'\setcounter{page}{0}' + '\n')
#from sanum.controllers import Root as Controller
- abstracts = model.Abstract.select()
- for abstract in abstracts:
- if not abstract.approved:
- continue
- print abstract.title
- # Hack: I don't use a stringIO, because it is not unicode-safe.
- tmpout = MyStringIO()
- # Hack: I don't wont to be bound to the controller, to be
- # abstractle to run without cherrypy.
- #attach_dir = Controller._paper_attach_dir(abstract.id)
- attach_dir = os.path.abspath(os.sep.join(
- (os.path.dirname(sanum.__file__), 'static',
- 'papers', '%i' % abstract.id))) + os.sep
- render_abstract(tmpout, abstract)
- outstring = hack_include_graphics(tmpout.getvalue(),
- attach_dir)
- outfile.write(outstring)
- #outfile.write(ur'\fillbreak' + '\n')
+# abstracts = model.Abstract.select()
+# for abstract in abstracts:
+# if not abstract.approved:
+# continue
+# print abstract.title
+# # Hack: I don't use a stringIO, because it is not unicode-safe.
+# tmpout = MyStringIO()
+# # Hack: I don't wont to be bound to the controller, to be
+# # abstractle to run without cherrypy.
+# #attach_dir = Controller._paper_attach_dir(abstract.id)
+# attach_dir = os.path.abspath(os.sep.join(
+# (os.path.dirname(sanum.__file__), 'static',
+# 'papers', '%i' % abstract.id))) + os.sep
+# render_abstract(tmpout, abstract)
+# outstring = hack_include_graphics(tmpout.getvalue(),
+# attach_dir)
+# outfile.write(outstring)
+# #outfile.write(ur'\fillbreak' + '\n')
outfile.write(ur'\end{document}' + '\n')