repo2rocrate

raw JSON →
0.1.2 verified Fri May 01 auth: no python

Generate RO-Crates (Research Object Crates) from workflow repositories. Version 0.1.2, early release with no frequent updates.

pip install repo2rocrate
error ModuleNotFoundError: No module named 'repo2rocrate'
cause Package not installed or installed in a different Python environment.
fix
Run 'pip install repo2rocrate' in the correct environment.
error ValueError: Not a valid GitHub URL
cause URL does not start with 'https://github.com/' or is malformed.
fix
Pass a full URL like 'https://github.com/user/repo'.
gotcha The repo2rocrate function expects the full GitHub URL with 'https://github.com/' prefix. Omitting 'https://' or using a non-GitHub URL will raise an error.
fix Ensure URL starts with 'https://github.com/'.
deprecated Python 3.6 support is declared but highly unlikely to be tested. Newer Python versions (>=3.8) are recommended.
fix Use Python 3.8+; consider pinning if you need 3.6.
gotcha The library may fail with repository names containing special characters or non-ASCII. Error handling is minimal.
fix Encode URL or stick to ASCII repository names.

Generate an RO-Crate from a public GitHub repository URL. Requires internet access.

from repo2rocrate import repo2rocrate

# Replace with a valid GitHub repository URL
github_url = "https://github.com/crs4/repo2rocrate"
rocrate_url = repo2rocrate(github_url)
print(f"RO-Crate URL: {rocrate_url}")