Skip to content

Commit

Permalink
Refactor entrypoint.py to generate ROHub crate URL and append button …
Browse files Browse the repository at this point in the history
…to README.md
  • Loading branch information
cedricdcc committed Sep 23, 2024
1 parent e08c38f commit f85e0e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def main():
# Append the button to the README file
readme_path = os.path.join(pd, "README.md")
with open(readme_path, "a") as readme_file:
readme_file.write(f"\n\n[![ROHub Crate](https://img.shields.io/badge/ROHub-Crate-blue)]({rohub_url})\n")
readme_file.write(
f"\n\n[![ROHub Crate](https://img.shields.io/badge/ROHub-Crate-blue)]({rohub_url})\n"
)

print(rohub_id)
# get the rocrate metadata jsonld file
Expand All @@ -114,6 +116,8 @@ def get_rohub_id():
# search rohub for the project
projects_df = rohub.list_my_ros()

print(projects_df)

# search df for project by filtering on title
rohub_project = projects_df[projects_df["title"] == repo_name]
rohub_id = rohub_project["identifier"]
Expand Down

0 comments on commit f85e0e4

Please sign in to comment.