Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Mar 7, 2024
1 parent 813b560 commit 6f0024a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bin/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
repo_folders = [d for d in os.listdir(repo) if
os.path.isdir(os.path.join(repo, d))]

all_template_json_data = []

# Attempt to load existing repository.json if it exists
existing_repo_data = {"name": repo_name, "templates": []} # Default structure
combined_json_path = os.path.join(repo, "repository.json")
Expand Down Expand Up @@ -62,9 +60,9 @@
# Create index.html for the repository
index_html_path = os.path.join(repo, "index.html")
with open(index_html_path, 'w') as ihf:
ihf.write(f"<html><body><h1>{repo_name}</h1>\n<h2>templates</h2>\n")
ihf.write(f"<html><body><h1>{repo_name}</h1>\n")
ihf.write(f'<a href="repository.json">repository.json</a><br>\n')
for data in all_template_json_data:
for data in existing_repo_data["templates"]:
ihf.write(f'<a href="{data["zip"]}">{data["name"]}.zip</a><br>\n')
ihf.write("</body></html>\n")

Expand Down

0 comments on commit 6f0024a

Please sign in to comment.