Store files in month directory
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
|
||||
class DisplayHTMLBlock(object):
|
||||
|
||||
@@ -56,7 +57,13 @@ class DisplayHTMLPage(object):
|
||||
self.blocks.append(block)
|
||||
|
||||
def build(self, root):
|
||||
f = open(root + self.filename, 'w')
|
||||
filename = root + self.filename
|
||||
|
||||
base = os.path.dirname(filename)
|
||||
if not os.path.exists(base):
|
||||
os.makedirs(base)
|
||||
|
||||
f = open(filename, 'w')
|
||||
f.write('<html><title>%s</title><body>' % (self.title))
|
||||
for block in self.blocks:
|
||||
block.build(f)
|
||||
|
||||
Reference in New Issue
Block a user