This commit is contained in:
vicky 2022-06-07 00:25:29 +02:00
parent 2cafa176b5
commit cdc8c44d80
4 changed files with 22 additions and 5 deletions

19
src/bootstraparse/__main__.py Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/python3
# Main program, use this to start parsing
import rich
from bootstraparse.modules import sitecreator
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog="bootstraparse", description='Parses a folder for all .bpr files and '
'magically recreates the same architecture '
'with html translated files.')
parser.add_argument('origin', help='the root folder of all files to parse.')
parser.add_argument('destination', help="path of the folder where to output all the magic.")
# parser.add_argument("-v", "verbosity")
args = parser.parse_args()
if sitecreator.create_website(args.origin, args.destination) == 0:
rich.print("Bootstraparse run successful!")

View File

@ -1,4 +0,0 @@
# Main program, use this to start parsing
def to_test():
print("This is a test")

View File

@ -15,6 +15,8 @@ def create_website(origin, destination):
for element, destination in crwlr:
save(preparse_parse(element), destination, env)
return 0
def create_environment(origin, destination):
"""

View File

@ -1,5 +1,5 @@
# Test the base parser
from bootstraparse import bparse
from bootstraparse import __main__
def test_to_test():