<#
if node_title == "":
print title
else:
print node_title
#>
gael

varoquaux@normalesup

org
Blog |
<# print_crumbs(breadcrumbs,item = '%s') #>
<#
fullpath=os.getcwd()+"/"+pagepath[:-5]+".txt"
targetpath=Processor.target+"/"+pagepath[:-5]+".txt"
targetdir=os.path.dirname(targetpath)
if not os.path.exists(targetdir):
os.makedirs(targetdir)
from shutil import copyfile
copyfile(fullpath,targetpath)
print('')
pdf_file = os.path.splitext(targetpath)[0]+'.pdf'
pdf_target_file = os.path.splitext(targetpath)[0] + '.pdf'
if ( not os.path.exists(pdf_target_file)
or gael.cmptimestamps(pdf_file, pdf_target_file)):
old_dir = os.getcwd()
try:
gael.rest2pdf(fullpath, pdf_target_file )
except Exception, ex:
print >>sys.stderr, "Failed in compiling %s to pdf" % fullpath
print >>sys.stderr, ex.__str__() # For DEBUG
#print "Failed in compiling %s to pdf" % fullpath
#print ex.__str__() # For DEBUG
os.chdir(old_dir)
if ( os.path.exists(pdf_target_file)
and not gael.cmptimestamps(pdf_file, pdf_target_file)):
print('')
#>
<#
# print the subsections and their description, for each subject tag
pageblock = '''\
%s
'''
sections.sortpages(gael.cmp_pages)
try:
subpages = gael.ListBySubject(sections[None])
except:
pass
def print_subjects(*subjects): #*
""" prints the pages and there description with the given
subject-tag """
print "
"
global subpages
pages, subsections = subpages.list(*subjects) #*
if subsections:
for page in subsections:
print pageblock % page
print "
"
#>
<% body %>
<#
fullpath=os.path.dirname(os.getcwd()+"/"+pagepath)
targetpath=os.path.dirname(Processor.target+"/"+pagepath)
def print_sphinx():
gael._print_sphinx(fullpath, targetpath)
if os.path.isdir(fullpath+"/gallery"):
print '
'
print '
'
gael.scandir(fullpath,targetpath,"gallery")
print '
'
#>