Logging seems OK, except names
This commit is contained in:
12
display.py
12
display.py
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
import codecs
|
||||
import time
|
||||
import logging
|
||||
|
||||
#
|
||||
# Create output HTML files
|
||||
@@ -22,14 +23,8 @@ class DisplayHTMLRaw(object):
|
||||
if html: f.write(html)
|
||||
|
||||
def build(self, f):
|
||||
# t1 = time.time()
|
||||
self._buildHTML()
|
||||
# t2 = time.time()
|
||||
# print 'Time for _buildHTML : %d seconds' % (t2-t1)
|
||||
# t1 = time.time()
|
||||
self._build(f, self.html)
|
||||
# t2 = time.time()
|
||||
# print 'Time for _build : %d seconds' % (t2-t1)
|
||||
|
||||
class DisplayHTMLBlock(DisplayHTMLRaw):
|
||||
|
||||
@@ -252,6 +247,7 @@ class DisplayHTMLPage(object):
|
||||
self.filename = filename
|
||||
self.blocks = []
|
||||
self.css_path = listToStr(css_path)
|
||||
self.logger = logging.getLogger(self.__class__.__name__)
|
||||
|
||||
def getFilename(self):
|
||||
return self.filename;
|
||||
@@ -272,6 +268,8 @@ class DisplayHTMLPage(object):
|
||||
if not os.path.exists(base):
|
||||
os.makedirs(base)
|
||||
|
||||
self.logger.debug('Write %s' % (filename))
|
||||
|
||||
f = codecs.open(filename, 'w', 'utf-8')
|
||||
f.write(u'<!DOCTYPE html>')
|
||||
f.write(u'<html>')
|
||||
@@ -321,9 +319,7 @@ class DisplayHTMLBuild(object):
|
||||
os.symlink(target, link_name)
|
||||
|
||||
for page in self.pages:
|
||||
# print 'Build %s' % (page.filename)
|
||||
page.build(root)
|
||||
# print 'Built'
|
||||
|
||||
#
|
||||
# Global functions
|
||||
|
||||
Reference in New Issue
Block a user