This project includes tools and scripts to check external links in the documentation repository. It automates identifying broken or problematic links and outputs the results in a convenient CSV format for further analysis.
- Python: Required to run the Python script for processing link check results. Download Python.
- Pandas Library: Python library for data manipulation. Install it via pip using
pip install pandas
. - Node.js and npm: Required for running the
linkcheck-external
script. Download Node.js and npm.
-
Clone the documentation repository to your local machine:
git clone https://github.com/smartcontractkit/documentation
-
Navigate to the cloned directory:
cd documentation
-
In the repository directory, install the required Node.js dependencies:
npm install
-
Run the
linkcheck-external
script to check external links:npm run linkcheck-external
This script generates a log file link-checker.log
in the temp
folder with the link check results.
-
Clone the Extractor repository to your local machine:
git clone https://github.com/khadni/docs-external-links-extractor
-
Navigate to the cloned directory:
cd docs-external-links-extractor
-
Copy the
link-checker.log
log file from thedocumentation/temp/
folder and paste it into thedocs-external-links-extractor
folder. -
In your terminal, run the Python script to parse the log file and generate a CSV file with link errors shown in a convenient format:
python Extractor.py
The script creates a new CSV file output_[YYYYMMDD].csv
.
-
Open Google Sheets and create a new spreadsheet.
-
Go to
File > Import > Upload
and select the generated CSV file. -
Click on
Import data
.