diff --git a/generator/parser/__init__.py b/generator/parser/__init__.py index a9a2c5b..0588c5c 100644 --- a/generator/parser/__init__.py +++ b/generator/parser/__init__.py @@ -1 +1 @@ -__all__ = [] +__all__ = ["fileparser","treeparser"] diff --git a/generator/parser/fileparser.py b/generator/parser/fileparser.py index e69de29..c2e376c 100644 --- a/generator/parser/fileparser.py +++ b/generator/parser/fileparser.py @@ -0,0 +1,13 @@ +# Copyleft (c) 2016 Cocobug All Rights Reserved. +import os,sys,treeparser + +class WebPage(object): + "A webpage object, with some variables and all localisations" + def __init__(self): + pass + + + +def parse_file(file_object): + "Parse a file object and return a webpage object" + pass diff --git a/generator/parser/treeparser.py b/generator/parser/treeparser.py index e69de29..4575624 100644 --- a/generator/parser/treeparser.py +++ b/generator/parser/treeparser.py @@ -0,0 +1,35 @@ +# Copyleft (c) 2016 Cocobug All Rights Reserved. +import os,sys,fileparser + +class WebTree(object): + "The tree of all website evolves during runtime as the files are requested" + def __init__(self,path): + self.website_path=path + def list_dir(self,subpath=""): + "List all files in the directory" + pass + + def convert_local(self,files): + pass + +class WebSubTree(Tree): + "Share some methods with the main tree, only describes one folder" + def __init__(self): + pass + +class WebNode(object): + "A webfile, as seen from the tree, contains a link to a WebPage, generated from itself" + def __init__(self): + pass + +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): + webt=Webtree(website) + return webt + else: + raise IOError("Unable to find the specified website") + +if __name__ == '__main__': + # Do all the nominal tests + pass diff --git a/vkyweb.py b/vkyweb.py index 67300c3..6228ec9 100644 --- a/vkyweb.py +++ b/vkyweb.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -Copyleft (c) 2016 Cocobug All Rights Reserved. +# Copyleft (c) 2016 Cocobug All Rights Reserved. import argparse