binderize.binderize()
Prepare a GitHub repository to be launched via Binder.
Usage
binderize.binderize(
project=Path("."),
branch="main",
urlpath="rstudio",
add_readme_badge=True,
overwrite=True,
verbose=False
)Writes a .binder/Dockerfile and inserts a Binder launch badge into the project’s README.md (or copies the badge snippet to the clipboard if the README has no badge section to insert into).
Parameters
project: Path or str = Path(".")-
Path to the local Git repository to binderize. Must be a GitHub repository.
branch: str = "main"-
Branch to point the Binder launch link at.
urlpath: str = "rstudio"-
URL path Binder should open to on launch (e.g. “rstudio”, “lab”).
add_readme_badge: bool = True-
Whether to attempt to insert the Binder badge into the project’s README.md. If False, the badge snippet is copied to the clipboard and printed instead.
overwrite: bool = True-
Whether to overwrite an existing
.binder/Dockerfile. verbose: bool = False- Whether to print the generated Binder Dockerfile contents.
Returns
None
Raises
ValueError- If the repository is not a GitHub repository.