Skip to content

Commit

Permalink
Additional resources and some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
malywut committed Dec 13, 2024
1 parent 84d98eb commit d71a0eb
Show file tree
Hide file tree
Showing 18 changed files with 561 additions and 188 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ We welcome contributions! To add or update resources:
Each resource should include:
- Name
- Description
- Links
- Links (website, github...)
- Tags
- Logo
- Logo (preferably a file in logos/)


### Pull Request Process
Expand Down
30 changes: 19 additions & 11 deletions generate_site.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
from datetime import datetime
import yaml
from jinja2 import Environment, FileSystemLoader
import json


def load_resources():
with open('resources.yaml', 'r') as file:
return yaml.safe_load(file)['resources']
with open("resources.yaml", "r") as file:
return yaml.safe_load(file)["resources"]


def generate_html(resources):
# Prepare Jinja2 environment
env = Environment(loader=FileSystemLoader('.'))
template = env.get_template('template.html')
env = Environment(loader=FileSystemLoader("."))
template = env.get_template("template.html")

# Render the template
html_output = template.render(
resources=resources,
resources_json=json.dumps(resources)
resources_json=json.dumps(resources),
generation_date=datetime.now(),
)

# Write the output
with open('dist/index.html', 'w') as file:
with open("dist/index.html", "w") as file:
file.write(html_output)


def main():
import os
import shutil
os.makedirs('dist', exist_ok=True)

os.makedirs("dist", exist_ok=True)
resources = load_resources()
generate_html(resources)
# Copy the styles file to the dist directory
shutil.copy('styles.css', 'dist/styles.css')
shutil.copytree('scripts', 'dist/scripts/', dirs_exist_ok=True)
shutil.copy("styles.css", "dist/styles.css")
shutil.copytree("scripts", "dist/scripts/", dirs_exist_ok=True)
shutil.copytree("logos", "dist/logos/", dirs_exist_ok=True)


if __name__ == '__main__':
main()
if __name__ == "__main__":
main()
6 changes: 6 additions & 0 deletions logos/agentops.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions logos/autogen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions logos/axolotl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions logos/braintrust.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logos/ell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions logos/giskard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d71a0eb

Please sign in to comment.