Skip to content

iamarunbrahma/nb-link-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notebook Link Checker

This tool scans through all Jupyter notebooks in a specified directory, extracts URLs from markdown and code cells, and checks if the extracted links are valid or broken.

Features

  • Recursively finds all Jupyter notebooks in a project directory and extracts links from both markdown and code cells in each notebook
  • Validates if the extracted links are valid or broken i.e. 404, 5xx, etc.
  • Generates a detailed markdown report of broken links along with the cell number and line number in the notebook where the link is located.

Installation

  1. Install uv (if not already installed):
pip install uv
  1. Clone the repository and set up the environment:
git clone https://github.com/iamarunbrahma/nb-link-checker.git
cd nb-link-checker
uv venv
source .venv/bin/activate  # On Unix/macOS
.venv\Scripts\activate  # On Windows
  1. Install dependencies:
uv pip install -r requirements.txt
uv pip install -r requirements-dev.txt  # For development

Usage

Basic usage with default settings:

python nb_link_checker.py

Specify a custom project directory and output file:

python nb_link_checker.py -p /directory_path -o custom_report.md # replace `/directory_path` with your custom path

Command Line Arguments

  • -p, --project_dir: Path to the project directory containing Jupyter notebooks (default: current directory)
  • -o, --output_path: Path to the output markdown file for the broken links report (default: broken_links_report.md)

About

Scan and validate links in notebooks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages