Little bugfix

This commit is contained in:
Malphaet 2017-03-14 21:30:02 +01:00
parent 698860f910
commit 6f6970277c
2 changed files with 7 additions and 2 deletions

View File

@ -82,7 +82,7 @@ class WebPage(object):
def export(self):
"Export the Webobject in every language"
exp={}
for lang in self.langagues:
for lang in self.list_of_lang:
exp[lang]=self.get_text(lang)
return exp

View File

@ -111,6 +111,9 @@ class WebNode(WebSubTree):
self.path=path
self.full_path=os.path.join(website_path,path)
self.content={}
self.name,self.type=os.path.splitext(self.path)
if self.type==".txt":
self.open_node()
def get_variable(self,varname,filter_lang):
"Get the corresponding variable, first in the Webnode, then the config and repeating up until the Root"
@ -126,7 +129,9 @@ class WebNode(WebSubTree):
"Open the file in the node, for now the parse is left linked, but later versions will ditch it asap"
self.parse=file_parser.parse_file(self.full_path)
self.variables=self.parse.variables
print self.parse.export()
self.languages=self.parse.export()
def makeWebsite(website):
"Take a string of the folder name containing the website, will proceed to generate all needed Objects and return the Webtree"
if os.path.isdir(website):