{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#hide\n", "from nbdev import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# fastlinkcheck\n", "\n", "> Check for broken external and internal links. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`fastlinkcheck` checks for broken links in HTML documents. This occurs in parallel so performance is fast. Both external links and internal links are checked. Internal links are checked by verifying local files." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Install" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`pip install fastlinkcheck`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Usage" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "
link_check
[source]link_check
(**`path`**:\"Root directory searched recursively for HTML files\", **`host`**:\"Host and path (without protocol) of web server\"=*`''`*, **`config_file`**:\"Location of file with urls to ignore\"=*`None`*, **`actions_output`**:\"Toggle GitHub Actions output on/off\"=*`False`*, **`exit_on_found`**:\"(CLI Only) Exit with status code 1 if broken links are found\"=*`False`*, **`print_logs`**:\"Toggle printing logs to stdout.\"=*`False`*)\n",
"\n",
"Check for broken links recursively in `path`."
],
"text/plain": [
"link_check
can also be called from the command line. We can see various options by passing the `--help` flag. These options correspond to the same parameters as calling the `link_check` function described above.\n",
"\n",
"> link_check --help"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```\n",
"usage: link_check [-h] [--host HOST] [--config_file CONFIG_FILE]\n",
" [--actions_output] [--exit_on_found] [--print_logs] [--pdb]\n",
" [--xtra XTRA]\n",
" path\n",
"\n",
"Check for broken links recursively in `path`.\n",
"\n",
"positional arguments:\n",
" path Root directory searched recursively for HTML files\n",
"\n",
"optional arguments:\n",
" -h, --help show this help message and exit\n",
" --host HOST Host and path (without protocol) of web server\n",
" (default: )\n",
" --config_file CONFIG_FILE\n",
" Location of file with urls to ignore\n",
" --actions_output Toggle GitHub Actions output on/off (default: False)\n",
" --exit_on_found Exit with status code 1 if broken links are\n",
" found (default: False)\n",
" --print_logs Toggle printing logs to stdout. (default: False)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}