jcryptool / core

JCrypTool Core Plug-ins
https://www.cryptool.org
Eclipse Public License 1.0
163 stars 43 forks source link

NOISSUE: Add link availability script for online help #249

Closed tassadarius closed 3 years ago

tassadarius commented 3 years ago

Description

This is a simple, python3.7+ script with no external dependencies. Use it to find dead links in the JCrypTool online help. It recursively resolves all links which are used in HTML files, tries to retrieve them and creates an output for reachable/unreachable links.

Current status

I applied the script to core and crypto, these are the results:

core

Summary - Tested unique external links: 146
===========================================
    Reachable       108 (73.97%)
    Not Reachable    38 (26.03%)

In detail results of dead links: failed_links_core.txt

crypto

Summary - Tested unique external links: 217
===========================================
    Reachable       190 (87.56%)
    Not Reachable    27 (12.44%)

In detail results of dead links: failed_links_crypto.txt

How to use

You can easily use the script yourself, you just need Python 3.7 or higher In most use-cases, you would want to retrieve dead links with their paths, this can be done via

python3 link_availability_checker.py --summary --results-dead --result-paths /path/to/core/or/crypto

For easier readability you can also redirect the result output to a file like so

python3 link_availability_checker.py --summary --results-dead --result-paths --result-file dead-links.txt /path/to/core/or/crypto

Pipeline

We could use the script in the build pipeline, or have a separate link-checking Action which runs periodically.

grthor commented 3 years ago

Should I merge the PR or are still working on the link checker?

tassadarius commented 3 years ago

Should I merge the PR or are still working on the link checker?

I want to add a small change that it collects multiple directories automatically.