3 from treecutter.page import Page
6 """Class representing a webpage on the site"""
7 def __init__(self,link):
9 # find the representations of the link.
12 if self._link[-1] == '/':
14 lang = self._scan_languages(path)
16 self._pages.append(Page(self,l))
19 self._pages.append(Page(self,l))
21 def _scan_languages(self,path):
23 for l in glob.glob('.'+path+'*'):
25 if len(ls) > 3 and ls[3] == 'xml':
26 lang.append((ls[2],l))
33 for page in self._pages:
38 for page in self._pages:
39 p.append(page.language())
42 def render(self, style):
43 for page in self._pages:
46 def template(self,sitemap,style,tdir):
47 for page in self._pages:
48 page.template(sitemap,style,tdir)
51 for page in self._pages:
52 if page.language()==lang:
58 for page in self._pages:
59 res = res.union(page.resources())