Merge branch 'main' of github.com:idle-org/bootstraparse
This commit is contained in:
commit
359b3dfd50
|
|
@ -1 +1 @@
|
||||||
# Main program, use this to start parsing
|
# Main program, use this to start parsing
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
# testing Fibonacci number function
|
# testing Fibonacci number function
|
||||||
def fib(n: int) -> int:
|
def fib(n: int) -> int:
|
||||||
return n if n < 2 else fib(n-1)+fib(n-2)
|
return n if n < 2 else fib(n - 1) + fib(n - 2)
|
||||||
|
|
||||||
|
|
||||||
def test_fibonacci():
|
def test_fibonacci():
|
||||||
assert fib(int(os.environ["FIB_INPUT"])) == 55
|
assert fib(int(os.environ["FIB_INPUT"])) == 55
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,4 @@ class GlobalConfig(ConfigLoader):
|
||||||
super().__init__(configfile)
|
super().__init__(configfile)
|
||||||
|
|
||||||
|
|
||||||
conf = ConfigLoader("./example_userfiles/config/aliases.yml")
|
conf = ConfigLoader("./example_userfiles/config/aliases.yml")
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
# Interprets where the parser is located and resolves errors
|
# Interprets where the parser is located and resolves errors
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
# Dedicated module for defining and interpreting errors as well as generating error messages
|
# Dedicated module for defining and interpreting errors as well as generating error messages
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
# Module for final generation of the translated website
|
# Module for final generation of the translated website
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
# Main parser, interprets userfiles and translates into html
|
# Main parser, interprets userfiles and translates into html
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
# Module for pre-parsing userfiles in preparation for the parser
|
# Module for pre-parsing userfiles in preparation for the parser
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
# Module for file and directories repartition
|
# Module for file and directories repartition
|
||||||
|
|
|
||||||
|
|
@ -1,53 +1,61 @@
|
||||||
# Module sequencing the successive actions necessary for website building
|
# Module sequencing the successive actions necessary for website building
|
||||||
|
|
||||||
def bigmogol():
|
def create_website():
|
||||||
"""
|
"""
|
||||||
First function called by bparse.py, calls all other modules in the right order.
|
First function called by bparse.py, calls all other modules in the right order.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def create_environment():
|
def create_environment():
|
||||||
"""
|
"""
|
||||||
Returns parserEnvironment as an object containing everything needed for app execution.
|
Returns parserEnvironment as an object containing everything needed for app execution.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def create_config():
|
def create_config():
|
||||||
"""
|
"""
|
||||||
Returns globalConfig as an object from parser_config.yml settings.
|
Returns globalConfig as an object from parser_config.yml settings.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def create_crawler():
|
def create_crawler():
|
||||||
"""
|
"""
|
||||||
Returns crawler as an object for navigation in the userfiles.
|
Returns crawler as an object for navigation in the userfiles.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def create_user_config():
|
def create_user_config():
|
||||||
"""
|
"""
|
||||||
Returns userConfig as an object from aliases.yml, glossary.yml and website.yml.
|
Returns userConfig as an object from aliases.yml, glossary.yml and website.yml.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def create_template():
|
def create_template():
|
||||||
"""
|
"""
|
||||||
Returns a templateManager from templates for generating the correct html files.
|
Returns a templateManager from templates for generating the correct html files.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def env_checker():
|
def env_checker():
|
||||||
"""
|
"""
|
||||||
Verify all is in order for initialisation of the parserEnvironment object and initialises.
|
Verify all is in order for initialisation of the parserEnvironment object and initialises.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def begin_crawling(pEnv):
|
def begin_crawling(pEnv):
|
||||||
"""
|
"""
|
||||||
Starts reading every file in the userfiles and adds them to the crawler object progressively.
|
Starts reading every file in the userfiles and adds them to the crawler object progressively.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def begin_preparsing(pEnv):
|
def begin_preparsing(pEnv):
|
||||||
"""
|
"""
|
||||||
Create an importTree and checks for conflicts or loops; then replaces imports with their contents,
|
Create an importTree and checks for conflicts or loops; then replaces imports with their contents,
|
||||||
|
|
@ -55,15 +63,18 @@ def begin_preparsing(pEnv):
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def begin_parsing(pEnv):
|
def begin_parsing(pEnv):
|
||||||
"""
|
"""
|
||||||
For each of the generated files, parses element after element and creates the graph representation of the website,
|
For each of the generated files, parses element after element and creates the graph representation of the website,
|
||||||
interacts with context_mngr.py to acertain integrity and deal with errors.
|
interacts with context_mngr.py to ascertain integrity and deal with errors.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def begin_export():
|
def begin_export():
|
||||||
"""
|
"""
|
||||||
Replaces all parsed values with their attributed correspondances as per the template_manager and exports the result as a website.
|
Replaces all parsed values with their attributed correspondances as per the template_manager
|
||||||
|
and exports the result as a website.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
# Module for interpreting default or custom templates.
|
# Module for interpreting default or custom templates.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue