Merge branch 'main' of github.com:idle-org/bootstraparse

This commit is contained in:
vky 2022-01-24 22:09:54 +01:00
commit 359b3dfd50
11 changed files with 27 additions and 15 deletions

View File

@ -1 +1 @@
# Main program, use this to start parsing
# Main program, use this to start parsing

View File

@ -1,9 +1,10 @@
import os
# testing Fibonacci number function
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():
assert fib(int(os.environ["FIB_INPUT"])) == 55
assert fib(int(os.environ["FIB_INPUT"])) == 55

View File

@ -21,4 +21,4 @@ class GlobalConfig(ConfigLoader):
super().__init__(configfile)
conf = ConfigLoader("./example_userfiles/config/aliases.yml")
conf = ConfigLoader("./example_userfiles/config/aliases.yml")

View File

@ -1 +1 @@
# Interprets where the parser is located and resolves errors
# Interprets where the parser is located and resolves errors

View File

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

View File

@ -1 +1 @@
# Module for final generation of the translated website
# Module for final generation of the translated website

View File

@ -1 +1 @@
# Main parser, interprets userfiles and translates into html
# Main parser, interprets userfiles and translates into html

View File

@ -1 +1 @@
# Module for pre-parsing userfiles in preparation for the parser
# Module for pre-parsing userfiles in preparation for the parser

View File

@ -1 +1 @@
# Module for file and directories repartition
# Module for file and directories repartition

View File

@ -1,53 +1,61 @@
# 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.
"""
pass
def create_environment():
"""
Returns parserEnvironment as an object containing everything needed for app execution.
"""
pass
def create_config():
"""
Returns globalConfig as an object from parser_config.yml settings.
"""
pass
def create_crawler():
"""
Returns crawler as an object for navigation in the userfiles.
"""
pass
def create_user_config():
"""
Returns userConfig as an object from aliases.yml, glossary.yml and website.yml.
"""
pass
def create_template():
"""
Returns a templateManager from templates for generating the correct html files.
"""
pass
def env_checker():
"""
Verify all is in order for initialisation of the parserEnvironment object and initialises.
"""
pass
def begin_crawling(pEnv):
"""
Starts reading every file in the userfiles and adds them to the crawler object progressively.
"""
pass
def begin_preparsing(pEnv):
"""
Create an importTree and checks for conflicts or loops; then replaces imports with their contents,
@ -55,15 +63,18 @@ def begin_preparsing(pEnv):
"""
pass
def begin_parsing(pEnv):
"""
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
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

View File

@ -1 +1 @@
# Module for interpreting default or custom templates.
# Module for interpreting default or custom templates.