Skip to content

Commit 15b9992

Browse files
authored
Docs for new release (#57)
- Fix docstrings to properly appear in the docs - Add release notes for new version. - Add multiprocessing for broken urls decreasing execution time by 50%. - Add Advanced Usage Documentation - Add docs for reports
1 parent b2bd651 commit 15b9992

21 files changed

+183
-35
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ All notable changes to this project will be documented in this file.
1212

1313
### Other Changes
1414

15+
## [v0.2.0] 3 Aug 2024
16+
- Redesign the package.
17+
- Port to using Click instead of arg_parser.
18+
- Expose options for external users to allow for more customization.
19+
- Increase coverage for paths by including paths that start with `/` or nothing.
20+
- Add retires for URLs before flagging them as broken.
21+
- Preform head request on URL which falls back to get if both not working flag as broken after retries count finishes.
22+
- Analyze all web URLs except the ones in skip_domains list.
23+
- Change Syntax of terminal comments to improve readability.
24+
- Add Spinner to indicate that the tool is working (Not compatible with all terminals)
25+
1526
## [v0.1.5] 8 Jul 2024
1627
- Increase timeout for requests to check web urls alive or not. https://github.com/john0isaac/markdown-checker/pull/52
1728

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ pip install markdown-checker
2525
2. Run `markdown-checker -d {src} -f {func} -gu {url}`. Replace `{src}` with the directory you want to analyze, `{func}` with the available functions like `check_broken_paths`, `{gu}` with your contribution guidance full URL.
2626
3. The output will be displayed in the terminal and in a `comments.md` file.
2727

28+
For more customizations read the docs.
29+
2830
## Using `markdown-checker` in GitHub Actions
2931

3032
You can run this tool within a GitHub workflow using the [action-check-markdown](https://github.com/marketplace/actions/check-markdown) GitHub action.

docs/mkdocs.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,13 @@ plugins:
3434
nav:
3535
- About: index.md
3636
- Usage: usage.md
37+
- Advanced Usage: advanced.md
38+
- API Reference:
39+
- API Reference: api.md
40+
- Main: ./api/main.md
41+
- Urls: ./api/urls.md
42+
- Paths: ./api/paths.md
43+
- Markdown Link Base: ./api/markdown_link_base.md
44+
- Utilities: ./api/utils.md
45+
- Reports : ./api/reports.md
3746
- Automate: automate.md

docs/source/advanced.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
## Advanced Usage
2+
3+
To further customize your experience with the Markdown Checker, you can utilize additional command-line interface (CLI) options.
4+
5+
## Command Line Options
6+
7+
### `-d`, `--dir`
8+
- **Type**: `click.Path`
9+
- **Description**: Path to the root directory to check.
10+
- **Required**: Yes
11+
12+
### `-ext`, `--extensions`
13+
- **Type**: `list[str]`
14+
- **Description**: File extensions to filter the files.
15+
- **Default**:
16+
- `.md`
17+
- `.ipynb`
18+
- **Required**: Yes
19+
20+
### `-td`, `--tracking-domains`
21+
- **Type**: `list[str]`
22+
- **Description**: List of tracking domains to check if they have a tracking id or not.
23+
- **Default**:
24+
- `github.com`
25+
- `microsoft.com`
26+
- `visualstudio.com`
27+
- `aka.ms`
28+
- `azure.com`
29+
- **Required**: Yes
30+
31+
### `-sf`, `--skip-files`
32+
- **Type**: `list[str]`
33+
- **Description**: List of file names to skip check.
34+
- **Default**:
35+
- `CODE_OF_CONDUCT.md`
36+
- `SECURITY.md`
37+
- **Required**: Yes
38+
39+
### `-sd`, `--skip-domains`
40+
- **Type**: `list[str]`
41+
- **Description**: List of domains to skip checking if their urls are working or not.
42+
- **Default**: `[]`
43+
- **Required**: No
44+
45+
### `-suc`, `--skip-urls-containing`
46+
- **Type**: `list[str]`
47+
- **Description**: List of strings to skip checking if their urls are working or not.
48+
- **Default**:
49+
- `https://www.microsoft.com/en-us/security/blog`
50+
- `video-embed.html`
51+
- **Required**: No
52+
53+
### `-gu`, `--guide-url`
54+
- **Type**: `str`
55+
- **Description**: Full URL of your contributing guide.
56+
- **Required**: Yes
57+
58+
### `-to`, `--timeout`
59+
- **Type**: `int`
60+
- **Description**: Timeout in seconds for the requests before retrying.
61+
- **Default**: `10`
62+
- **Required**: No
63+
64+
### `-rt`, `--retries`
65+
- **Type**: `int`
66+
- **Description**: Number of retries for the requests before flagging a url as broken.
67+
- **Default**: `3`
68+
- **Required**: No
69+
70+
### `-o`, `--output-file-name`
71+
- **Type**: `str`
72+
- **Description**: Name of the output file.
73+
- **Default**: `comments`
74+
- **Required**: Yes
75+
76+
77+
## Other Options
78+
79+
### `--version`
80+
- **Type**: `bool`
81+
- **Description**: Show the version and exit.
82+
- **Required**: No
83+
84+
### `--help`
85+
- **Type**: `bool`
86+
- **Description**: Show the help message and exit.
87+
- **Required**: No

docs/source/api.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- [Main](./api/main.md)
2+
- [Urls](./api/urls.md)
3+
- [Paths](./api/paths.md)
4+
- [Markdown Link Base](./api/markdown_link_base.md)
5+
- [Utilities](./api/utils.md)

docs/source/api/main.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: markdown_checker
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: markdown_checker.markdown_link_base

docs/source/api/paths.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: markdown_checker.paths

docs/source/api/reports.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
::: markdown_checker.reports.md_reports.generator
2+
3+
::: markdown_checker.reports.generator_base

docs/source/api/urls.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: markdown_checker.urls

0 commit comments

Comments
 (0)