diff --git a/README.md b/README.md index 3b141ea..041bfb2 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,12 @@ pip install . mdlink /path/to/docs ``` +Scan current directory recursively: + +```bash +mdlink . +``` + ## Options - `--timeout FLOAT` @@ -41,10 +47,33 @@ When a Markdown link redirects, `mdlink` prompts: Replace old URL with final URL? [y/N] ``` -- [broken](https://httpbin.org/status/404) - Only confirmed links are updated. +## Test File And Script + +This repository includes: + +- `test.sh`: Generates a sample Markdown test file. +- `test.md`: A sample file with mixed link cases (200, redirect, 404/500, naked URLs, ignored image/non-http links). + +Generate or overwrite `test.md`: + +```bash +./test.sh +``` + +Generate to a custom file path: + +```bash +./test.sh /tmp/my-test.md +``` + +Run the tool against the generated test file: + +```bash +mdlink test.md +``` + ## Help ```bash