Skip to content

Commit

Permalink
folder structure change code update
Browse files Browse the repository at this point in the history
  • Loading branch information
Clementine2722 authored Mar 2, 2024
1 parent 6dc45d5 commit 01f6612
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions frontend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ def metadata_extractor_HTML(AST_file, HTML_file):
return False


for filename in listdir("frontend/webpage"):
remove("frontend/webpage/" + filename)
for filename in listdir("docs"):
remove("docs/" + filename)

with open(f'docs/CNAME', 'w') as file:
file.write("colab.agi-now.com")


### OPENING ALL SCENARIOS FILES
Expand Down Expand Up @@ -203,7 +206,7 @@ def metadata_extractor_HTML(AST_file, HTML_file):
scenario_name=output_scenarios_names[i] # This will be the title and header of the page
)

with open(f'frontend/webpage/{output_scenarios_names[i]}.html', 'w') as file:
with open(f'docs/{output_scenarios_names[i]}.html', 'w') as file:
file.write(output) # Render the filled template

# Now the menu.html
Expand All @@ -217,5 +220,5 @@ def metadata_extractor_HTML(AST_file, HTML_file):
template = environment.get_template("menu_template.html")
output = template.render(scenarios=list_of_scenarios)

with open(f'frontend/webpage/menu.html', 'w') as file:
with open(f'docs/index.html', 'w') as file:
file.write(output) # Render the filled template

0 comments on commit 01f6612

Please sign in to comment.