from treecutter import constants as const
from treecutter.trie import Trie
from treecutter.link import Link
-from treecutter.tools import ssh_cmd, publish, mkdir_p
+from treecutter.tools import ssh_cmd, publish, mkdir_p,get_folder_size,sizeof_fmt
+
class Sitemap():
"""Class keeping the internal site structure"""
def set(self):
return set(link.link() for link in self._tree)
+ def linklist(self):
+ return [link.link() for link in self._tree]
+
# Main driver in the application processing the documents
# in the collected sitemap
def process(self):
t1 = time()
- print "Prepareing the input"
for link in self._tree:
link.prepare()
t2 = time()
return etree.tostring(menu,encoding='UTF-8',pretty_print=False)
def publish(self):
+ print "Size [ %7s ]" % (sizeof_fmt(get_folder_size(self._tmptarget)))
ssh_cmd(self._output,"mkdir -p")
publish(self._tmptarget, self._output)
for res in ["stylesheets","images","js","fonts","favicon.ico"]: