diff --git a/.gitignore b/.gitignore index 68bc17f..35ee110 100644 --- a/.gitignore +++ b/.gitignore @@ -138,6 +138,9 @@ venv.bak/ # mkdocs documentation /site +# Generated output files +comment.md + # mypy .mypy_cache/ .dmypy.json @@ -158,3 +161,4 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +docs/site/ diff --git a/README.md b/README.md index 73ab296..5f35ab8 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ pip install markdown-checker For more customizations read the docs. +> **Note:** When using list parameters (like `--skip-domains`, `--skip-files`, etc.), provide values as comma-separated without spaces: `--skip-domains=example.com,test.com`. Do not use square brackets or spaces after commas. See the [Advanced Usage](https://markdown-checker.readthedocs.io/en/latest/advanced/) documentation for detailed examples. + ## Using `markdown-checker` in GitHub Actions You can run this tool within a GitHub workflow using the [action-check-markdown](https://github.com/marketplace/actions/check-markdown) GitHub action. diff --git a/docs/source/advanced.md b/docs/source/advanced.md index 9d8cc76..86c6aad 100644 --- a/docs/source/advanced.md +++ b/docs/source/advanced.md @@ -3,6 +3,33 @@ To further customize your experience with the Markdown Checker, you can utilize additional command-line interface (CLI) options. +### Working with List Parameters + +Several CLI options accept lists of values (e.g., `--skip-domains`, `--skip-files`, `--extensions`, `--tracking-domains`, `--skip-urls-containing`). + +**How to provide multiple values:** + +Use **comma-separated values** without spaces: + +```bash +markdown-checker -d . -f check_broken_urls --skip-domains=example.com,test.com +``` + +**Important formatting rules:** + +- Values must be separated by commas with **no spaces** +- Do **not** use square brackets +- Do **not** add spaces after commas +- Quotes are optional but not required + +**Examples of correct and incorrect usage:** + +- ❌ Wrong: `--skip-domains=[example.com,test.com]` (square brackets not allowed) +- ❌ Wrong: `--skip-domains=example.com, test.com` (spaces not allowed) +- ❌ Wrong: `--skip-domains example.com test.com` (must use `=` and commas) +- ✅ Correct: `--skip-domains=example.com,test.com` +- ✅ Correct: `--skip-domains="example.com,test.com"` (quotes optional) + ## Command Line Options ### `-d`, `--dir` @@ -32,6 +59,16 @@ To further customize your experience with the Markdown Checker, you can utilize - `.ipynb` - **Required**: No +**Usage Examples:** + +```bash +# Single value +markdown-checker -d . -f check_broken_paths --extensions=.md + +# Multiple values (comma-separated, no spaces) +markdown-checker -d . -f check_broken_paths --extensions=.md,.ipynb,.txt +``` + ### `-td`, `--tracking-domains` - **Type**: `list[str]` @@ -44,6 +81,16 @@ To further customize your experience with the Markdown Checker, you can utilize - `azure.com` - **Required**: No +**Usage Examples:** + +```bash +# Single value +markdown-checker -d . -f check_urls_tracking --tracking-domains=github.com + +# Multiple values (comma-separated, no spaces) +markdown-checker -d . -f check_urls_tracking --tracking-domains=github.com,microsoft.com +``` + ### `-sf`, `--skip-files` - **Type**: `list[str]` @@ -53,6 +100,16 @@ To further customize your experience with the Markdown Checker, you can utilize - `SECURITY.md` - **Required**: No +**Usage Examples:** + +```bash +# Single value +markdown-checker -d . -f check_broken_paths --skip-files=README.md + +# Multiple values (comma-separated, no spaces) +markdown-checker -d . -f check_broken_paths --skip-files=README.md,CHANGELOG.md,LICENSE.md +``` + ### `-sd`, `--skip-domains` - **Type**: `list[str]` @@ -60,6 +117,16 @@ To further customize your experience with the Markdown Checker, you can utilize - **Default**: `[]` - **Required**: No +**Usage Examples:** + +```bash +# Single value +markdown-checker -d . -f check_broken_urls --skip-domains=example.com + +# Multiple values (comma-separated, no spaces) +markdown-checker -d . -f check_broken_urls --skip-domains=example.com,test.com +``` + ### `-suc`, `--skip-urls-containing` - **Type**: `list[str]` @@ -69,6 +136,16 @@ To further customize your experience with the Markdown Checker, you can utilize - `video-embed.html` - **Required**: No +**Usage Examples:** + +```bash +# Single value +markdown-checker -d . -f check_broken_urls --skip-urls-containing=/embed/ + +# Multiple values (comma-separated, no spaces) +markdown-checker -d . -f check_broken_urls --skip-urls-containing=/embed/,/preview/,video-embed.html +``` + ### `-gu`, `--guide-url` - **Type**: `str`