Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Only List Broken Links #242

Open
ncorder opened this issue Nov 21, 2021 · 3 comments
Open

[Feature] Only List Broken Links #242

ncorder opened this issue Nov 21, 2021 · 3 comments

Comments

@ncorder
Copy link

ncorder commented Nov 21, 2021

Feature: Have an option to only list broken links

Currently, it appears the command will list all links and which ones are broken and which are ok

When searching very large websites, it can be difficult to see which ones are broken.

@davisdude
Copy link

davisdude commented Dec 14, 2021

As a bit of a workaround (assuming you don't have the name BROKEN in any of your file names, you could just grep for them like so:

blc website -ro | grep BROKEN | tee broken.txt

The tee command writes them to a file called broken.txt and also displays them to stdout.

If you do have file names that don't match, you could probably come up with some more sophisticated regex.

@marekvantuch
Copy link

@davisdude thanks for the suggestion, but I'm afraid in our case that doesn't help either as I also need to know on which page the broken link can be found :)

@dominicraf
Copy link

I agree this enhancement would be helpful. In the meantime this is my workaround:
blc $WEBSITE -ro 2>&1|grep -iEB1 "[^0].broken"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants