devonfw / asciidoc-link-checker

Tool to check links in AsciiDoc files
Apache License 2.0
5 stars 10 forks source link

Enhancement - Make output easy to read #6

Open gaurav-nelson opened 7 years ago

gaurav-nelson commented 7 years ago

The current output lists filename ---> link, and status. Some links are red colored(internal links), with no explanation to why it is so. Follwoing is current output:

$ linkchecker openshift-docs/install_config/persistent_storage/
Documents/openshift-docs/install_config/persistent_storage/dynamically_provisioning_pvs.adoc ---> http://127.0.0.1:8081 site can't be reached
Documents/openshift-docs/install_config/persistent_storage/persistent_storage_azure.adoc ---> https://someacount.blob.core.windows.net/vhds/test2.vhd site can't be reached
Documents/openshift-docs/install_config/persistent_storage/persistent_storage_nfs.adoc ---> https://github.com/openshift/openshift-ansible/tree/master/roles/kube_nfs_volumes cannot be verified
 Documents/openshift-docs/install_config/persistent_storage/persistent_storage_fibre_channel.adoc ---> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch25.html ---> 404 
 Documents/openshift-docs/install_config/persistent_storage/persistent_storage_glusterfs.adoc ---> Documents/openshift-docs/install_config/persistent_storage/OpenShift_Containerization_Gluster_412816_0716_JCS_converged.png False 
 Documents/openshift-docs/install_config/persistent_storage/persistent_storage_glusterfs.adoc ---> Documents/openshift-docs/install_config/persistent_storage/OpenShift_Containerization_Gluster_412816_0716_JCS_dedicated.png False 
DONE: Some link failed

It would be great if we can improve the output to be more clear and cleaner. Something along the lines of following:

FILE: long/path/to/file/with/extension/filename.asciidoc
[Unreachable]   http://this.is.link/that/failed
[Unreachable]   http://another.link/that/failed
[404]                 local/file/link/ti/image.png

FILE: long/path/to/file/with/extension/filename/another.adoc
[Status]   http://this.is.link/that/failed
[Status]   http://another.link/that/failed
[Status]   local/file/link/ti/image.png

FILE: Documents/openshift-docs/install_config/persistent_storage/dynamically_provisioning_pvs.adoc
[Unreachable]   http://127.0.0.1:8081

FILE: Documents/openshift-docs/install_config/persistent_storage/persistent_storage_azure.adoc 
[Unreachable]   https://someacount.blob.core.windows.net/vhds/test2.vhd

DONE: Some links failed!
sjimenez77 commented 7 years ago

For the moment I have developed an easy improvement in the output. Please, check it out. I will try to add position of the errors found in future releases.

gaurav-nelson commented 7 years ago

@sjimenez77 Thank you for the updates. The output is easier to read now. It will be awesome if the output is grouped by files as well.

gaurav-nelson commented 6 years ago

@sjimenez77 maybe add hacktoberfest label to this?