Intermediate commit, no work truly done

This commit is contained in:
Malphaet 2017-03-12 19:16:00 +01:00
parent 90a7abc8da
commit bf77a0044a
4 changed files with 50 additions and 2 deletions

View File

@ -1 +1 @@
__all__ = []
__all__ = ["fileparser","treeparser"]

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
Copyleft (c) 2016 Cocobug All Rights Reserved.
# Copyleft (c) 2016 Cocobug All Rights Reserved.
import argparse