Creates directories for articles
This commit is contained in:
		| @@ -52,7 +52,12 @@ class Article(DynastieGenerator): | ||||
|             #print 'Generate ' + filename | ||||
|             nodes = dom.getElementsByTagName("*") | ||||
|             self.parse(article, dom, nodes[0]) | ||||
|             self.writeIfNotTheSame(output + '/articles/' + article.title_slug + '.html', nodes[0].toxml('utf8')) | ||||
|             filename = output + '/articles/'  | ||||
|             filename = filename + article.creation_date.strftime("%Y") + '/' + article.creation_date.strftime("%m") + '/'  | ||||
|             if not os.path.exists(filename): | ||||
|                 os.makedirs(filename) | ||||
|             filename = filename + article.title_slug + '.html' | ||||
|             self.writeIfNotTheSame(filename, nodes[0].toxml('utf8')) | ||||
|             dom = parse(src + '/_article.html') | ||||
|  | ||||
|         if not self.somethingWrote: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user